diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-03-11 18:10:03 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-03-11 19:15:40 +0300 |
commit | e29e63c0bab4b2beae40bc1faa9dd4f2bb12fc28 (patch) | |
tree | 98bc4564892e398b7b8a7eb78e9c5c1e38d0b748 /source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl | |
parent | b90a61917ae938fa97ec0f1fffeeef467620097c (diff) |
OpenGL: Convert drawobject.c (cont)
Particle system (not edit mode)
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl new file mode 100644 index 00000000000..260539f76d7 --- /dev/null +++ b/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl @@ -0,0 +1,17 @@ + +uniform vec3 light; + +#if __VERSION__ == 120 + varying vec3 normal; + varying vec4 finalColor; + #define fragColor gl_FragColor +#else + in vec3 normal; + in vec4 finalColor; + out vec4 fragColor; +#endif + +void main() +{ + fragColor = finalColor * max(0.0, dot(normalize(normal), light)); +} |