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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Rood <dev@lucarood.com>2017-05-03 19:55:40 +0300
committerLuca Rood <dev@lucarood.com>2017-05-03 19:57:35 +0300
commit20f95de6ba2d32dcff553251ff4de2efd5b76955 (patch)
tree3249c645c766757e18f6231afe4e90ad76b996bb /source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl
parentb9451c04931d228161c1fb212c6c7a09545a86b7 (diff)
Weight painting with draw manager
This implements weight rendering with the draw manager, with all drawing options (Shading, wire, face masking, vertex masking). This is part of T51208 Reviewers: campbellbarton Subscribers: dfelinto Differential Revision: https://developer.blender.org/D2654
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl b/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl
new file mode 100644
index 00000000000..6b13f408c84
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl
@@ -0,0 +1,14 @@
+
+uniform vec3 light;
+uniform float alpha;
+uniform float global;
+
+in vec3 normal;
+in vec4 finalColor;
+out vec4 fragColor;
+
+void main()
+{
+ fragColor = finalColor * (global + (1.0 - global) * max(0.0, dot(normalize(normal), light)));
+ fragColor.a = alpha;
+}