1. Home
  2. Docs
  3. Ignis
  4. Tutorials
  5. Add compatibility with your/external shader

Add compatibility with your/external shader

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:

  1. You can add compatibility with any shader that has at least a color parameter exposed.
  2. To create a new compatibility object right click on your project assets window-> Create->OAVA-Shader Compatibility.
  3. Scriptable object looking like this will be created:
  1. 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.
  2. 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.
  3. Add float properties to be animated at different life points. E.g. leaves/wind multipliers.
  4. Check Combatibility/CompatibleSettings folder for examples.
  5. Add your new object, which you created to scene hierarchy->FlameEngine->FlameEngineShaderCompatibility component list.
  6. Done. The shader should now be animated automatically. You can also delete the settings from the FlameEngineShaderCompatibility for minimal performance gain.

Leave a Reply

Your email address will not be published. Required fields are marked *