I have a bit of a dilemma. Here is my scene:
- Aircraft - Opaque Bucket
- Clouds (2d quads with transparent bitmaps) - Transparent Bucket
- Cloud Shadows (also a 2d quad with transparent bitmap) - Transparent Bucket
- Terrain - Opaque Bucket
I’m using the DirectionalLightShadowRenderer to cast shadows except on the clouds (since I’m faking the shadows there with the second quad). Initially I was using the DirectionalLightShadowFilter for shadows, but noticed I could not exclude the clouds from the shadow render with setShadowMode(ShadowMode.Off), as it kept receiving shadows rather than letting them just pass through as I would expect (not sure if this is a bug).
But anyway the real problem is that now I’m having trouble rendering the scene properly. If I put the 2. Clouds layer in the translucent bucket things work as I want, the real time and pre-rendered bitmap shadows blend seamlessly. But then my clouds are always rendered above the 1. Aircraft objects (not good). If I leave the 2. Clouds layer in the transparent bucket, things are rendered in the proper order except there is a blending issue with the clouds transparency and the real time shadows. Btw, this only happens if I have filters in use. If I turn them off things render as expected. But I’d like to use the filters. So. I’m looking for suggestions.
It’s like I need a second transparent bucket that will render after the real time shadows have been drawn. Is it possible to do this?
It’s also possible I’m barking up the wrong tree and there is an easier solution, but quite a bit of digging on the forums hasn’t revealed a solution.
Many thanks for any thoughts you might have on the topic.