Shaders and Materials
How Flora works with your existing shaders, and what to consider when authoring new ones.
Flora supports a wide range of Unity shaders and includes utilities for patching both Shader Graph and manually authored shaders for compatibility with instancing and selection.
Shader Requirements
Every pass must include the following pragma, and will only work when the shader target is greater than 4.5.
#pragma multi_compile _ DOTS_INSTANCING_ON
#pragma target 4.5For Universal, you can use the following include_with_pragmas to automatically setup the pass for DOTS.
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"Additionally for picking to work, ensure the ScenePickingPass correctly returns unity_SelectionID and not _SelectionID.
This is a common error in 3rd party shaders, and affects Amplify Shader Editor (a bug request has been submitted). For ASE, modify the template shader and replace the return result of _SelectionID with unity_SelectionID in the fragment shader of any templates you are using.
// return _SelectionID; Replace this line with:
return unity_SelectionID;Last updated
