What does multi_compile_fwdbase in shader mean?


I know there is a document about multi_compile. But I can’t find any information about multi_compile_fwdbase via google. I suppose that it is defined by unity internally. And I’d like to know how it works in the shader. Thanks.

Well from Joey Fladderak’s blog, he mentioned:

Next to the tag, we also need to define:

#pragma multi_compile_fwdbase

This is to ensure the shader compiles properly for the needed passes. As with the tag, for any additional lights in their own pass, fwdbase becomes fwdadd.

I guess this is to tell the compiler that this is for the pass forward base.