docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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@17.0\\Packages\\com.unity.render-pipelines.universal\\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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)