ho3/resources/shaders/directlight2.vertex
Vladislav Khorev 7fc9a5e5d6 light working
2024-06-09 21:42:23 +03:00

26 lines
547 B
Plaintext

attribute vec3 vPosition;
attribute vec2 vTexCoord;
attribute vec3 vNormal;
uniform mat4 ProjectionMatrix;
uniform mat3 ModelRotateMatrix;
uniform vec3 ModelTranslateVector;
varying vec2 texCoord;
varying vec3 vertexPos;
varying vec3 absoluteVertexPos;
varying vec3 normal;
void main()
{
vec4 realVertexPos = vec4(ModelRotateMatrix * vPosition.xyz + ModelTranslateVector, 1.0);
gl_Position = ProjectionMatrix * realVertexPos;
vertexPos = gl_Position.xyz;
absoluteVertexPos = vPosition;
texCoord = vTexCoord.st;
normal = vNormal;
}