Skip to main content

Enabling fog via a script causes shader errors in Luna

This is likely happening because by default Unity doesn't include all the shader variants for each fog variant, so when you switch fog types in runtime there's no shader for this particular variant and a pink replacement shader appears.

Possible solution:

  • Enable fog via the lighting settings window instead. (Window -> Rendering -> Lighting Settings)

images-small