diff options
-rw-r--r-- | intern/gawain/gawain/gwn_shader_interface.h | 1 | ||||
-rw-r--r-- | intern/gawain/src/gwn_shader_interface.c | 1 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lightprobes.c | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 2 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 6 |
5 files changed, 5 insertions, 7 deletions
diff --git a/intern/gawain/gawain/gwn_shader_interface.h b/intern/gawain/gawain/gwn_shader_interface.h index 3bca541d6e8..3be2831e539 100644 --- a/intern/gawain/gawain/gwn_shader_interface.h +++ b/intern/gawain/gawain/gwn_shader_interface.h @@ -33,7 +33,6 @@ typedef enum { GWN_UNIFORM_WORLDNORMAL, // mat3 WorldNormalMatrix GWN_UNIFORM_CAMERATEXCO, // vec4 CameraTexCoFactors GWN_UNIFORM_ORCO, // vec3 OrcoTexCoFactors[] - GWN_UNIFORM_CLIPPLANES, // vec4 ClipPlanes[] GWN_UNIFORM_COLOR, // vec4 color GWN_UNIFORM_EYE, // vec3 eye diff --git a/intern/gawain/src/gwn_shader_interface.c b/intern/gawain/src/gwn_shader_interface.c index d48cb7d2559..e92cabec12f 100644 --- a/intern/gawain/src/gwn_shader_interface.c +++ b/intern/gawain/src/gwn_shader_interface.c @@ -45,7 +45,6 @@ static const char* BuiltinUniform_name(Gwn_UniformBuiltin u) [GWN_UNIFORM_WORLDNORMAL] = "WorldNormalMatrix", [GWN_UNIFORM_CAMERATEXCO] = "CameraTexCoFactors", [GWN_UNIFORM_ORCO] = "OrcoTexCoFactors", - [GWN_UNIFORM_CLIPPLANES] = "ClipPlanes", [GWN_UNIFORM_COLOR] = "color", [GWN_UNIFORM_EYE] = "eye", diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c index 81036b3f4e2..229f4d45606 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.c +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c @@ -1294,7 +1294,7 @@ static void render_scene_to_planar( * to invert the facing for backface culling to be the same. */ DRW_state_invert_facing(); - DRW_state_clip_planes_add(ped->planer_eq_offset); + DRW_state_clip_planes_count_set(1); /* Attach depth here since it's a DRW_TEX_TEMP */ DRW_framebuffer_texture_layer_attach(fbl->planarref_fb, txl->planar_depth, 0, layer, 0); diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 7a8fc5ff3c1..cca08f8da9b 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -480,7 +480,7 @@ void DRW_state_lock(DRWState state); void DRW_state_invert_facing(void); -void DRW_state_clip_planes_add(float plane_eq[4]); +void DRW_state_clip_planes_count_set(unsigned int plane_ct); void DRW_state_clip_planes_reset(void); /* Culling, return true if object is inside view frustum. */ diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 49bb9f114a7..f53631e7e54 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -366,10 +366,10 @@ void DRW_state_invert_facing(void) * and if the shaders have support for it (see usage of gl_ClipDistance). * Be sure to call DRW_state_clip_planes_reset() after you finish drawing. **/ -void DRW_state_clip_planes_add(float plane_eq[4]) +void DRW_state_clip_planes_count_set(unsigned int plane_ct) { - BLI_assert(DST.num_clip_planes < MAX_CLIP_PLANES-1); - // copy_v4_v4(DST.view_data.clip_planes_eq[DST.num_clip_planes++], plane_eq); + BLI_assert(plane_ct <= MAX_CLIP_PLANES); + DST.num_clip_planes = plane_ct; } void DRW_state_clip_planes_reset(void) |