0ad/binaries/data/mods/_test.minimal/shaders/instancing_light.vs
Ralph Sennhauser 58219b974c
Fix trailing whitespace and add pre-commit hook
Some have their editor configured to remove trailing whitespace and
editing such a file would "fix" it, adding an unrelated change.

Fix whitespace violations excluding third party libs and generated files
like glad or patches.

Enable pre-commit hook trailing-whitespace to enforce it in the future.

Fixes: #8016
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-15 20:08:48 +02:00

14 lines
364 B
GLSL

vec3 lighting(vec3 normal);
vec3 InstancingNormal(vec3 normal);
vec4 InstancingPosition(vec4 position);
void main()
{
vec3 normal = InstancingNormal(gl_Normal);
vec4 worldPos = InstancingPosition(gl_Vertex);
gl_FrontColor = vec4(lighting(normal),1.0) * gl_Color;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = gl_ModelViewProjectionMatrix * worldPos;
}