diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-03-10 20:11:20 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-03-10 20:11:25 +0300 |
commit | fa09b900c2fe087bc2e0aae4ca5ef88c51686e80 (patch) | |
tree | 08443898ba8fc5a7fa702f59c73ef1e35e005457 /source | |
parent | 0f1f75178571d9e2644f3b4dd697a5c876bf3ea2 (diff) |
Fix T74625 GPencil: Airbrush doesn't paint anything
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl index cba5a1f80af..93c9fdcecb3 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl @@ -442,7 +442,7 @@ void stroke_vertex() /* Rotation: Encoded as Cos + Sin sign. */ float uv_rot = decode_uvrot(uvrot1); - float rot_sin = sqrt(1.0 - uv_rot * uv_rot) * sign(uv_rot); + float rot_sin = sqrt(max(0.0, 1.0 - uv_rot * uv_rot)) * sign(uv_rot); float rot_cos = abs(uv_rot); x_axis = mat2(rot_cos, -rot_sin, rot_sin, rot_cos) * x_axis; |