Archive 17/01/2023.

[SOLVED] Shadow only scenepass

thatonejonguy

If possible, what would be the best approach for rendering a shadow only scenepass?

Thanks,
-Jon

cadaver

It’s pretty much hardcoded in the engine that shadows are calculated during additive per-pixel lighting. So you’ll need to look into patching the View / RenderPath classes to support that scenario (as well as modifying shaders). Maybe make a new renderpath command, or add parameters to the existing ones (FORWARDLIGHTS in forward rendering and LIGHTVOLUMES in deferred)

thatonejonguy

After looking through the shaders, I pretty much figured this to be the case. My goal was to get cheap softer shadows (shadow only pass to a bilateral blur pass), but I opted instead for extending the PCF to a user definable set of samples, which works ok for now. At some point, I might try to integrate PCSS, but that appears it will be no small task. Thanks for your reply.

-Jon