Example use case: You have an object in your scene that you want to ignite in flames. Your object uses this underground/less-known shader from the asset store, let’s call it “Jimbo’s awesome party shader” and it is not supported by Ignis out-of-the-box.
Examples in package: There is e.g. The Vegetation Engine shader compatibility created by this same method in the package. You can find many examples in FlameEngine->Compatible shaders.
How to implement:
- You can add compatibility with any shader that has at least a color parameter exposed.
- To create a new compatibility object right click on your project assets window-> Create->OAVA-Shader Compatibility.
- Scriptable object looking like this will be created:
- It is better if your shader has a property like _IsYourShader, to be checked, but you can also use the name of the shader. These are used to detect your shader.
- Set the color property names, if you want the colors to be animated. Colors can be later set in FlammableObject component->Shader individually for all the objects.
- Add float properties to be animated at different life points. E.g. leaves/wind multipliers.
- Check Combatibility/CompatibleSettings folder for examples.
- Add your new object, which you created to scene hierarchy->FlameEngine->FlameEngineShaderCompatibility component list.
- Done. The shader should now be animated automatically. You can also delete the settings from the FlameEngineShaderCompatibility for minimal performance gain.