diff options
author | Luca Rood <dev@lucarood.com> | 2017-05-19 19:01:24 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-05-19 19:01:24 +0300 |
commit | 521886060738885427b8346812b7fcccf7057db6 (patch) | |
tree | 006b4ea406f58069b86260a73806e5249cd0a0fb /source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl | |
parent | 42804d49b54a4522423849c402b6d55521b18512 (diff) |
Fix issue with alpha layering for AA dot drawing
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl index 83bdc66c4a0..eae5ee633ae 100644 --- a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl @@ -26,6 +26,11 @@ void main() { fragColor.rgb = outlineColor.rgb; fragColor.a = mix(outlineColor.a, 0.0, smoothstep(radii[1], radii[0], dist)); } - else + else { fragColor = mix(color, outlineColor, smoothstep(radii[3], radii[2], dist)); + } + + if (fragColor.a == 0.0) { + discard; + } } |