This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
Clément Foucault 6dbc6dfc14 Clay Engine: Prepare for Armature drawing.
- Added runtime display matrices to EditBone and bPoseChannel
- Added Object space instance vertex shader and modified the simple lighting shader accordingly
2017-02-22 12:46:27 +01:00

26 lines
434 B
GLSL

#ifndef USE_INSTANCE_COLOR
uniform vec4 color;
#endif
uniform vec3 light;
#if __VERSION__ == 120
varying vec3 normal;
#ifdef USE_INSTANCE_COLOR
varying vec4 finalColor;
#endif
#define fragColor gl_FragColor
#else
in vec3 normal;
#ifdef USE_INSTANCE_COLOR
flat in vec4 finalColor;
#define color finalColor
#endif
out vec4 fragColor;
#endif
void main()
{
fragColor = color * max(0.0, dot(normalize(normal), light));
}