diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-26 22:32:48 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-27 13:58:14 +0300 |
commit | 554af9c6895f772ce5fdeb4aa4172c43b997b669 (patch) | |
tree | 0dd620156f061174a7822c0818a33f01af91fccb /source/blender/draw/modes | |
parent | 577d3498b4d4d3b747e184550378bc7d77e72b60 (diff) |
Cleanup: DRW: Make clipped shader use UBO clip planes
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/shaders/common_view_lib.glsl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/common_view_lib.glsl b/source/blender/draw/modes/shaders/common_view_lib.glsl index 845c615c75c..20a54947db7 100644 --- a/source/blender/draw/modes/shaders/common_view_lib.glsl +++ b/source/blender/draw/modes/shaders/common_view_lib.glsl @@ -1,3 +1,5 @@ +#define COMMON_VIEW_LIB + /* keep in sync with DRWManager.view_data */ layout(std140) uniform viewBlock { @@ -15,6 +17,12 @@ layout(std140) uniform viewBlock vec4 CameraTexCoFactors; }; +#ifdef world_clip_planes_calc_clip_distance +# undef world_clip_planes_calc_clip_distance +# define world_clip_planes_calc_clip_distance(p) \ + _world_clip_planes_calc_clip_distance(p, clipPlanes) +#endif + uniform mat4 ModelMatrix; uniform mat4 ModelMatrixInverse; |