Some clean up, web version prepare
This commit is contained in:
1 parent
e9c888e2bf
commit
0975f3b9cd
104 files changed
+779
-1483
No files matched your search
@@ -0,0 +1,27 @@
|
||||
attribute vec3 vPosition;
|
||||
attribute vec2 vTexCoord;
|
||||
attribute vec3 vNormal;
|
||||
|
||||
varying vec2 texCoord;
|
||||
varying vec4 fragPosLightSpace;
|
||||
varying vec3 fragNormal;
|
||||
varying float fogDistance;
|
||||
varying vec3 fragViewPos;
|
||||
varying vec2 fragWorldXZ;
|
||||
|
||||
uniform mat4 ProjectionModelViewMatrix;
|
||||
uniform mat4 ModelViewMatrix;
|
||||
uniform mat4 uLightFromCamera;
|
||||
uniform vec3 uPlayerEyePos;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 eyePos = ModelViewMatrix * vec4(vPosition, 1.0);
|
||||
fogDistance = length(eyePos.xyz - uPlayerEyePos);
|
||||
gl_Position = ProjectionModelViewMatrix * vec4(vPosition, 1.0);
|
||||
texCoord = vTexCoord;
|
||||
fragViewPos = eyePos.xyz;
|
||||
fragNormal = mat3(ModelViewMatrix) * vNormal;
|
||||
fragPosLightSpace = uLightFromCamera * eyePos;
|
||||
fragWorldXZ = vPosition.xz;
|
||||
}
|
||||
Reference in new issue
Block a user