Merge pull request #69091 from CherrySodaPop/vr-texel-zero-division

Fix VRS object being created even when not supported
This commit is contained in:
Rémi Verschelde 2022-12-07 13:26:08 +01:00
commit ce5464cb42
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1419,10 +1419,13 @@ void RendererSceneRenderRD::init() {
cull_argument.set_page_pool(&cull_argument_pool);
bool can_use_storage = _render_buffers_can_be_storage();
bool can_use_vrs = is_vrs_supported();
bokeh_dof = memnew(RendererRD::BokehDOF(!can_use_storage));
copy_effects = memnew(RendererRD::CopyEffects(!can_use_storage));
tone_mapper = memnew(RendererRD::ToneMapper);
vrs = memnew(RendererRD::VRS);
if (can_use_vrs) {
vrs = memnew(RendererRD::VRS);
}
if (can_use_storage) {
fsr = memnew(RendererRD::FSR);
}