Update more full-screen shaders to no longer require texcoord attribs.
This commit is contained in:
@@ -35,10 +35,9 @@ uniform sampler2D glowMap;
|
||||
uniform sampler2D screenMap;
|
||||
|
||||
VARYING vec2 vary_texcoord0;
|
||||
VARYING vec2 vary_texcoord1;
|
||||
|
||||
void main()
|
||||
{
|
||||
frag_color = texture2D(glowMap, vary_texcoord1.xy) +
|
||||
frag_color = texture2D(glowMap, vary_texcoord0.xy) +
|
||||
texture2D(screenMap, vary_texcoord0.xy);
|
||||
}
|
||||
|
||||
@@ -33,11 +33,11 @@ out vec4 frag_color;
|
||||
|
||||
uniform sampler2D diffuseRect;
|
||||
|
||||
VARYING vec2 vary_tc;
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 col = texture2D(diffuseRect, vary_tc).rgb;
|
||||
vec3 col = texture2D(diffuseRect, vary_texcoord0).rgb;
|
||||
|
||||
frag_color = vec4(col.rgb, dot(col.rgb, vec3(0.299, 0.587, 0.144)));
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ uniform mat4 modelview_projection_matrix;
|
||||
|
||||
ATTRIBUTE vec3 position;
|
||||
|
||||
VARYING vec2 vary_tc;
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0);
|
||||
gl_Position = pos;
|
||||
|
||||
vary_tc = pos.xy*0.5+0.5;
|
||||
vary_texcoord0 = pos.xy*0.5+0.5;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,16 +26,13 @@
|
||||
uniform mat4 modelview_projection_matrix;
|
||||
|
||||
ATTRIBUTE vec3 position;
|
||||
ATTRIBUTE vec2 texcoord0;
|
||||
ATTRIBUTE vec2 texcoord1;
|
||||
|
||||
VARYING vec2 vary_texcoord0;
|
||||
VARYING vec2 vary_texcoord1;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
|
||||
vary_texcoord0 = texcoord0;
|
||||
vary_texcoord1 = texcoord1;
|
||||
vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
|
||||
gl_Position = pos;
|
||||
vary_texcoord0 = (pos.xy*0.5+0.5);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user