22#ifndef __SOFTHDDEVICE_OPENGLSHADER_H
23#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); \
45precision mediump float; \
46varying vec4 rectCol; \
50 gl_FragColor = rectCol; \
60attribute vec2 position; \
61attribute vec2 texCoords; \
63varying vec2 TexCoords; \
64varying vec4 alphaValue;\
65varying vec4 bColorValue;\
68uniform mat4 projection; \
73 gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
74 TexCoords = texCoords; \
76 bColorValue = bColor; \
82precision mediump float; \
83varying vec2 TexCoords; \
84varying vec4 alphaValue; \
85varying vec4 bColorValue; \
87uniform sampler2D screenTexture; \
89float clamp_to_border_factor (vec2 coords) \
91 bvec2 out1 = greaterThan (coords, vec2 (1,1)); \
92 bvec2 out2 = lessThan (coords, vec2 (0,0)); \
93 bool do_clamp = (any (out1) || any (out2)); \
94 return float (!do_clamp); \
99 vec4 color = texture2D(screenTexture, TexCoords) * alphaValue; \
100 float f = clamp_to_border_factor (TexCoords); \
101 gl_FragColor = mix (bColorValue, color, f); \
111precision mediump float; \
112varying vec2 TexCoords; \
113varying vec4 alphaValue; \
114varying vec4 bColorValue; \
116uniform sampler2D screenTexture; \
118float clamp_to_border_factor (vec2 coords) \
120 bvec2 out1 = greaterThan (coords, vec2 (1,1)); \
121 bvec2 out2 = lessThan (coords, vec2 (0,0)); \
122 bool do_clamp = (any (out1) || any (out2)); \
123 return float (!do_clamp); \
128 vec4 color = texture2D(screenTexture, TexCoords) * alphaValue; \
129 vec4 color_swapped = vec4(color.b, color.g, color.r, color.a); \
130 float f = clamp_to_border_factor (TexCoords); \
131 gl_FragColor = mix (bColorValue, color_swapped, f); \
141attribute vec2 position; \
142attribute vec2 texCoords; \
144varying vec2 TexCoords; \
145varying vec4 textColor; \
147uniform mat4 projection; \
148uniform vec4 inColor; \
152 gl_Position = projection * vec4(position.x, position.y, 0.0, 1.0); \
153 TexCoords = texCoords; \
154 textColor = inColor; \
160precision mediump float; \
161varying vec2 TexCoords; \
162varying vec4 textColor; \
164uniform sampler2D glyphTexture; \
168 vec4 sampled = vec4(1.0, 1.0, 1.0, texture2D(glyphTexture, TexCoords).r); \
169 gl_FragColor = textColor * sampled; \
const char * textureFragmentShaderSwapBR
In difference to the textureFragmentShader this one does a blue/red color component swap.
const char * rectVertexShader
const char * textureFragmentShader
const char * rectFragmentShader
const char * textFragmentShader
const char * textureVertexShader
const char * textVertexShader