Improve visual feedback when using the motion vectors debug view option.

Replaces the current method of showing the raw values of the motion vectors buffer to display a grid of lines instead with a new shader.
This commit is contained in:
Dario 2023-08-17 09:32:33 -03:00
parent 031f6deefb
commit e7d3a7c2aa
4 changed files with 131 additions and 2 deletions

View file

@ -745,8 +745,7 @@ void RendererSceneRenderRD::_render_buffers_debug_draw(const RenderDataRD *p_ren
}
if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_MOTION_VECTORS && _render_buffers_get_velocity_texture(rb).is_valid()) {
Size2i rtsize = texture_storage->render_target_get_size(render_target);
copy_effects->copy_to_fb_rect(_render_buffers_get_velocity_texture(rb), texture_storage->render_target_get_rd_framebuffer(render_target), Rect2(Vector2(), rtsize), false, false);
debug_effects->draw_motion_vectors(_render_buffers_get_velocity_texture(rb), texture_storage->render_target_get_rd_framebuffer(render_target), rb->get_internal_size());
}
}