summaryrefslogtreecommitdiff
path: root/scene/resources/material.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/material.cpp')
-rw-r--r--scene/resources/material.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 2c5634e6ef..7027319554 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -2092,7 +2092,7 @@ RID BaseMaterial3D::get_material_rid_for_2d(bool p_shaded, bool p_transparent, b
}
Ref<StandardMaterial3D> material;
- material.instance();
+ material.instantiate();
material->set_shading_mode(p_shaded ? SHADING_MODE_PER_PIXEL : SHADING_MODE_UNSHADED);
material->set_transparency(p_transparent ? (p_opaque_prepass ? TRANSPARENCY_ALPHA_DEPTH_PRE_PASS : (p_cut_alpha ? TRANSPARENCY_ALPHA_SCISSOR : TRANSPARENCY_ALPHA)) : TRANSPARENCY_DISABLED);