Check if VRS is supported on creating VRS object

This commit is contained in:
Lily Garcia 2022-11-25 19:10:31 -05:00 committed by Rémi Verschelde
parent c241f1c523
commit e328a0bcf8
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); cull_argument.set_page_pool(&cull_argument_pool);
bool can_use_storage = _render_buffers_can_be_storage(); bool can_use_storage = _render_buffers_can_be_storage();
bool can_use_vrs = is_vrs_supported();
bokeh_dof = memnew(RendererRD::BokehDOF(!can_use_storage)); bokeh_dof = memnew(RendererRD::BokehDOF(!can_use_storage));
copy_effects = memnew(RendererRD::CopyEffects(!can_use_storage)); copy_effects = memnew(RendererRD::CopyEffects(!can_use_storage));
tone_mapper = memnew(RendererRD::ToneMapper); tone_mapper = memnew(RendererRD::ToneMapper);
vrs = memnew(RendererRD::VRS); if (can_use_vrs) {
vrs = memnew(RendererRD::VRS);
}
if (can_use_storage) { if (can_use_storage) {
fsr = memnew(RendererRD::FSR); fsr = memnew(RendererRD::FSR);
} }