Romans_I_XVI
8 years agoRoku Guru
Bug | Distortion When Drawing To Half Pixel Position On Newer Devices
So I couldn't figure out why my games were looking distorted on my newer devices. The games look fine on say the Roku Stick or Roku 3, but on my RokuTV and Roku Ultra there was distortion. Well I finally figured it out, if you draw to a position that is in between two pixels (x: 50.5 y: 50.5 for instance) it will cause distortion on these newer devices. Now I obviously have no desire to draw to a half pixel position, I just always assumed the system would round it to the nearest int. Which is what it did, until now apparently.
Personally I think it'd be nice if this was fixed on the device level, in my opinion it's not uncommon to do movement underneath the hood at a speed less than 1 pixel per frame. So it's inconvenient to have to remember to cint() every position before drawing it to the screen. Again this is how the older devices worked. I don't know what all models are doing this, I currently only have it happening on the RokuTV and Roku Ultra.
This shows the difference, in the image on the left I'm not using cint() on the positions and on the right I am. The most obvious distortion is on the "Best" text as I'm drawing that at *.5 position.
https://i.imgur.com/lYBPC8z.jpg
Personally I think it'd be nice if this was fixed on the device level, in my opinion it's not uncommon to do movement underneath the hood at a speed less than 1 pixel per frame. So it's inconvenient to have to remember to cint() every position before drawing it to the screen. Again this is how the older devices worked. I don't know what all models are doing this, I currently only have it happening on the RokuTV and Roku Ultra.
This shows the difference, in the image on the left I'm not using cint() on the positions and on the right I am. The most obvious distortion is on the "Best" text as I'm drawing that at *.5 position.
https://i.imgur.com/lYBPC8z.jpg