2
\$\begingroup\$

Basically I need to code a light for deferred rendering that is a cross between a spotlight and a directional (positionless) light. It's to be used for sunlight, but because my terrain has overhangs and multiple layers, I can't use a directional light for the sun, as those affect everything in the scene, and do not cast shadows.

I would also prefer that the light uses a full screen pass like directional lights use, rather than rending the light using a cone geometry like spot lights do.

Does anyone have an example of something like this? I've found a few resources but nothing that clearly shows how to code it up. Language is irrelevant, but I would prefer C#. Anything would be great though.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.