Rasagar/Library/PackageCache/com.unity.visualeffectgraph/Documentation~/Context-OutputShaderGraphMesh.md
2024-08-26 23:07:20 +03:00

3.3 KiB

Output ShaderGraph Mesh

Menu Path : Context > Output Particle ShaderGraph Mesh

[!include]

This output is similar to Output Particle Mesh.

Context settings

Setting Type Description
Shader Graph ShaderGraphVfxAsset Specifies the Shader Graph Unity uses to render particles this output produces. When you are assigning a Shader Graph to this property, the Inspector exposes all the Surface Options from the Shader Graph which allows you to edit the Shader Graph properties inside the Inspector for the Context.
The Context properties are populated with compatible exposed input from the Shader Graph.
For more information on the Surface Options this adds to the Inspector, see the documentation for the type of Shader Graph you assigned. For example, if you assigned an HDRP Lit Shader Graph, see the documentation for the Lit Shader Graph.
Mesh Count uint (slider) (Inspector) The number of different meshes to use with this output (from 1 to 4). You can select a mesh for a particle by index. This uses the particle's meshIndex attribute.
Lod bool (Inspector) Indicates whether the particle mesh uses levels of details (LOD).If you enable this setting, the Context bases mesh selection on the particle's apparent size on screen. To specify values for the LOD mesh selection, use the Lod Values property.

Context properties

Input Type Description
Mesh [N] Mesh The meshes to use to render particles. The number of mesh input fields depends on the Mesh Count setting.
Sub Mesh Mask [N] uint (mask) The sub mesh masks to use for each mesh. The number of sub mesh mask fields depends on the Mesh Count setting.
Lod Values Vector4 The threshold values the Context uses to choose between LOD levels. The values represent a percentage of the viewport along one dimension (For instance, a Value of 10.0 means 10% of the screen). The Context tests values from left to right (0 to n) and selects the LOD level only if the percentage of the particle on screen is above the threshold. This means you have to specify LOD values in decreasing order. Note that you can also use LOD with a mesh count of 1 to cull small particles on screen. This property only appears if you enable the LOD setting.
Radius Scale float The scale to apply when selecting the LOD level per particle. By default, the LOD system assumes mesh bounding boxes are unit boxes. If your mesh bounding box is smaller/bigger than the unit box, you can use this property to apply a scale so that LOD thresholds are consistent with apparent size. This property only appears if you enable the LOD setting.

[!include]