Is it possible to light a scene, but cast shadows based off each objects collider instead of the objects visual geometry?
You hope to save some performance with this trick? :lol:
Well maybe you can try to disable shadow casting for your meshes and create colliders primitives also as render meshes and apply them a material that makes them completely invisible to the camera (with alpha channel in example?) but still cast shadows.
Yeah, exactly. I want to cast off the collision geometry for performance reasons. I was hoping there could be a channel system in place that would let me flag what entities for shadow casting, but I’ll be fine with an alternative if it’s not possible in this engine.
Thanks for the reply!
This might be possible by setting up multiple cameras, using ColorMask A in the pass iof all of the shaders that you don’t want to render yet cast shadows, etc, but it seems more trouble than it’s worth unless the original geometry that you’re casting shadows with is extremely high poly.
Potentially the geometry in the scene is going to be absurdly high. For example, individual blades of grass in a field, 50,000 poly trees, with aggressive use of LODs.
I think that’s enough to justify alternative shadow casters for these objects. However if there’s an alternative to any of this, I’d love to hear it.