1
\$\begingroup\$

Is there anyway I can force Unity to allow me using a custom shader to render spotlights in a ForwardBase pass (using Forward Rendering Path)?

For what I could see since now:

  • Unity use and additional pass to render spotlights (this will cause an additional drawcall for each object illuminated by a spotlight even if marked static and static batching is activated)
  • With a single spotlight marked as important _WorldSpaceLightPos0 seems always not to be inizialized in any shader in the ForwardBase

My guess is that it isn't possible, but I'm curious if anyone has ever tried something similar.

If this isn't possible, does anyone know why? Is there any strong limitation I'm not considering?

\$\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.