Fixed error spam when XR mode is not enabled and a missed setting rename

This commit is contained in:
Bastiaan Olij 2021-06-14 11:05:16 +10:00
parent 12e0f10c74
commit 3eae812331
3 changed files with 14 additions and 6 deletions

View File

@ -520,9 +520,9 @@ TypedArray<String> XROrigin3D::get_configuration_warnings() const {
} }
} }
bool vr_enabled = GLOBAL_GET("rendering/vr/enabled"); bool xr_enabled = GLOBAL_GET("rendering/xr/enabled");
if (!vr_enabled) { if (!xr_enabled) {
warnings.push_back(TTR("VR is not enabled in rendering project settings. Stereoscopic output is not supported unless this is enabled.")); warnings.push_back(TTR("XR is not enabled in rendering project settings. Stereoscopic output is not supported unless this is enabled."));
} }
return warnings; return warnings;

View File

@ -1580,7 +1580,11 @@ EffectsRD::EffectsRD() {
tonemap.shader_version = tonemap.shader.version_create(); tonemap.shader_version = tonemap.shader.version_create();
for (int i = 0; i < TONEMAP_MODE_MAX; i++) { for (int i = 0; i < TONEMAP_MODE_MAX; i++) {
if (tonemap.shader.is_variant_enabled(i)) {
tonemap.pipelines[i].setup(tonemap.shader.version_get_shader(tonemap.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), RD::PipelineColorBlendState::create_disabled(), 0); tonemap.pipelines[i].setup(tonemap.shader.version_get_shader(tonemap.shader_version, i), RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), RD::PipelineDepthStencilState(), RD::PipelineColorBlendState::create_disabled(), 0);
} else {
tonemap.pipelines[i].clear();
}
} }
} }

View File

@ -127,8 +127,12 @@ void RendererSceneSkyRD::SkyShaderData::set_code(const String &p_code) {
depth_stencil_state.enable_depth_test = true; depth_stencil_state.enable_depth_test = true;
depth_stencil_state.depth_compare_operator = RD::COMPARE_OP_LESS_OR_EQUAL; depth_stencil_state.depth_compare_operator = RD::COMPARE_OP_LESS_OR_EQUAL;
if (scene_singleton->sky.sky_shader.shader.is_variant_enabled(i)) {
RID shader_variant = scene_singleton->sky.sky_shader.shader.version_get_shader(version, i); RID shader_variant = scene_singleton->sky.sky_shader.shader.version_get_shader(version, i);
pipelines[i].setup(shader_variant, RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), depth_stencil_state, RD::PipelineColorBlendState::create_disabled(), 0); pipelines[i].setup(shader_variant, RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), depth_stencil_state, RD::PipelineColorBlendState::create_disabled(), 0);
} else {
pipelines[i].clear();
}
} }
valid = true; valid = true;