diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 39b3acfe3fa..461dbbec2fa 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -3079,6 +3079,8 @@ BaseMaterial3D::BaseMaterial3D(bool p_orm) : flags[FLAG_ALBEDO_TEXTURE_MSDF] = false; flags[FLAG_USE_TEXTURE_REPEAT] = true; + current_key.invalid_key = 1; + _mark_initialized(callable_mp(this, &BaseMaterial3D::_queue_shader_change)); } diff --git a/scene/resources/material.h b/scene/resources/material.h index 8cd583c709e..a631f775988 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -325,6 +325,7 @@ private: uint64_t emission_op : get_num_bits(EMISSION_OP_MAX - 1); uint64_t distance_fade : get_num_bits(DISTANCE_FADE_MAX - 1); // booleans + uint64_t invalid_key : 1; uint64_t deep_parallax : 1; uint64_t grow : 1; uint64_t proximity_fade : 1;