Hi,
I know that JME can render shadows, but as far as I know, it can only render directional shadows, which should me manually aligned with the directional light that illuminates the scene. Shadows are also just simple transparent black shapes.
I wonder if it would be possible to create a system that can automatically render shadows for every light in the scene, for directional lights, but also for point lights and spot lights (Not ambient lights for obvious reasons). Looking at the fps of my game, modern hardware should be able to do this at a fast enough speed for use in games (as long as you don’t use too many lights, or use point lights with a short range as shadows can be ignored for faces out of the range of lights). Is this possible in JME?
The second thing I wonder is if it is possible to not make shadows render transparent black shapes, but that the shadows are used as input for the fragment shaders, so that with per-pixel lighting calculations if a pixel is in the shadow of a light, that light can be ignored in the fragment shader, acting as if the light was blocked. This would allow a lot more realistic shadows and lighting. However, I don’t know if this is even possible on current graphic cards, and if it’s possible, then I don’t know how slow it will be, trough the slowdown might not be that bad considering you have to do less lighting calculations.
I just want to know if those two things are possible in JME in a way that they can be used in games. And if it’s possible, I could use some documentation about how shadows work, how I can use those as input in fragment shaders and how to implement this all into JME.