File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ Ref<Material> Material::get_next_pass() const {
6464void Material::set_render_priority (int p_priority) {
6565 ERR_FAIL_COND (p_priority < RENDER_PRIORITY_MIN);
6666 ERR_FAIL_COND (p_priority > RENDER_PRIORITY_MAX);
67+
6768 render_priority = p_priority;
6869
6970 if (material.is_valid ()) {
@@ -3220,6 +3221,11 @@ void BaseMaterial3D::set_stencil_mode(StencilMode p_stencil_mode) {
32203221 return ;
32213222 }
32223223
3224+ if (p_stencil_mode == StencilMode::STENCIL_MODE_OUTLINE || p_stencil_mode == StencilMode::STENCIL_MODE_XRAY) {
3225+ ERR_FAIL_COND_EDMSG (get_render_priority () >= RENDER_PRIORITY_MAX,
3226+ vformat (" Cannot use stencil mode Outline or Xray, when render priority is RENDER_PRIORITY_MAX(%d)." , RENDER_PRIORITY_MAX));
3227+ }
3228+
32233229 stencil_mode = p_stencil_mode;
32243230 _prepare_stencil_effect ();
32253231 _queue_shader_change ();
You can’t perform that action at this time.
0 commit comments