Enum DecalMeshDepthBiasType
Options for mesh bias type. The Mesh bias lets you prevent z-fighting between the Decal GameObject and the GameObject it overlaps. This property is only applicable for GameObjects with a Decal Material type assigned directly.
Namespace: UnityEditor.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Editor.dll
Syntax
[GenerateHLSL(PackingRules.Exact, true, false, false, 1, false, false, false, -1, "C:\\temp\\com.unity.render-pipelines.universal@15.0\\Library\\PackageCache\\com.unity.render-pipelines.universal@15.0.7\\Editor\\ShaderGraph\\Includes\\DecalMeshBiasTypeEnum.cs")]
public enum DecalMeshDepthBiasType
Fields
Name | Description |
---|---|
DepthBias | When drawing the decal gameObject, Unity changes the depth value of each pixel of the GameObject by this value. A negative value shifts pixels closer to the Camera, so that Unity draws the Decal GameObject on top of the overlapping Mesh, which prevents z-fighting. Decal projectors ignore this property. |
ViewBias | A world-space bias (in meters). When drawing the Decal GameObject, Unity shifts each pixel of the GameObject by this value along the view vector. A positive value shifts pixels closer to the Camera, so that Unity draws the decal GameObject on top of the overlapping mesh, which prevents z-fighting. Decal projectors ignore this property. |