Anixias
Member
Hi all, I'm making a 2D platformer sort of game. I am wondering how best to handle the lighting surface since the view is almost never at an integer position, and surfaces only deal with integers as far as I'm aware.
The view size is 480x270 and the game is rendered at 1920x1080 144FPS. For my lighting surface(s), I have to draw a mask onto it to prevent lighting from affecting the sky or background, but if I do that using the background positions, which are non-integer, they are simply rounded to integers and the lighting will always be off slightly in an extremely noticeable way, causing a sort of "sub-pixel glow" on edges of objects. I had this same issue on a different isometric game but just ignored it.
What is a good way to deal with this given that all positions will be non-integer? I could use a lighting surface at the same size as the screen rather than the view but this could potentially create other issues regarding the background mask and may still not be enough.
The view size is 480x270 and the game is rendered at 1920x1080 144FPS. For my lighting surface(s), I have to draw a mask onto it to prevent lighting from affecting the sky or background, but if I do that using the background positions, which are non-integer, they are simply rounded to integers and the lighting will always be off slightly in an extremely noticeable way, causing a sort of "sub-pixel glow" on edges of objects. I had this same issue on a different isometric game but just ignored it.
What is a good way to deal with this given that all positions will be non-integer? I could use a lighting surface at the same size as the screen rather than the view but this could potentially create other issues regarding the background mask and may still not be enough.