The Topic allready said it . where can i find all pragma directives for Shader in Unity?
For Example im looking for an Explanation for this line. Especially the lighting keyword.
so I have a custom lighting model called ToonRamp and below it i have this line.
#pragma lighting ToonRamp exclude_path: prepass
here the full shader:
What’s it all about with the lighting keyword i am trying to find some some information about that now for a while an cant find anything. Please help me
1 Like
All you had to do was Google “unity shader directives” and the first few results would have had what you needed
first off all thanks for the reply but that is not what im looking for i read the site multiple times and there is nothing said about a #pragma lighting… so obviously those are not all directives. If i havent stumbled over the toonramp shader i actually wouldnt know that there is the possiblity to use the keyword lighting.
1 Like
The details are on that page, they just don’t use the 'lighting" directive there, normally you simply write the name of the lighting model you want to use without the directive. Scroll down to the “Required parameters” section and click the link it has for “Custom Lighting Models”.
I don’t believe “lighting” is even a directive, if you comment out that line in the shader, you’ll notice nothing changes. Custom lighting to use is defined in the “#pragma surface surf” line.
I don’t even understand how the link is relevant to the question – he’s asking for all the pragmas… there’s tons and they’re scattered all over the documentation (like #pragma multi_compile, and #pragma shader_feature, shown here: Unity - Manual: Declaring and using shader keywords in HLSL )
Neither of these pages is a definitive source for all of the possible pragmas.