Skip to content
Snippets Groups Projects
Commit 957ad294 authored by Niklas Haas's avatar Niklas Haas
Browse files

renderer: support rotated playback

This was a nightmare to implement, but the current solution seems
relatively robust. 180° rotations are trivial, only 90° rotations
require special handling. The implementation is based on the new ability
to *transpose* pl_shader outputs during dispatching.

To make all of the aspect ratio and scaling code do the right thing, the
basic premise is that, very early during rendering, we "fix" the
dst_rect by un-rotating it. This way, all of the scalers (and user
shaders etc.) see the "correct" dst rect, as though the target texture
were itself somehow magically rotated.

This normalization is only undone in the very last step during output to
the target planes. This implementation is also transparent to
interpolation, which always sees "un-rotated" planes.

Note that the current implementation just completely ignores overlays,
which probably break horribly under rotation. I'll fix that in a future
commit, when I can reason better about what the correct behavior is
supposed to be.

Closes #144
parent 4c468e6c
No related branches found
No related tags found
1 merge request!188render: support rotated playback
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment