You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Fix the uniform set creation of multimesh with a invalidated buffer
This commit is contained in:
@@ -615,6 +615,9 @@ public:
|
||||
_FORCE_INLINE_ RID multimesh_get_3d_uniform_set(RID p_multimesh, RID p_shader, uint32_t p_set) const {
|
||||
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
||||
if (!multimesh->uniform_set_3d.is_valid()) {
|
||||
if (!multimesh->buffer.is_valid()) {
|
||||
return RID();
|
||||
}
|
||||
Vector<RD::Uniform> uniforms;
|
||||
RD::Uniform u;
|
||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
||||
@@ -630,6 +633,9 @@ public:
|
||||
_FORCE_INLINE_ RID multimesh_get_2d_uniform_set(RID p_multimesh, RID p_shader, uint32_t p_set) const {
|
||||
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
||||
if (!multimesh->uniform_set_2d.is_valid()) {
|
||||
if (!multimesh->buffer.is_valid()) {
|
||||
return RID();
|
||||
}
|
||||
Vector<RD::Uniform> uniforms;
|
||||
RD::Uniform u;
|
||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
||||
|
||||
Reference in New Issue
Block a user