15#ifndef __SOFTHDDEVICE_OPENGLSHADER_H
16#define __SOFTHDDEVICE_OPENGLSHADER_H
31attribute vec2 position; \
32varying vec4 rectCol; \
33uniform vec4 inColor; \
34uniform mat4 projection; \
38 gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
48precision mediump float; \
49varying vec4 rectCol; \
53 gl_FragColor = rectCol; \
63attribute vec2 position; \
64attribute vec2 texCoords; \
66varying vec2 TexCoords; \
67varying vec4 alphaValue;\
68varying vec4 bColorValue;\
71uniform mat4 projection; \
76 gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
77 TexCoords = texCoords; \
79 bColorValue = bColor; \
88precision mediump float; \
89varying vec2 TexCoords; \
90varying vec4 alphaValue; \
91varying vec4 bColorValue; \
93uniform sampler2D screenTexture; \
95float clamp_to_border_factor (vec2 coords) \
97 bvec2 out1 = greaterThan (coords, vec2 (1,1)); \
98 bvec2 out2 = lessThan (coords, vec2 (0,0)); \
99 bool do_clamp = (any (out1) || any (out2)); \
100 return float (!do_clamp); \
105 vec4 color = texture2D(screenTexture, TexCoords) * alphaValue; \
106 float f = clamp_to_border_factor (TexCoords); \
107 gl_FragColor = mix (bColorValue, color, f); \
119precision mediump float; \
120varying vec2 TexCoords; \
121varying vec4 alphaValue; \
122varying vec4 bColorValue; \
124uniform sampler2D screenTexture; \
126float clamp_to_border_factor (vec2 coords) \
128 bvec2 out1 = greaterThan (coords, vec2 (1,1)); \
129 bvec2 out2 = lessThan (coords, vec2 (0,0)); \
130 bool do_clamp = (any (out1) || any (out2)); \
131 return float (!do_clamp); \
136 vec4 color = texture2D(screenTexture, TexCoords) * alphaValue; \
137 vec4 color_swapped = vec4(color.b, color.g, color.r, color.a); \
138 float f = clamp_to_border_factor (TexCoords); \
139 gl_FragColor = mix (bColorValue, color_swapped, f); \
149attribute vec2 position; \
150attribute vec2 texCoords; \
152varying vec2 TexCoords; \
153varying vec4 textColor; \
155uniform mat4 projection; \
156uniform vec4 inColor; \
160 gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
161 TexCoords = texCoords; \
162 textColor = inColor; \
171precision mediump float; \
172varying vec2 TexCoords; \
173varying vec4 textColor; \
175uniform sampler2D glyphTexture; \
179 vec4 sampled = vec4(1.0, 1.0, 1.0, texture2D(glyphTexture, TexCoords).r); \
180 gl_FragColor = textColor * sampled; \
const char * textureFragmentShaderSwapBR
Texture Fragment Shader (swapped blue/red)
const char * rectVertexShader
Rectangle Vertex Shader.
const char * textureFragmentShader
Texture Fragment Shader.
const char * rectFragmentShader
Rectangle Fragment Shader.
const char * textFragmentShader
Text Fragment Shader.
const char * textureVertexShader
Texture Vertex Shader.
const char * textVertexShader
Text Vertex Shader.