I think your version is moving by epsilon in the output space, rather than in the input space. Not sure if this makes much difference though. Bit concerned that mirroring will cause the shift to…
I have a patch that "fixes" it, but it is a hack. Proper sampling code should be using texelFetch()
, not texture()
, so it has total control over the indices.
Push is a trivial code change to the nearest sampling that does not change behavior. I did not want xy to have different values in the different case statements.
Patch updated to split into more steps with explanation.
I do want to keep the fixes to the matrix calculation. It is possible to patch up the old calculation but it seems greately preferrable…
I tried to update this patch but it does not seem to have worked correctly. Closing this and making a new pull request.
This is a mistake, they only fixed the Scale. It appears the errors in Rotate are much larger but I also think it is less vital to fix them.
The translation is wrong without these .5 offsets and did not match the GPU, and made the edges up to .5 too dark.