summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_rd/effects/tone_mapper.cpp
diff options
context:
space:
mode:
authorMatias N. Goldberg <dark_sylinc@yahoo.com.ar>2023-08-05 16:30:47 -0300
committerMatias N. Goldberg <dark_sylinc@yahoo.com.ar>2023-08-05 17:09:06 -0300
commit6e7d87fb25442eea2b11382e9fde621f82012175 (patch)
tree1468a13f9ef7a6cb76a16cabf9682f63647f205e /servers/rendering/renderer_rd/effects/tone_mapper.cpp
parent16a93563bfd3b02ca0a8f6df2026f3a3217f5571 (diff)
downloadredot-engine-6e7d87fb25442eea2b11382e9fde621f82012175.tar.gz
Use fullscreen tri instead of quad
Diffstat (limited to 'servers/rendering/renderer_rd/effects/tone_mapper.cpp')
-rw-r--r--servers/rendering/renderer_rd/effects/tone_mapper.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/effects/tone_mapper.cpp b/servers/rendering/renderer_rd/effects/tone_mapper.cpp
index 821960bb3b..38a86a6cdc 100644
--- a/servers/rendering/renderer_rd/effects/tone_mapper.cpp
+++ b/servers/rendering/renderer_rd/effects/tone_mapper.cpp
@@ -170,10 +170,9 @@ void ToneMapper::tonemapper(RID p_source_color, RID p_dst_framebuffer, const Ton
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 1, u_exposure_texture), 1);
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 2, u_glow_texture, u_glow_map), 2);
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uniform_set_cache->get_cache(shader, 3, u_color_correction_texture), 3);
- RD::get_singleton()->draw_list_bind_index_array(draw_list, material_storage->get_quad_index_array());
RD::get_singleton()->draw_list_set_push_constant(draw_list, &tonemap.push_constant, sizeof(TonemapPushConstant));
- RD::get_singleton()->draw_list_draw(draw_list, true);
+ RD::get_singleton()->draw_list_draw(draw_list, false, 1u, 3u);
RD::get_singleton()->draw_list_end();
}
@@ -250,8 +249,7 @@ void ToneMapper::tonemapper(RD::DrawListID p_subpass_draw_list, RID p_source_col
RD::get_singleton()->draw_list_bind_uniform_set(p_subpass_draw_list, uniform_set_cache->get_cache(shader, 1, u_exposure_texture), 1); // should be set to a default texture, it's ignored
RD::get_singleton()->draw_list_bind_uniform_set(p_subpass_draw_list, uniform_set_cache->get_cache(shader, 2, u_glow_texture, u_glow_map), 2); // should be set to a default texture, it's ignored
RD::get_singleton()->draw_list_bind_uniform_set(p_subpass_draw_list, uniform_set_cache->get_cache(shader, 3, u_color_correction_texture), 3);
- RD::get_singleton()->draw_list_bind_index_array(p_subpass_draw_list, material_storage->get_quad_index_array());
RD::get_singleton()->draw_list_set_push_constant(p_subpass_draw_list, &tonemap.push_constant, sizeof(TonemapPushConstant));
- RD::get_singleton()->draw_list_draw(p_subpass_draw_list, true);
+ RD::get_singleton()->draw_list_draw(p_subpass_draw_list, false, 1u, 0u);
}