Hi, I want to make sure is there any pre-process macros in the shader library. So that I could use some more complex effect on some powerful device, and simple code on the weak device. Just as the following example,
…
// Add another Pass for the iPhone4s #if IsiPhone4s
Pass
{
} #end
…
I did some research on the Internet, but could not find nothing useful.
Thanks a lots!
Most practical way would be through shader LOD: Unity - Manual: ShaderLab: assigning a LOD value to a SubShader
Set up LOD numbers for different SubShaders. At runtime, detect which device you’re running on, and set Shader.globalMaximumLOD accordingly.
Alternatively, detect the device you’re running on, and manually just change material shaders to other shaders.