ho3/resources/shaders/lightview.vertex
Vladislav Khorev d132060e19 Resurrection
2024-06-06 16:25:38 +03:00

17 lines
438 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;
attribute vec3 vPosition;
uniform mat4 ProjectionMatrix;
void main()
{
vec4 realVertexPos = vec4(ModelRotateMatrix * vPosition.xyz + ModelTranslateVector, 1.0);
gl_Position = ProjectionMatrix * realVertexPos;
}