Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl b/source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl
index b190d834a61..82a483d91a5 100644
--- a/source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl
+++ b/source/blender/draw/modes/shaders/armature_shape_outline_vert.glsl
@@ -22,31 +22,31 @@ out vec4 vColSize;
/* project to screen space */
vec2 proj(vec4 pos)
{
- return (0.5 * (pos.xy / pos.w) + 0.5) * viewportSize;
+ return (0.5 * (pos.xy / pos.w) + 0.5) * viewportSize;
}
void main()
{
- /* This is slow and run per vertex, but it's still faster than
- * doing it per instance on CPU and sending it on via instance attribute. */
- mat3 NormalMatrix = transpose(inverse(mat3(ViewMatrix * InstanceModelMatrix)));
+ /* This is slow and run per vertex, but it's still faster than
+ * doing it per instance on CPU and sending it on via instance attribute. */
+ mat3 NormalMatrix = transpose(inverse(mat3(ViewMatrix * InstanceModelMatrix)));
- vec4 worldPosition = InstanceModelMatrix * vec4(pos, 1.0);
- vec4 viewpos = ViewMatrix * worldPosition;
+ vec4 worldPosition = InstanceModelMatrix * vec4(pos, 1.0);
+ vec4 viewpos = ViewMatrix * worldPosition;
- vPos = viewpos.xyz;
- pPos = ProjectionMatrix * viewpos;
+ vPos = viewpos.xyz;
+ pPos = ProjectionMatrix * viewpos;
- /* TODO FIX: there is still a problem with this vector
- * when the bone is scaled or in persp mode. But it's
- * barelly visible at the outline corners. */
- ssNor = normalize((NormalMatrix * snor).xy);
+ /* TODO FIX: there is still a problem with this vector
+ * when the bone is scaled or in persp mode. But it's
+ * barelly visible at the outline corners. */
+ ssNor = normalize((NormalMatrix * snor).xy);
- ssPos = proj(pPos);
+ ssPos = proj(pPos);
- vColSize = outlineColorSize;
+ vColSize = outlineColorSize;
#ifdef USE_WORLD_CLIP_PLANES
- world_clip_planes_calc_clip_distance(worldPosition.xyz);
+ world_clip_planes_calc_clip_distance(worldPosition.xyz);
#endif
}