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/gpu/shaders/gpu_shader_point_varying_color_frag.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl
index 119189ad29b..23e9f9bc20f 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl
@@ -3,6 +3,10 @@ in vec4 finalColor;
out vec4 fragColor;
#endif
+#if defined(VERT)
+in float vertexCrease;
+#endif
+
void main()
{
vec2 centered = gl_PointCoord - vec2(0.5);
@@ -14,5 +18,14 @@ void main()
discard;
}
+#if defined(VERT)
+ fragColor = finalColor;
+
+ float midStroke = 0.5 * rad_squared;
+ if (vertexCrease > 0.0 && dist_squared > midStroke) {
+ fragColor.rgb = mix(finalColor.rgb, colorEdgeCrease.rgb, vertexCrease);
+ }
+#else
fragColor = finalColor;
+#endif
}