leocad/resources/shaders/fakelit_texture_decal_vs.glsl
2018-11-22 16:13:02 -08:00

17 lines
529 B
GLSL

LC_VERTEX_INPUT vec3 VertexPosition;
LC_VERTEX_INPUT vec3 VertexNormal;
LC_VERTEX_INPUT vec2 VertexTexCoord;
LC_VERTEX_OUTPUT vec3 PixelPosition;
LC_VERTEX_OUTPUT vec3 PixelNormal;
LC_VERTEX_OUTPUT vec2 PixelTexCoord;
uniform mat4 WorldViewProjectionMatrix;
uniform mat4 WorldMatrix;
void main()
{
PixelPosition = (WorldMatrix * vec4(VertexPosition, 1.0)).xyz;
PixelNormal = (WorldMatrix * vec4(VertexNormal, 0.0)).xyz;
gl_Position = WorldViewProjectionMatrix * vec4(VertexPosition, 1.0);
PixelTexCoord = VertexTexCoord;
}