-
Notifications
You must be signed in to change notification settings - Fork 81
Appendix B: Shader Best Practices
Unity precompiles shaders when creating asset bundles. They also sometimes break precompiled shader compatibility between Unity versions.
This means that occasionally it may be necessary to rebuild your mod against the new version of Unity otherwise your mod may not render properly and will be slower to load.
To reduce the likelihood of your mod breaking, you should only use one of these shaders which are included in the game. The build process will warn you if you are using a different shader:
Legacy Shaders/Diffuse
Hidden/CubeBlur
Hidden/CubeCopy
Hidden/CubeBlend
UI/Default
UI/Default Font
Mobile/Diffuse
Unlit/Transparent
Unlit/Transparent Cutout
Unlit/Color
Mobile/Unlit (Supports Lightmap)
Unlit/Texture
KT/Blend Lit and Unlit
KT/Blend Lit and Unlit Vertex Color
KT/Blend Unlit
GUI/KT 3D Text
KT/Mobile/Diffuse
KT/Mobile/DiffuseTint
KT/Transparent/Mobile Diffuse Underlay200
KT/Unlit/TexturedLightmap
KT/Unlit/TransparentVertexColorUnderlay30
KT/Outline
If you need a shader that does something that none of these handle you can submit a pull request and we may be able to include it in the game.