Skip to content

Commit 8ce3011

Browse files
committed
Fixed stencil preset priorities
1 parent 4e6ac9b commit 8ce3011

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scene/resources/material.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,7 +3167,7 @@ void BaseMaterial3D::_prepare_stencil_effect() {
31673167
case STENCIL_MODE_OUTLINE:
31683168
set_stencil_flags(STENCIL_FLAG_WRITE);
31693169
set_stencil_compare(STENCIL_COMPARE_ALWAYS);
3170-
stencil_next_pass->set_render_priority(-1);
3170+
stencil_next_pass->set_render_priority(get_render_priority() + 1);
31713171
stencil_next_pass->set_shading_mode(SHADING_MODE_UNSHADED);
31723172
stencil_next_pass->set_transparency(TRANSPARENCY_ALPHA);
31733173
stencil_next_pass->set_flag(FLAG_DISABLE_DEPTH_TEST, false);
@@ -3182,7 +3182,7 @@ void BaseMaterial3D::_prepare_stencil_effect() {
31823182
case STENCIL_MODE_XRAY:
31833183
set_stencil_flags(STENCIL_FLAG_WRITE);
31843184
set_stencil_compare(STENCIL_COMPARE_ALWAYS);
3185-
stencil_next_pass->set_render_priority(-1);
3185+
stencil_next_pass->set_render_priority(get_render_priority() + 1);
31863186
stencil_next_pass->set_shading_mode(SHADING_MODE_UNSHADED);
31873187
stencil_next_pass->set_transparency(TRANSPARENCY_ALPHA);
31883188
stencil_next_pass->set_flag(FLAG_DISABLE_DEPTH_TEST, true);

0 commit comments

Comments
 (0)