Merge pull request #63793 from RandomShaper/fix_unbound_resource

Fix uniform set creation error due to null RID
This commit is contained in:
Rémi Verschelde 2022-08-02 07:10:20 +02:00 committed by GitHub
commit 8de2cc04a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2662,7 +2662,11 @@ RID RenderForwardClustered::_setup_sdfgi_render_pass_uniform_set(RID p_albedo_te
RD::Uniform u;
u.binding = 1;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.append_id(scene_state.instance_buffer[RENDER_LIST_SECONDARY]);
RID instance_buffer = scene_state.instance_buffer[RENDER_LIST_SECONDARY];
if (instance_buffer == RID()) {
instance_buffer = scene_shader.default_vec4_xform_buffer; // any buffer will do since its not used
}
u.append_id(instance_buffer);
uniforms.push_back(u);
}
{