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_envelope_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_envelope_solid_vert.glsl')
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/armature_envelope_solid_vert.glsl | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/armature_envelope_solid_vert.glsl b/source/blender/draw/engines/overlay/shaders/armature_envelope_solid_vert.glsl index 620b3f2527c..2dd86a57dfd 100644 --- a/source/blender/draw/engines/overlay/shaders/armature_envelope_solid_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/armature_envelope_solid_vert.glsl @@ -1,18 +1,6 @@ -/* ---- Instantiated Attrs ---- */ -in vec3 pos; - -/* ---- Per instance Attrs ---- */ -/* Assumed to be in world coordinate already. */ -in vec4 headSphere; -in vec4 tailSphere; -in vec3 xAxis; -in vec3 stateColor; -in vec3 boneColor; - -flat out vec3 finalStateColor; -flat out vec3 finalBoneColor; -out vec3 normalView; +#pragma BLENDER_REQUIRE(common_view_clipping_lib.glsl) +#pragma BLENDER_REQUIRE(common_view_lib.glsl) void main() { @@ -47,9 +35,8 @@ void main() finalStateColor = stateColor; finalBoneColor = boneColor; + view_clipping_distances(sp); + vec4 pos_4d = vec4(sp, 1.0); gl_Position = ViewProjectionMatrix * pos_4d; -#ifdef USE_WORLD_CLIP_PLANES - world_clip_planes_calc_clip_distance(pos_4d.xyz); -#endif } |