I'm writing a shader in Unity that responds to 3 lights: 1 directional and 2 point lights. The point lights are processed in the ForwardAdd pass (once per light). I need the ForwardAdd pass to blend with the ForwardBase pass multiplicatively (Blend Zero SrcColor). But I also need the lights in the ForwardAdd pass to stay additively blended.

Since I can only set the Blend once per pass and the ForwardAdd pass gets run once for light, I can only end up with everything blended multiplicatively.

So my question is: is there a way to keep the lights in ForwardAdd pass additively blended? In other words, is there some way to control the ordering/grouping of the Blend command?

If not, is there any other way to achieve my desired effect? The goal I'm going after is to have point lights (that are pixel lights) to mask out all other lights (directional, vertex, and SH lights).

Thanks in advance!


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.