aboutsummaryrefslogtreecommitdiff
path: root/assets/shaders/test_vshader.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'assets/shaders/test_vshader.glsl')
-rwxr-xr-xassets/shaders/test_vshader.glsl10
1 files changed, 5 insertions, 5 deletions
diff --git a/assets/shaders/test_vshader.glsl b/assets/shaders/test_vshader.glsl
index 69015b78..22c91590 100755
--- a/assets/shaders/test_vshader.glsl
+++ b/assets/shaders/test_vshader.glsl
@@ -66,7 +66,7 @@ void main()
66 66
67// pass along the geo 67// pass along the geo
68 gl_Position = u_projMatrix * vec4(vECPos.xyz, 1.0); 68 gl_Position = u_projMatrix * vec4(vECPos.xyz, 1.0);
69 69
70 mat4 shadowMat = u_shadowBiasMatrix*u_projMatrix*u_vShadowLight*u_worldMatrix; 70 mat4 shadowMat = u_shadowBiasMatrix*u_projMatrix*u_vShadowLight*u_worldMatrix;
71 vShadowCoord = shadowMat * vec4(vert, 1.0); 71 vShadowCoord = shadowMat * vec4(vert, 1.0);
72} 72}
@@ -86,10 +86,10 @@ void main()
86 86
87// pass along the geo 87// pass along the geo
88 gl_Position = u_projMatrix * vec4(vECPos.xyz, 1.0); 88 gl_Position = u_projMatrix * vec4(vECPos.xyz, 1.0);
89 89
90 //mat4 shadowMat = u_shadowBiasMatrix*u_projMatrix*u_vShadowLight*u_worldMatrix; 90 //mat4 shadowMat = u_shadowBiasMatrix*u_projMatrix*u_vShadowLight*u_worldMatrix;
91 //vShadowCoord = shadowMat * vec4(vert, 1.0); 91 //vShadowCoord = shadowMat * vec4(vert, 1.0);
92 92
93 // normal mapping 93 // normal mapping
94 vec3 normal = normalize(vNormal.xyz); 94 vec3 normal = normalize(vNormal.xyz);
95 95
@@ -97,10 +97,10 @@ void main()
97 vec3 r = reflect( vec3(vECPos.xyz - u_eye.xyz), normal); 97 vec3 r = reflect( vec3(vECPos.xyz - u_eye.xyz), normal);
98 float m = 2.0 * length(r); 98 float m = 2.0 * length(r);
99 vEnvTexCoord = vec2(r.x/m + 0.5, r.y/m + 0.5); 99 vEnvTexCoord = vec2(r.x/m + 0.5, r.y/m + 0.5);
100 100
101 vec3 lightDirection = normalize(u_lightPos - vECPos.xyz); 101 vec3 lightDirection = normalize(u_lightPos - vECPos.xyz);
102 vDiffuseIntensity = max(0.0, dot(normal, lightDirection)); 102 vDiffuseIntensity = max(0.0, dot(normal, lightDirection));
103 103
104} 104}
105 105
106#endif 106#endif