diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-17 16:45:22 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-17 16:46:32 +0300 |
commit | 9d3f35a0bf1bf5776363bfd61d53a7c85b5827a4 (patch) | |
tree | 595fe492f09aea9f97049339385f7966ac02f0e1 /source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl | |
parent | edee5a947b7ea3e1324aa334a22c7c9bbf47f5f7 (diff) |
Revert "Revert "GPUShaderCreateInfo for interface abstraction""
This reverts commit edee5a947b7ea3e1324aa334a22c7c9bbf47f5f7.
Fixes compilation error (Missing file BLI_float2.hh)
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl | 6 |
1 files changed, 6 insertions, 0 deletions
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 46cf2fe09a2..cdc716db7a4 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 @@ -1,7 +1,9 @@ #ifdef USE_WORLD_CLIP_PLANES # if defined(GPU_VERTEX_SHADER) || defined(GPU_GEOMETRY_SHADER) +# ifndef USE_GPU_SHADER_CREATE_INFO uniform vec4 WorldClipPlanes[6]; +# endif # define _world_clip_planes_calc_clip_distance(wpos, _clipplanes) \ { \ @@ -14,6 +16,10 @@ uniform vec4 WorldClipPlanes[6]; gl_ClipDistance[5] = dot(_clipplanes[5], pos); \ } +/* When all shaders are builtin shaders are migrated this could be applied directly. */ +# ifdef USE_GPU_SHADER_CREATE_INFO +# define WorldClipPlanes clipPlanes.world +# endif /* HACK Dirty hack to be able to override the definition in common_view_lib.glsl. * Not doing this would require changing the include order in every shaders. */ # define world_clip_planes_calc_clip_distance(wpos) \ |