Skip to content

render: Fix subsurface scaling when rendering to buffer

Sebastian Krzyszkowiak requested to merge dos/phoc:subsurface-buffer into main

Scale needs to be calculated against view geometry and be constant across the whole tree, otherwise different subsurfaces are going to be rendered at different scales.

Sampling out of buffer's bounds is not a concern, since we only ever sample from its source box. For geometry handling, it's enough to make sure the destination position takes geometry into account and the rest gets cropped by destination buffer's bounds.

Since destination box by definition operates in a different coordinate system than source box, we can stay in layout coordinates the whole time until the very end and entirely avoid problems with subsurfaces having different buffer scale than their parent surfaces.

Fixes a51f7cd1 ("render: Switch thumbnail rendering to new render API") Fixes 9a88cade ("render: Take geometry into account when rendering to a buffer")

Signed-off-by: Sebastian Krzyszkowiak dos@dosowisko.net

Merge request reports

Loading