1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of VolumetricFog

Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
This commit is contained in:
clayjohn
2021-10-03 04:28:55 -07:00
parent 9307808987
commit 1b2cd9f251
51 changed files with 2979 additions and 777 deletions

View File

@@ -3098,12 +3098,14 @@ void RendererSceneGIRD::setup_voxel_gi_instances(RID p_render_buffers, const Tra
}
rb->gi.uniform_set = RID();
if (rb->volumetric_fog) {
if (RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->uniform_set)) {
RD::get_singleton()->free(rb->volumetric_fog->uniform_set);
RD::get_singleton()->free(rb->volumetric_fog->uniform_set2);
if (RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->fog_uniform_set)) {
RD::get_singleton()->free(rb->volumetric_fog->fog_uniform_set);
RD::get_singleton()->free(rb->volumetric_fog->process_uniform_set);
RD::get_singleton()->free(rb->volumetric_fog->process_uniform_set2);
}
rb->volumetric_fog->uniform_set = RID();
rb->volumetric_fog->uniform_set2 = RID();
rb->volumetric_fog->fog_uniform_set = RID();
rb->volumetric_fog->process_uniform_set = RID();
rb->volumetric_fog->process_uniform_set2 = RID();
}
}