Merge pull request #49547 from reduz/fix-voxelgi
Fix VoxelGI (works again).
This commit is contained in:
commit
6feae6d219
@ -3498,12 +3498,10 @@ void RendererSceneRenderRD::_pre_opaque_render(RenderDataRD *p_render_data, bool
|
||||
if (p_render_data->render_buffers.is_valid() && p_use_gi) {
|
||||
RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
|
||||
ERR_FAIL_COND(rb == nullptr);
|
||||
if (rb->sdfgi == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rb->sdfgi != nullptr) {
|
||||
rb->sdfgi->store_probes();
|
||||
}
|
||||
}
|
||||
|
||||
render_state.cube_shadows.clear();
|
||||
render_state.shadows.clear();
|
||||
@ -3730,17 +3728,18 @@ void RendererSceneRenderRD::render_scene(RID p_render_buffers, const Transform3D
|
||||
current_cluster_builder = nullptr;
|
||||
}
|
||||
|
||||
if (rb != nullptr && rb->sdfgi != nullptr) {
|
||||
rb->sdfgi->update_cascades();
|
||||
render_state.voxel_gi_count = 0;
|
||||
|
||||
if (rb != nullptr) {
|
||||
if (rb->sdfgi) {
|
||||
rb->sdfgi->update_cascades();
|
||||
rb->sdfgi->pre_process_gi(p_cam_transform, &render_data, this);
|
||||
rb->sdfgi->update_light();
|
||||
}
|
||||
|
||||
render_state.voxel_gi_count = 0;
|
||||
if (rb != nullptr && rb->sdfgi != nullptr) {
|
||||
if (p_voxel_gi_instances.size()) {
|
||||
gi.setup_voxel_gi_instances(render_data.render_buffers, render_data.cam_transform, *render_data.voxel_gi_instances, render_state.voxel_gi_count, this);
|
||||
|
||||
rb->sdfgi->update_light();
|
||||
}
|
||||
}
|
||||
|
||||
render_state.depth_prepass_used = false;
|
||||
|
Loading…
Reference in New Issue
Block a user