diff options
author | Yuri Rubinsky <chaosus89@gmail.com> | 2023-01-29 12:14:22 +0300 |
---|---|---|
committer | Yuri Rubinsky <chaosus89@gmail.com> | 2023-02-21 11:23:17 +0300 |
commit | 94831c7209334ea036dec8edbd235b34453083e2 (patch) | |
tree | e1756a8f6a6a4e83a1a40b04c778887428518ffa /servers/rendering/renderer_rd/forward_clustered | |
parent | 6cde3fac328e97e66b1c12d386deb25af395e215 (diff) |
Forbid passing multiview sampler to the custom function in shaders
Diffstat (limited to 'servers/rendering/renderer_rd/forward_clustered')
-rw-r--r-- | servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp index 3b3979b198..ff180b5465 100644 --- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp @@ -504,7 +504,7 @@ void SceneShaderForwardClustered::init(const String p_defines) { shader.initialize(shader_versions, p_defines); - if (!RendererCompositorRD::singleton->is_xr_enabled()) { + if (!RendererCompositorRD::get_singleton()->is_xr_enabled()) { shader.set_variant_enabled(SHADER_VERSION_DEPTH_PASS_MULTIVIEW, false); shader.set_variant_enabled(SHADER_VERSION_DEPTH_PASS_WITH_NORMAL_AND_ROUGHNESS_MULTIVIEW, false); shader.set_variant_enabled(SHADER_VERSION_DEPTH_PASS_WITH_NORMAL_AND_ROUGHNESS_AND_VOXEL_GI_MULTIVIEW, false); @@ -730,7 +730,7 @@ void SceneShaderForwardClustered::init(const String p_defines) { actions.global_buffer_array_variable = "global_shader_uniforms.data"; actions.instance_uniform_index_variable = "instances.data[instance_index_interp].instance_uniforms_ofs"; - actions.check_multiview_samplers = true; // make sure we check sampling multiview textures + actions.check_multiview_samplers = RendererCompositorRD::get_singleton()->is_xr_enabled(); // Make sure we check sampling multiview textures. compiler.initialize(actions); } |