Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_simple_lighting_frag.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9828787fb049190e9d6e12f03b46aece5823211d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

uniform vec4 color;
uniform vec3 light;

#if __VERSION__ == 120
  varying vec3 normal;
  #define fragColor gl_FragColor
#else
  in vec3 normal;
  out vec4 fragColor;
#endif

void main()
{
	fragColor = color * max(0.0, dot(normalize(normal), light));
}