Fix uniform set creation error due to null RID
This commit is contained in:
parent
c596369d7a
commit
2df767d31e
1 changed files with 5 additions and 1 deletions
|
@ -2662,7 +2662,11 @@ RID RenderForwardClustered::_setup_sdfgi_render_pass_uniform_set(RID p_albedo_te
|
||||||
RD::Uniform u;
|
RD::Uniform u;
|
||||||
u.binding = 1;
|
u.binding = 1;
|
||||||
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
|
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);
|
uniforms.push_back(u);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue