Hello there,
We have been trying to implement dynamic lighting into our MonoGame game. So far, we have managed to code a
light shader with use of normal map which works correctly on static images.
We want to achieve lighting on textures that are being transformed by the Spine2D runtime. Rotation of the
texture can be easilly coded when we pass an angle of object into the shader and offset angles of the normal map.
This obviously is not the case when we tried to illuminate a skeleton from Spine2D. We are trying to achieve
something like this, but in MonoGame.
(the snake example)
http://www.snakehillgames.com/sprite-lamp-and-spine/
When we bend the texture of the tree the light coordinations does not take into account the transformation of the
texture, which we expected.
The problem is that each pixel needs to "know" by which bone and how much its being affected, so the angle offset for normal map can be calculated.
From my understanding, this is somewhat basis of weight mapping. This information should help us properly illuminate any transformed texture.
This leads to following questions:
Is there already a lighting shader that could be seamlesly integrated into monogame?
If not, is there any way we could use data within the runtime to calculate what we need?
If so, which classes represent them and what is your recommended approach?
Thanks in advance for your time