My next pathetic attempt with shadows - help

Ok i have created a project with an implementation based on jME’s default lighting and shadow materials(I only tested PointLights):

The only tricky thing about it is that you can’t add your light to the rootNode like you usually would, you’ll just set the light to the ShadowRenderer. (normal lights that don’t cast shadows are still added to the rootNode)
The material definition file is just lightning.j3md with the post material switched with my shadow material(and the necessary Material Parameters) and BlendMode changed to Additive.
The fragment and vertex shader files are just PostShadow15 and Lighting combined (I did mostly copy PostShadow15 into the Lighting shaders and made a few adjustments)

A few Screenshots I made of it.
default:

pretty:

default:

pretty:

And one with three point lights, the blue one in front of the box doesn’t cast shadows.

3 Likes