Enum bgfx.StateFlags | Project Tiny Rendering | 0.21.0-preview.4
docs.unity3d.com
    Show / Hide Table of Contents

    Enum bgfx.StateFlags

    Namespace: Bgfx
    Syntax
    [Flags]
    public enum StateFlags : ulong

    Fields

    Name Description
    AlphaRefMask
    AlphaRefShift
    BlendAlphaToCoverage

    Enable alpha to coverage.

    BlendDstAlpha

    Ad, Ad, Ad, Ad

    BlendDstColor

    Rd, Gd, Bd, Ad

    BlendEquationAdd

    Blend add: src + dst.

    BlendEquationMask
    BlendEquationMax

    Blend max: max(src, dst).

    BlendEquationMin

    Blend min: min(src, dst).

    BlendEquationRevsub

    Blend reverse subtract: dst - src.

    BlendEquationShift
    BlendEquationSub

    Blend subtract: src - dst.

    BlendFactor

    Blend factor

    BlendIndependent

    Enable blend independent.

    BlendInvDstAlpha

    1-Ad, 1-Ad, 1-Ad ,1-Ad

    BlendInvDstColor

    1-Rd, 1-Gd, 1-Bd, 1-Ad

    BlendInvFactor

    1-Blend factor

    BlendInvSrcAlpha

    1-As, 1-As, 1-As, 1-As

    BlendInvSrcColor

    1-Rs, 1-Gs, 1-Bs, 1-As

    BlendMask
    BlendOne

    1, 1, 1, 1

    BlendShift
    BlendSrcAlpha

    As, As, As, As

    BlendSrcAlphaSat

    f, f, f, 1; f = min(As, 1-Ad)

    BlendSrcColor

    Rs, Gs, Bs, As

    BlendZero

    0, 0, 0, 0

    ConservativeRaster

    Enable conservative rasterization.

    CullCcw

    Cull counter-clockwise triangles.

    CullCw

    Cull clockwise triangles.

    CullMask
    CullShift
    Default

    Default state is write to RGB, alpha, and depth with depth test less enabled, with clockwise culling and MSAA (when writing into MSAA frame buffer, otherwise this flag is ignored).

    DepthTestAlways

    Enable depth test, always.

    DepthTestEqual

    Enable depth test, equal.

    DepthTestGequal

    Enable depth test, greater or equal.

    DepthTestGreater

    Enable depth test, greater.

    DepthTestLequal

    Enable depth test, less or equal.

    DepthTestLess

    Enable depth test, less.

    DepthTestMask
    DepthTestNever

    Enable depth test, never.

    DepthTestNotequal

    Enable depth test, not equal.

    DepthTestShift
    Lineaa

    Enable line AA rasterization.

    Mask
    Msaa

    Enable MSAA rasterization.

    None

    No state.

    PointSizeMask
    PointSizeShift
    PtLines

    Lines.

    PtLinestrip

    Line strip.

    PtMask
    PtPoints

    Points.

    PtShift
    PtTristrip

    Tristrip.

    ReservedMask
    ReservedShift
    WriteA

    Enable alpha write.

    WriteB

    Enable B write.

    WriteG

    Enable G write.

    WriteMask

    Write all channels mask.

    WriteR

    Enable R write.

    WriteRgb

    Enable RGB write.

    WriteZ

    Enable depth write.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023