Added support for shaders written in non-legacy GLSL.
This commit is contained in:
parent
1dcad60878
commit
db7e683688
18 changed files with 690 additions and 74 deletions
|
@ -1,9 +1,12 @@
|
|||
uniform sampler2D texture;
|
||||
uniform float pixel_threshold;
|
||||
|
||||
varying vec4 texCoord;
|
||||
varying vec4 frontColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
float factor = 1.0 / (pixel_threshold + 0.001);
|
||||
vec2 pos = floor(gl_TexCoord[0].xy * factor + 0.5) / factor;
|
||||
gl_FragColor = texture2D(texture, pos) * gl_Color;
|
||||
vec2 pos = floor(texCoord.xy * factor + 0.5) / factor;
|
||||
gl_FragColor = texture2D(texture, pos) * frontColor;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue