diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-20 20:41:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 20:41:47 +0100 |
commit | a9b151c664d00d353640e6b2c52d026347230269 (patch) | |
tree | 1fd0ea6fb1adaf80d1534c51a5df6e15f824b7a8 /servers | |
parent | b23f1a8d3ec412ffa6b7754968bdced67d7d9c8f (diff) | |
parent | 28d0f8a455bc3216eabbf5fd87184dd21e8187d7 (diff) |
Merge pull request #44668 from clayjohn/VULKAN-downsample
Use cubemap downsampler for reflection mipmaps
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_scene_render_rd.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp index 2e457c2ce6..885c1a69dc 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp @@ -183,13 +183,11 @@ void RendererSceneRenderRD::_create_reflection_importance_sample(ReflectionData void RendererSceneRenderRD::_update_reflection_mipmaps(ReflectionData &rd, int p_start, int p_end) { for (int i = p_start; i < p_end; i++) { - for (int j = 0; j < rd.layers[i].mipmaps.size() - 1; j++) { - for (int k = 0; k < 6; k++) { - RID view = rd.layers[i].mipmaps[j].views[k]; - RID texture = rd.layers[i].mipmaps[j + 1].views[k]; - Size2i size = rd.layers[i].mipmaps[j + 1].size; - storage->get_effects()->make_mipmap(view, texture, size); - } + for (int j = 0; j < rd.layers[i].views.size() - 1; j++) { + RID view = rd.layers[i].views[j]; + RID texture = rd.layers[i].views[j + 1]; + Size2i size = rd.layers[i].mipmaps[j + 1].size; + storage->get_effects()->cubemap_downsample(view, texture, size); } } } |