CustomMaterial and non boolean shader defs #8867
-
Hi, Using the shader_def example as a base, I am trying to add a uint shader def to my custom material.
But I am faced with the following error message:
Are non-boolean shader defs not supported for custom materials or am I doing something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Alright, I get it now. So I should either check via #ifdef if the define exists in the shader code or I should always add this define and only change the value based on the key. |
Beta Was this translation helpful? Give feedback.
Alright, I get it now.
In the example I posted I check the Materal Key and only add the shader define, when is_red is true. Otherwise the define is not added at all.
So I should either check via #ifdef if the define exists in the shader code or I should always add this define and only change the value based on the key.