mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-26 08:36:49 +00:00
adds wireCube primitive scale of the command taken into account shading light is more vertical
15 lines
293 B
GLSL
15 lines
293 B
GLSL
#version 330 compatibility
|
|
|
|
in vec3 vertexColor;
|
|
in vec3 vertexNormal;
|
|
|
|
out vec4 fragColor;
|
|
|
|
void main()
|
|
{
|
|
vec3 lightDir = normalize(vec3(-1.,-0.5,-2.));
|
|
|
|
float lightAttenuation = dot(-lightDir, vertexNormal) * 0.5 + 0.5;
|
|
|
|
fragColor = vec4(vertexColor * lightAttenuation, 1.);
|
|
}
|