[Bf-blender-cvs] [24a64cb4147] blender2.8: Fix shadow shader to support core profile.

Bastien Montagne noreply at git.blender.org
Tue May 9 16:31:08 CEST 2017


Commit: 24a64cb41479bf1ac191d830bf5b22a0c97402cc
Author: Bastien Montagne
Date:   Tue May 9 16:29:48 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB24a64cb41479bf1ac191d830bf5b22a0c97402cc

Fix shadow shader to support core profile.

===================================================================

M	source/blender/gpu/shaders/gpu_shader_material.glsl

===================================================================

diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 5346af0cbb6..e09423c2935 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -2281,7 +2281,11 @@ void test_shadowbuf(
 		co.z -= shadowbias * co.w;
 
 		if (co.w > 0.0 && co.x > 0.0 && co.x / co.w < 1.0 && co.y > 0.0 && co.y / co.w < 1.0)
+#if __VERSION__ == 120
 			result = shadow2DProj(shadowmap, co).x;
+#else
+			result = textureProj(shadowmap, co);
+#endif
 		else
 			result = 1.0;
 	}




More information about the Bf-blender-cvs mailing list