Refactor: Use DRW_STATE_NO_DRAW for depth merge pass

The grease pencil depth pass merge pass is currently an image store
shader with no fragment output, yet it uses DRW_STATE_WRITE_COLOR,
causing asserts, so instead, we use DRW_STATE_NO_DRAW.

Pull Request: https://projects.blender.org/blender/blender/pulls/162074
This commit is contained in:
Omar Emara 2026-07-29 14:41:03 +02:00 • committed by Omar Emara
parent e6a859d7b3
commit a82fb9c3ff

View file

@ -250,7 +250,7 @@ void Instance::begin_sync()
/* Merges the object's depth to the viewport compositor depth pass. */
PassSimple &pass = this->merge_depth_pass_ps;
pass.init();
pass.state_set(DRW_STATE_WRITE_COLOR);
pass.state_set(DRW_STATE_NO_DRAW);
pass.shader_set(ShaderCache::get().depth_pass_merge.get());
pass.bind_texture("depth_buf", &this->depth_tx);
pass.bind_image("depth_pass_img", &this->depth_pass_img);