Added shadow maps
This commit is contained in:
1 parent
a47306533e
commit
d8795ec076
15 files changed
+880
-6
No files matched your search
@@ -0,0 +1,19 @@
|
||||
attribute vec3 vPosition;
|
||||
attribute vec2 vTexCoord;
|
||||
attribute vec3 vNormal;
|
||||
|
||||
varying vec2 texCoord;
|
||||
varying vec4 fragPosLightSpace;
|
||||
varying vec3 fragNormal;
|
||||
|
||||
uniform mat4 ProjectionModelViewMatrix;
|
||||
uniform mat4 ModelViewMatrix;
|
||||
uniform mat4 uLightFromCamera;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ProjectionModelViewMatrix * vec4(vPosition, 1.0);
|
||||
texCoord = vTexCoord;
|
||||
fragPosLightSpace = uLightFromCamera * ModelViewMatrix * vec4(vPosition, 1.0);
|
||||
fragNormal = mat3(ModelViewMatrix) * vNormal;
|
||||
}
|
||||
Reference in new issue
Block a user