Fix #135539: Grease Pencil: Depth placement not working in rendered mode
The issue was happening because the `is_render_depth_available` state flag was false leading to the depths being cleared. When we use `is_depth_only_drawing`, we expect that the depth is valid because the Grease Pencil engine will write them. Pull Request: https://projects.blender.org/blender/blender/pulls/135619
This commit is contained in:
@@ -66,6 +66,10 @@ void Instance::init()
|
||||
(BKE_scene_uses_blender_eevee(state.scene) &&
|
||||
BKE_render_preview_pixel_size(&state.scene->r) == 1);
|
||||
|
||||
/* For depth only drawing, no other render engine is expected. Except for Grease Pencil which
|
||||
* outputs valid depth. Otherwise depth is cleared and is valid. */
|
||||
state.is_render_depth_available |= state.is_depth_only_drawing;
|
||||
|
||||
if (!state.hide_overlays) {
|
||||
state.overlay = state.v3d->overlay;
|
||||
state.v3d_flag = state.v3d->flag;
|
||||
|
||||
Reference in New Issue
Block a user