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:
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl17
1 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl b/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
index 6725bc82841..6bce517fee3 100644
--- a/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_simple_lighting_frag.glsl
@@ -1,19 +1,18 @@
-#ifndef USE_GPU_SHADER_CREATE_INFO
-# ifndef USE_INSTANCE_COLOR
+
+#ifndef USE_INSTANCE_COLOR
uniform vec4 color;
-# endif
+#endif
uniform vec3 light;
in vec3 normal;
-# ifdef USE_INSTANCE_COLOR
+#ifdef USE_INSTANCE_COLOR
flat in vec4 finalColor;
-# define color finalColor
-# endif
-out vec4 fragColor;
+# define color finalColor
#endif
+out vec4 fragColor;
void main()
{
- fragColor = simple_lighting_data.color;
- fragColor.xyz *= clamp(dot(normalize(normal), simple_lighting_data.light), 0.0, 1.0);
+ fragColor = color;
+ fragColor.xyz *= clamp(dot(normalize(normal), light), 0.0, 1.0);
}