diff options
author | clayjohn <claynjohn@gmail.com> | 2023-11-08 23:26:08 +0100 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2023-11-08 23:26:08 +0100 |
commit | 2b9e6d29725853de3749952ea55c3dc852a69b8d (patch) | |
tree | 4094b1925e1cc10c321497b506106c6f5bfd3fff /servers/rendering/renderer_viewport.cpp | |
parent | e5bacbc4716ce5b54bc2ab8b3053cd5e22ffe446 (diff) | |
download | redot-engine-2b9e6d29725853de3749952ea55c3dc852a69b8d.tar.gz |
Use render pass uniform set to store viewport samplers.
This fixes a bugs where per-viewport samplers were being used for internal texture fetches (probes, sky, etc.).
This also fixes a bug when using multiple viewports in the same scene.
This also fixes a bug where the texture bias would override the bias from 3D scale.
Diffstat (limited to 'servers/rendering/renderer_viewport.cpp')
-rw-r--r-- | servers/rendering/renderer_viewport.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index 6b47c29382..f9f76b9972 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -881,9 +881,7 @@ void RendererViewport::viewport_set_fsr_sharpness(RID p_viewport, float p_sharpn ERR_FAIL_NULL(viewport); viewport->fsr_sharpness = p_sharpness; - if (viewport->render_buffers.is_valid()) { - viewport->render_buffers->set_fsr_sharpness(p_sharpness); - } + _configure_3d_render_buffers(viewport); } void RendererViewport::viewport_set_texture_mipmap_bias(RID p_viewport, float p_mipmap_bias) { @@ -891,9 +889,7 @@ void RendererViewport::viewport_set_texture_mipmap_bias(RID p_viewport, float p_ ERR_FAIL_NULL(viewport); viewport->texture_mipmap_bias = p_mipmap_bias; - if (viewport->render_buffers.is_valid()) { - viewport->render_buffers->set_texture_mipmap_bias(p_mipmap_bias); - } + _configure_3d_render_buffers(viewport); } void RendererViewport::viewport_set_scaling_3d_scale(RID p_viewport, float p_scaling_3d_scale) { @@ -1263,9 +1259,7 @@ void RendererViewport::viewport_set_use_debanding(RID p_viewport, bool p_use_deb return; } viewport->use_debanding = p_use_debanding; - if (viewport->render_buffers.is_valid()) { - viewport->render_buffers->set_use_debanding(p_use_debanding); - } + _configure_3d_render_buffers(viewport); } void RendererViewport::viewport_set_use_occlusion_culling(RID p_viewport, bool p_use_occlusion_culling) { |