#version 330 core// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 vertexPosition_modelspace;
out vec4 ShadowCoord;
// Values that stay constant for the whole mesh.
uniform mat4 depthMVP;
uniform mat4 DepthBiasMVP;
void main(){
// Output position of the vertex, in clip space : MVP * position
gl_Position = depthMVP * vec4(vertexPosition_modelspace,1);
// Same, but with the light's view matrix
ShadowCoord = DepthBiasMVP * vec4(vertexPosition_modelspace,1);
}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.