ho3/resources/shaders/lightview.vertex

17 lines
438 B
Plaintext
Raw Permalink Normal View History

2024-06-06 13:25:38 +00:00
/* 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;
}