[Bf-blender-cvs] [f87036e] pbr-viewport: the maxz and minz shaders were not being compiled

Dalai Felinto noreply at git.blender.org
Wed Nov 2 19:52:32 CET 2016


Commit: f87036e8a7dfd7c07af6360518cd4293b21a2632
Author: Dalai Felinto
Date:   Wed Nov 2 19:52:11 2016 +0100
Branches: pbr-viewport
https://developer.blender.org/rBf87036e8a7dfd7c07af6360518cd4293b21a2632

the maxz and minz shaders were not being compiled

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

M	source/blender/gpu/intern/gpu_shader.c

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

diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c
index 2434ecf..a638a53 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -887,6 +887,20 @@ GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader)
 				        NULL, NULL, NULL, 0, 0, 0);
 			retval = GG.shaders.point_uniform_size_uniform_color_outline_smooth_3D;
 			break;
+		case GPU_SHADER_MAXZ_DOWNSAMPLE:
+			if (!GG.shaders.maxz_downsample)
+				GG.shaders.maxz_downsample = GPU_shader_create(
+				        datatoc_gpu_shader_downsample_maxz_vert_glsl, datatoc_gpu_shader_downsample_maxz_frag_glsl,
+				        NULL, NULL, NULL, 0, 0, 0);
+			retval = GG.shaders.maxz_downsample;
+			break;
+		case GPU_SHADER_MINZ_DOWNSAMPLE:
+			if (!GG.shaders.minz_downsample)
+				GG.shaders.minz_downsample = GPU_shader_create(
+				        datatoc_gpu_shader_downsample_maxz_vert_glsl, datatoc_gpu_shader_downsample_maxz_frag_glsl,
+				        NULL, NULL, "#define MIN;\n", 0, 0, 0);
+			retval = GG.shaders.minz_downsample;
+			break;
 	}
 
 exit:




More information about the Bf-blender-cvs mailing list