[Bf-blender-cvs] [192719bdca3] temp-vulkan-shader: Don't make a local variable to load the WorldClipPlanes.
Jeroen Bakker
noreply at git.blender.org
Mon Dec 12 12:21:26 CET 2022
Commit: 192719bdca3833120062f6844e61b963dddcbf95
Author: Jeroen Bakker
Date: Mon Dec 12 12:21:05 2022 +0100
Branches: temp-vulkan-shader
https://developer.blender.org/rB192719bdca3833120062f6844e61b963dddcbf95
Don't make a local variable to load the WorldClipPlanes.
===================================================================
M source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl
===================================================================
diff --git a/source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl b/source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl
index 110bfe4148e..35f1c7a2427 100644
--- a/source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl
@@ -10,15 +10,14 @@ uniform vec4 WorldClipPlanes[6];
void world_clip_planes_calc_clip_distance(vec3 wpos)
{
- vec4 clip_planes[6] = WorldClipPlanes;
vec4 pos = vec4(wpos, 1.0);
- gl_ClipDistance[0] = dot(clip_planes[0], pos);
- gl_ClipDistance[1] = dot(clip_planes[1], pos);
- gl_ClipDistance[2] = dot(clip_planes[2], pos);
- gl_ClipDistance[3] = dot(clip_planes[3], pos);
- gl_ClipDistance[4] = dot(clip_planes[4], pos);
- gl_ClipDistance[5] = dot(clip_planes[5], pos);
+ gl_ClipDistance[0] = dot(WorldClipPlanes[0], pos);
+ gl_ClipDistance[1] = dot(WorldClipPlanes[1], pos);
+ gl_ClipDistance[2] = dot(WorldClipPlanes[2], pos);
+ gl_ClipDistance[3] = dot(WorldClipPlanes[3], pos);
+ gl_ClipDistance[4] = dot(WorldClipPlanes[4], pos);
+ gl_ClipDistance[5] = dot(WorldClipPlanes[5], pos);
}
# endif
More information about the Bf-blender-cvs
mailing list