Fix #157328: Grease Pencil: Dot depth problem with placement modes

The problem was that the z value of the dots were not calculated for the
new dot placement modes.

We also pre-divide the homogeneous coordinates before setting the z.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/157498
This commit is contained in:
Casey Bianco-Davis 2026-04-17 13:47:52 +02:00 • committed by Falk David
parent 3581d96afb
commit 107c81827d
7 changed files with 21 additions and 0 deletions

View file

@ -628,6 +628,9 @@ float4 gpencil_vertex(float4 viewport_res,
out_ndc = dot_segment(float2(x, y), ss1, ss2, is_squares, viewport_res);
out_ndc /= out_ndc.w;
out_ndc.z = (use_curr) ? (ndc1.z / ndc1.w) : (ndc2.z / ndc2.w);
out_uv.x = (use_curr) ? uv1.z : uv2.z;
}
else if (is_dot && is_single_dot) {

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea7aa287616bdd25056031e05bd9ae08c7bd62bc5b26b2a67cca36a896feb61f
size 19656

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8067c640bd1282d1a7fddfc009380a8891f229a25329d44b85d2511d9fad4c17
size 15420

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e8bd4e686807714df00399efd09c497bd36ece8821e12cec8f198cec94186dd
size 1964725

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c0a925ecb9d6d7705ade98dd5b4707f6f900895b3bdae8f29c5ae918196ec9ab
size 8123

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba94fae5f2c03af43b37e8b4458255eb15369060d8940f6ed64d7d4df090e975
size 7982

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a0ca41e60d26a67224cf3b3fe389394b66363914e755cc56f20e26011b9a640a
size 12866