Constrain/clamp per-pixel mesh size to [8,300] and even values.#737
Conversation
The warp mesh is now always resized/recalculated dynamically when a frame is drawn, nothing needs to be reloaded anymore.
Many of those internal types need a cleanup later to consolidate them a bit more.
|
I recall that the mesh size might get rounded to a multiple of 4 internally to enable SSE optimization. |
The SSE code has been removed, as the U/V coordinate calculations are now done in the warp mesh vertex shader, which is even better than using SSE (and portable to ARM as well). But this explains why it wasn't an issue in the 3.x versions. |
Very cool! |
The per-mixel mesh size needs to be a mutiple of two to avoid "bars" being rendered in each axis if the resolution is an odd number.
Also now clamping the value range from 8 to 300 (inclusive) on each axis, with 300 being well above anyone would need (Milkdrop's default of 64x48 is totally sufficient even in 4K).
The third commit just fixes a few compiler warnings by making the casts explicit.