T
ThunkGames
Guest
Hey,
I am having some trouble with surfaces and the precision to which they are drawn. What I am trying to do is draw "darkness" over every block in my game (at whole number coordinates). A light surface is subtracted from this surface and then it is drawn so that it lines up with the blocks.
Except it doesn't. It does this. Jitteryness in the x and y direction
Blocks are at integer coordinates within the room and the surface is being drawn not scaled and at an integer coordinate in the room.
I am aware that this system is kind of slow, however I first tried drawing everything that could be affected by darkness to a surface (blocks, player, pickups, etc. Not things like the background or the moon), drawing that surface and then drawing it again except passing it though a darkening shader. This resulted in everything appearing jittery, as seen in the above clip.
I'm hoping this has a solution, and I know if it does you all will be able to show me the light. I am turning here because I have exhausted all other outlets.
Thanks!!
-David
I am having some trouble with surfaces and the precision to which they are drawn. What I am trying to do is draw "darkness" over every block in my game (at whole number coordinates). A light surface is subtracted from this surface and then it is drawn so that it lines up with the blocks.
Except it doesn't. It does this. Jitteryness in the x and y direction
Blocks are at integer coordinates within the room and the surface is being drawn not scaled and at an integer coordinate in the room.
I am aware that this system is kind of slow, however I first tried drawing everything that could be affected by darkness to a surface (blocks, player, pickups, etc. Not things like the background or the moon), drawing that surface and then drawing it again except passing it though a darkening shader. This resulted in everything appearing jittery, as seen in the above clip.
I'm hoping this has a solution, and I know if it does you all will be able to show me the light. I am turning here because I have exhausted all other outlets.
Thanks!!
-David