15#ifndef __SOFTHDDEVICE_OPENGLSHADER_H
16#define __SOFTHDDEVICE_OPENGLSHADER_H
33attribute vec2 position; \
34varying vec4 rectCol; \
35uniform vec4 inColor; \
36uniform mat4 projection; \
40 gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
50precision mediump float; \
51varying vec4 rectCol; \
55 gl_FragColor = rectCol; \
65attribute vec2 position; \
66attribute vec2 texCoords; \
68varying vec2 TexCoords; \
69varying vec4 alphaValue;\
70varying vec4 bColorValue;\
73uniform mat4 projection; \
78 gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
79 TexCoords = texCoords; \
81 bColorValue = bColor; \
90precision mediump float; \
91varying vec2 TexCoords; \
92varying vec4 alphaValue; \
93varying vec4 bColorValue; \
95uniform sampler2D screenTexture; \
97float clamp_to_border_factor (vec2 coords) \
99 bvec2 out1 = greaterThan (coords, vec2 (1,1)); \
100 bvec2 out2 = lessThan (coords, vec2 (0,0)); \
101 bool do_clamp = (any (out1) || any (out2)); \
102 return float (!do_clamp); \
107 vec4 color = texture2D(screenTexture, TexCoords) * alphaValue; \
108 float f = clamp_to_border_factor (TexCoords); \
109 gl_FragColor = mix (bColorValue, color, f); \
121precision mediump float; \
122varying vec2 TexCoords; \
123varying vec4 alphaValue; \
124varying vec4 bColorValue; \
126uniform sampler2D screenTexture; \
128float clamp_to_border_factor (vec2 coords) \
130 bvec2 out1 = greaterThan (coords, vec2 (1,1)); \
131 bvec2 out2 = lessThan (coords, vec2 (0,0)); \
132 bool do_clamp = (any (out1) || any (out2)); \
133 return float (!do_clamp); \
138 vec4 color = texture2D(screenTexture, TexCoords) * alphaValue; \
139 vec4 color_swapped = vec4(color.b, color.g, color.r, color.a); \
140 float f = clamp_to_border_factor (TexCoords); \
141 gl_FragColor = mix (bColorValue, color_swapped, f); \
151attribute vec2 position; \
152attribute vec2 texCoords; \
154varying vec2 TexCoords; \
155varying vec4 textColor; \
157uniform mat4 projection; \
158uniform vec4 inColor; \
162 gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
163 TexCoords = texCoords; \
164 textColor = inColor; \
173precision mediump float; \
174varying vec2 TexCoords; \
175varying vec4 textColor; \
177uniform sampler2D glyphTexture; \
181 vec4 sampled = vec4(1.0, 1.0, 1.0, texture2D(glyphTexture, TexCoords).r); \
182 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.