X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=ld37_one_room;a=blobdiff_plain;f=sdr%2Fshadow.v.glsl;fp=sdr%2Fshadow.v.glsl;h=0000000000000000000000000000000000000000;hp=8f9f045b93497359e22f6551ddbcc352cf8440c8;hb=f8ad31b8b1856784aefdd3457b6b8f5cb5576892;hpb=cc8a355e7b709f3eb1132cd6b63cf4e482d58332 diff --git a/sdr/shadow.v.glsl b/sdr/shadow.v.glsl deleted file mode 100644 index 8f9f045..0000000 --- a/sdr/shadow.v.glsl +++ /dev/null @@ -1,27 +0,0 @@ -uniform mat4 envmap_matrix; - -varying vec3 vdir, ldir[3], normal; -varying vec4 shadow_tc; -varying vec3 wdir; - -void main() -{ - gl_Position = ftransform(); - - vec3 vpos = (gl_ModelViewMatrix * gl_Vertex).xyz; - normal = gl_NormalMatrix * gl_Normal; - vdir = -vpos; - wdir = (envmap_matrix * vec4(vdir, 1.0)).xyz; // bring back to world space - ldir[0] = gl_LightSource[0].position.xyz - vpos; - ldir[1] = gl_LightSource[1].position.xyz - vpos; - ldir[2] = gl_LightSource[2].position.xyz - vpos; - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - - mat4 offmat = mat4(0.5, 0.0, 0.0, 0.0, - 0.0, 0.5, 0.0, 0.0, - 0.0, 0.0, 0.5, 0.0, - 0.5, 0.5, 0.5, 1.0); - mat4 tex_matrix = offmat * gl_TextureMatrix[1]; - - shadow_tc = tex_matrix * vec4(vpos, 1.0); -}