12 lines
390 B
Plaintext
12 lines
390 B
Plaintext
/* Shader to draw nothing. This shader is used when render scene to depth buffer only
|
|
For example, to make depth texture from light source position
|
|
*/
|
|
|
|
uniform mat3 ModelRotateMatrix;
|
|
uniform vec3 ModelTranslateVector;
|
|
|
|
void main()
|
|
{
|
|
vec4 realVertexPos = vec4(ModelRotateMatrix * gl_Vertex.xyz + ModelTranslateVector, 1.0);
|
|
gl_Position = gl_ModelViewProjectionMatrix * realVertexPos;
|
|
} |