cntrl/assets/shaders/concrete.vs

24 lines
611 B
GLSL

#version 330
// Static concrete mesh: vertices are already in world space. Per-face planar
// UVs are baked at mesh-build time, so the fragment stage needs no triplanar
// sampling. The expensive inverse-transpose of matModel is gone (identity).
in vec3 vertexPosition;
in vec3 vertexNormal;
in vec2 vertexTexCoord;
in vec4 vertexColor;
uniform mat4 mvp;
out vec3 vWorld;
out vec3 vNormal;
out vec4 vColor;
out vec2 vUV;
void main()
{
vWorld = vertexPosition;
vNormal = normalize(vertexNormal);
vColor = vertexColor;
vUV = vertexTexCoord;
gl_Position = mvp * vec4(vertexPosition, 1.0);
}