This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl

17 lines
253 B
GLSL
Raw Normal View History

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));
}