Blender Git Loki

Git Commits -> Revision aa0ac00

Revision aa0ac00 by Germano Cavalcante (master)
November 3, 2021, 15:10 (GMT)
GPencil and Annotation: Use cached depth to perform depth testing operations

Operations such as erasing with occlusion and drawing on the surface
require reading the depth buffer.

However, this is being done with minimal efficiency.

Currently, to read the depth corresponding to each point of the new stroke,
a ReadPixel is called to send a message to the GPU and read the depth of
the corresponding pixel in the VRAM.

The communication between GPU and CPU is known to be a slow operation so
it is good to be avoided.

Therefore, save the entire depth buffer in a cache to be read directly
from the RAM.

(Also the `ED_view3d_autodist_depth` and `ED_view3d_autodist_depth_seg` have
been removed since they are no longer used).

Reviewed By: antoniov, fclem

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

Commit Details:

Full Hash: aa0ac0035a0d3601672a0c732e3f8f932a36fc04
Parent Commit: 8b516d8
Lines Changed: +65, -42

8 Modified Paths:

/source/blender/editors/gpencil/annotate_paint.c (+15, -5) (Diff)
/source/blender/editors/gpencil/gpencil_fill.c (+12, -6) (Diff)
/source/blender/editors/gpencil/gpencil_intern.h (+2, -0) (Diff)
/source/blender/editors/gpencil/gpencil_paint.c (+15, -5) (Diff)
/source/blender/editors/gpencil/gpencil_primitive.c (+10, -4) (Diff)
/source/blender/editors/gpencil/gpencil_utils.c (+1, -1) (Diff)
/source/blender/editors/include/ED_view3d.h (+2, -6) (Diff)
/source/blender/editors/space_view3d/view3d_utils.c (+8, -15) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021