I'm making a 2D sidescroller game and want to give the blocks a 3D like effect. This way it looks like the player is walking on 3D blocks while walking on a 2D plane (thus having only x,y coordinates).
I have already written the code to generate the terrain in 2D, but the 3D effect is now baked in. It looks like this:
At this moment the 3D effect is baked into the blocks, but I want to try to generate it.
Is there a common way to achieve this 3D like effect while using 2D textures? Do I have to convert from 2D to 3D or is it also possible to do this with calculations/shaders?