Attempt to fix effect shaders
This commit is contained in:
@@ -8,7 +8,9 @@
|
|||||||
#extension GL_ARB_texture_rectangle : enable
|
#extension GL_ARB_texture_rectangle : enable
|
||||||
|
|
||||||
#ifdef DEFINE_GL_FRAGCOLOR
|
#ifdef DEFINE_GL_FRAGCOLOR
|
||||||
out vec4 gl_FragColor;
|
out vec4 frag_color;
|
||||||
|
#else
|
||||||
|
#define frag_color gl_FragColor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uniform sampler2DRect tex0;
|
uniform sampler2DRect tex0;
|
||||||
@@ -18,6 +20,6 @@ VARYING vec2 vary_texcoord0;
|
|||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
vec3 color = pow(floor(pow(vec3(texture2D(tex0, vary_texcoord0.st)),vec3(.6)) * layerCount)/layerCount,vec3(1.66666));
|
vec3 color = pow(floor(pow(vec3(texture2DRect(tex0, vary_texcoord0.st)),vec3(.6)) * layerCount)/layerCount,vec3(1.66666));
|
||||||
gl_FragColor = vec4(color, 1.0);
|
frag_color = vec4(color, 1.0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,12 @@
|
|||||||
#extension GL_ARB_texture_rectangle : enable
|
#extension GL_ARB_texture_rectangle : enable
|
||||||
|
|
||||||
#ifdef DEFINE_GL_FRAGCOLOR
|
#ifdef DEFINE_GL_FRAGCOLOR
|
||||||
out vec4 gl_FragColor;
|
out vec4 frag_color;
|
||||||
|
#else
|
||||||
|
#define frag_color gl_FragColor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
uniform sampler2DRect tex0;
|
uniform sampler2DRect tex0;
|
||||||
uniform float brightness;
|
uniform float brightness;
|
||||||
uniform float contrast;
|
uniform float contrast;
|
||||||
@@ -38,5 +41,5 @@ void main(void)
|
|||||||
/// Modulate saturation
|
/// Modulate saturation
|
||||||
color = mix(vec3(dot(color, lumWeights)), color, saturation);
|
color = mix(vec3(dot(color, lumWeights)), color, saturation);
|
||||||
|
|
||||||
gl_FragColor = vec4(color, 1.0);
|
frag_color = vec4(color, 1.0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#extension GL_ARB_texture_rectangle : enable
|
#extension GL_ARB_texture_rectangle : enable
|
||||||
|
|
||||||
#ifdef DEFINE_GL_FRAGCOLOR
|
#ifdef DEFINE_GL_FRAGCOLOR
|
||||||
out vec4 gl_FragColor;
|
out vec4 frag_color;
|
||||||
|
#else
|
||||||
|
#define frag_color gl_FragColor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uniform sampler2DRect tex0;
|
uniform sampler2DRect tex0;
|
||||||
@@ -31,5 +33,5 @@ void main(void)
|
|||||||
color += weight.z * vec3(texture2DRect(tex0, vec2(vary_texcoord0.s,vary_texcoord0.t+offset.t)));
|
color += weight.z * vec3(texture2DRect(tex0, vec2(vary_texcoord0.s,vary_texcoord0.t+offset.t)));
|
||||||
color += weight.z * vec3(texture2DRect(tex0, vec2(vary_texcoord0.s,vary_texcoord0.t-offset.t)));
|
color += weight.z * vec3(texture2DRect(tex0, vec2(vary_texcoord0.s,vary_texcoord0.t-offset.t)));
|
||||||
}
|
}
|
||||||
gl_FragColor = vec4(color.xyz,1.0);
|
frag_color = vec4(color.xyz,1.0);
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,9 @@
|
|||||||
#extension GL_ARB_texture_rectangle : enable
|
#extension GL_ARB_texture_rectangle : enable
|
||||||
|
|
||||||
#ifdef DEFINE_GL_FRAGCOLOR
|
#ifdef DEFINE_GL_FRAGCOLOR
|
||||||
out vec4 gl_FragColor;
|
out vec4 frag_color;
|
||||||
|
#else
|
||||||
|
#define frag_color gl_FragColor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uniform sampler2DRect tex0;
|
uniform sampler2DRect tex0;
|
||||||
@@ -48,5 +50,5 @@ void main(void)
|
|||||||
|
|
||||||
outColor += noiseValue;
|
outColor += noiseValue;
|
||||||
|
|
||||||
gl_FragColor = vec4(outColor, 1.0);
|
frag_color = vec4(outColor, 1.0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user