Chroma works on all target platforms supported by Unity.
What is the runtime performance?
There is no performance overhead for using Chroma. The shader attributes are compiled into the shader code and are not calculated at runtime (see How Chroma works). The gradients and curves are baked into textures every time you edit them in the Unity Editor. The textures are then used at runtime, so there is no performance overhead for them either.
How to modify gradients and curves at runtime?
Unlike colors, numbers or vectors, the gradients and curves are baked into textures (see How Chroma works), so unfortunately you can’t change them at runtime.
However, often the same goal can be achieved without modifying the gradient directly. For example, you can:
- Have two or more gradients in one material, then blend between them at runtime using a float property. This can be done with a simple lerp in the shader code or with a Blend node in Shader Graph.
- Have multiple materials and switch between them at runtime. This can be done with a simple material swap (Renderer.material) or with a MaterialPropertyBlock in a script.
- Modify the sampling point of the gradient instead of the colors. This way you can shrink, expand or shift the gradient at runtime however you like.
Does Chroma support Amplify Shader Editor?
Yes, it does. You can find the set-up guide here.
Here are the requirements for the Chroma package:
- [Built-in RP]: Any version since Unity 2019 LTS is supported.
- [URP]: Requires version 10.0.0 or later, which corresponds to Unity version 2020.3.0 LTS or higher.
- [HDRP]: Requires version 11.0.0 or later, which corresponds to Unity version 2021.2.0 or higher.
- Demo scenes are using URP. Please install it from the Package Manager to run the demo scenes.
- [Shader Graph + Built-in RP + Unity 2020-2021]. In this combination Shader Graph has limited functionality due to Unity’s constraints. Chroma does fully support code shaders with Built-in RP in all Unity version and it does fully support Built-in RP + Shader Graph combination in Unity 2022 or later.
Is your question not answered here?
Please get it touch if you have a question.