diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_3D_polyline_frag.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_3D_polyline_frag.glsl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_polyline_frag.glsl b/source/blender/gpu/shaders/gpu_shader_3D_polyline_frag.glsl index 9c6b109d659..3ea8f7dbfbe 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_polyline_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_polyline_frag.glsl @@ -1,5 +1,6 @@ uniform float lineWidth; +uniform bool lineSmooth = true; in vec4 finalColor; noperspective in float smoothline; @@ -19,6 +20,8 @@ void main() } #endif fragColor = finalColor; - fragColor.a *= clamp((lineWidth + SMOOTH_WIDTH) * 0.5 - abs(smoothline), 0.0, 1.0); + if (lineSmooth) { + fragColor.a *= clamp((lineWidth + SMOOTH_WIDTH) * 0.5 - abs(smoothline), 0.0, 1.0); + } fragColor = blender_srgb_to_framebuffer_space(fragColor); } |