rendervulkan: Fix half-texel offset

Previously this was doing scale / 2 but it gets multiplied by scale, so this didn't work when it wasn't 1.0

Found when testing higher reses
This commit is contained in:
Joshua Ashton 2022-02-05 02:07:52 +00:00
parent f1646c8f03
commit aca867e60f

View file

@ -2420,8 +2420,8 @@ bool vulkan_composite( struct Composite_t *pComposite, struct VulkanPipeline_t *
pPipeline->layerBindings[i].bFilter &= !bForceNearest; pPipeline->layerBindings[i].bFilter &= !bForceNearest;
pComposite->data.vOffset[ i ].x += pComposite->data.vScale[ i ].x / 2.0f; pComposite->data.vOffset[ i ].x += 0.5f / pComposite->data.vScale[ i ].x;
pComposite->data.vOffset[ i ].y += pComposite->data.vScale[ i ].y / 2.0f; pComposite->data.vOffset[ i ].y += 0.5f / pComposite->data.vScale[ i ].y;
} }