DRTVWR-592: Remove shader cruft

meow-7.2.2
Cosmic Linden 2023-10-13 10:42:24 -07:00
parent b1a3a274ff
commit 6e949e5d63
2 changed files with 3 additions and 7 deletions

View File

@ -31,7 +31,6 @@ in vec3 position;
in vec3 normal;
in vec4 tangent;
in vec4 diffuse_color;
in vec2 texcoord0;
in vec2 texcoord1;
#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3

View File

@ -30,7 +30,6 @@ uniform mat4 modelview_projection_matrix;
in vec3 position;
in vec3 normal;
in vec4 diffuse_color;
in vec2 texcoord0;
in vec2 texcoord1;
out vec3 pos;
@ -41,18 +40,16 @@ out vec4 vary_texcoord1;
uniform vec4 object_plane_s;
uniform vec4 object_plane_t;
vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
vec2 texgen_object(vec4 vpos, mat4 mat, vec4 tp0, vec4 tp1)
{
vec4 tcoord;
tcoord.x = dot(vpos, tp0);
tcoord.y = dot(vpos, tp1);
tcoord.z = tc.z;
tcoord.w = tc.w;
tcoord = mat * tcoord;
return tcoord;
return tcoord.xy;
}
void main()
@ -67,7 +64,7 @@ void main()
vary_normal = normalize(normal_matrix * normal);
// Transform and pass tex coords
vary_texcoord0.xy = texgen_object(vec4(position, 1.0), vec4(texcoord0,0,1), texture_matrix0, object_plane_s, object_plane_t).xy;
vary_texcoord0.xy = texgen_object(vec4(position, 1.0), texture_matrix0, object_plane_s, object_plane_t);
vec4 t = vec4(texcoord1,0,1);