Blender Git Loki

Git Commits -> Revision 09f7c93

Revision 09f7c93 by Jamell Moore (master)
February 17, 2021, 12:40 (GMT)
Fix T80862: Small stroke opacity modulation is best done in the fragment shader

To avoid anti-aliasing artifacts on GPencil strokes that have a size smaller than 1 the thickness
is clamped and the opacity reduced. This was done in vertex shader but this had the side effect
of causing strokes that go from large to small to fade across their lengths.

**Solution**

The opacity modulation has now been moved to the fragment shader as advised by Cl�ment Foucault.

The strokeThickness that was passed to the shader was clamped to prevent it from being too small so an additional
unclamped thickness has been passed to the fragment to calculate the opacity modulation. Alternatively I could have chosen
strokeThickness and clampedThickness but I decided against renaming the variables in the current code.


Reviewed By: fclem

Differential Revision: https://developer.blender.org/D10438

Commit Details:

Full Hash: 09f7c93858297ab8beafc9cf9bfa06f7d8e68ea6
Parent Commit: 55a69d5
Committed By: Antonio Vazquez
Lines Changed: +21, -10

2 Modified Paths:

/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl (+18, -10) (Diff)
/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl (+3, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021