Fix reflection probe

This commit is contained in:
Bastiaan Olij 2021-04-20 23:59:46 +10:00
parent aa677865e3
commit ebf10fe736
5 changed files with 17 additions and 7 deletions

View file

@ -2891,8 +2891,15 @@ bool RendererSceneCull::_render_reflection_probe_step(Instance *p_instance, int
shadow_atlas = scenario->reflection_probe_shadow_atlas;
}
RID environment;
if (scenario->environment.is_valid()) {
environment = scenario->environment;
} else {
environment = scenario->fallback_environment;
}
RENDER_TIMESTAMP("Render Reflection Probe, Step " + itos(p_step));
_render_scene(xform, cm, false, false, RID(), RID(), RID(), RSG::storage->reflection_probe_get_cull_mask(p_instance->base), p_instance->scenario->self, shadow_atlas, reflection_probe->instance, p_step, lod_threshold, use_shadows);
_render_scene(xform, cm, false, false, RID(), environment, RID(), RSG::storage->reflection_probe_get_cull_mask(p_instance->base), p_instance->scenario->self, shadow_atlas, reflection_probe->instance, p_step, lod_threshold, use_shadows);
} else {
//do roughness postprocess step until it believes it's done