diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-03-29 11:49:49 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-03-30 16:50:06 +0300 |
commit | 9b9fda2122ae38ae6f92f31a21674c55a5a52295 (patch) | |
tree | 31ac693fb868361006222922baed899c072860f5 /source/blender/draw/engines/overlay/shaders/armature_sphere_solid_vert.glsl | |
parent | 883326040ec20a8289e619446147792f62e6aa32 (diff) |
Overlay: Port Armature shader to ShaderCreateInfo
Should have no regression.
Diffstat (limited to 'source/blender/draw/engines/overlay/shaders/armature_sphere_solid_vert.glsl')
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/armature_sphere_solid_vert.glsl | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/armature_sphere_solid_vert.glsl b/source/blender/draw/engines/overlay/shaders/armature_sphere_solid_vert.glsl index e6fa29ce851..abbaad8cd10 100644 --- a/source/blender/draw/engines/overlay/shaders/armature_sphere_solid_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/armature_sphere_solid_vert.glsl @@ -1,15 +1,6 @@ -/* ---- Instantiated Attrs ---- */ -in vec2 pos; - -/* ---- Per instance Attrs ---- */ -in vec4 color; -in mat4 inst_obmat; - -flat out vec3 finalStateColor; -flat out vec3 finalBoneColor; -flat out mat4 sphereMatrix; -out vec3 viewPosition; +#pragma BLENDER_REQUIRE(common_view_clipping_lib.glsl) +#pragma BLENDER_REQUIRE(common_view_lib.glsl) /* Sphere radius */ const float rad = 0.05; @@ -80,8 +71,6 @@ void main() finalStateColor = state_color.xyz; finalBoneColor = bone_color.xyz; -#ifdef USE_WORLD_CLIP_PLANES - vec4 worldPosition = model_mat * pos_4d; - world_clip_planes_calc_clip_distance(worldPosition.xyz); -#endif + vec4 world_pos = model_mat * pos_4d; + view_clipping_distances(world_pos.xyz); } |