csharp
public readonly record struct DepthStencilStateThe depth and stencil tests.
No guide page documents this yet — the page shows what the code says about itself.
Fields and properties (11)
public bool DepthTestWhether depth is tested.
public bool DepthWriteWhether depth is written.
public CompareFunction DepthCompareThe comparison. Greater under the engine's reversed depth, which is what Default uses.
public bool StencilTestWhether stencil is tested.
public StencilFaceState FrontThe stencil test for front faces.
public StencilFaceState BackThe stencil test for back faces.
public byte StencilReadMaskWhich stencil bits the comparison sees.
public byte StencilWriteMaskWhich stencil bits may be written.
public static DepthStencilState DefaultTest and write depth with the engine's reversed comparison.
public static DepthStencilState TestOnlyTest depth but do not write it — what a forward transparency pass wants.
public static DepthStencilState DisabledNo depth at all — a full-screen pass, or UI.
Methods (1)
public DepthStencilState(bool DepthTest = true, bool DepthWrite = true, CompareFunction DepthCompare = Greater, bool StencilTest = false, StencilFaceState Front = default(StencilFaceState), StencilFaceState Back = default(StencilFaceState), byte StencilReadMask = 255, byte StencilWriteMask = 255)The depth and stencil tests.
Used by (49, showing 40)
- PbrShowcaseGamePbrShowcase
- TriangleGameHelloTriangle
- VirtualGeometryGameVirtualGeometry
- CommandRecorderTestsVixen.Graphics.Null.Tests
- CompositorAssetTestsVixen.Rendering.Tests
- CompositorBuilderVixen.Rendering
- CompositorImageTestsVixen.Graphics.Golden.Tests
- DepthPrepassTestsVixen.Rendering.Tests
- EditorGizmoFacingDeviceTestsVixen.Graphics.Golden.Tests
- EffectPipelineDescriberVixen.Rendering
- FixtureVixen.Graphics.Golden.Tests
- FullScreenRendererVixen.Rendering
- GlCommandListTestsVixen.Graphics.OpenGL.Tests
- GlDeviceTestsVixen.Graphics.OpenGL.Tests
- GlPipelineVixen.Graphics.OpenGL
- GlReplayTestsVixen.Graphics.OpenGL.Tests
- GlStateCacheVixen.Graphics.OpenGL
- GlStateCacheTestsVixen.Graphics.OpenGL.Tests
- GoldenImageTestsVixen.Graphics.Golden.Tests
- GpuClusterRasterVixen.Rendering
- GraphicsCompositorTestsVixen.Rendering.Tests
- GraphicsPipelineDescriptionVixen.Graphics
- GrassDrawPassVixen.Rendering.Terrain
- ImpostorCapturePassVixen.Rendering
- IrradianceCaptureDeviceTestsVixen.Graphics.Golden.Tests
- LineRendererVixen.Rendering
- MeshInstanceRendererVixen.Rendering
- MeshRendererVixen.Rendering
- NativeWebGpuTestsVixen.Graphics.WebGPU.Tests
- NullDeviceVixen.Graphics.Null
- ParticleSpriteDeviceTestsVixen.Graphics.Golden.Tests
- PipelineDefaultTestsVixen.Graphics.Tests
- PipelineStateImageTestsVixen.Graphics.Golden.Tests
- PipelinesVixen.Graphics.OpenGL.Tests
- RenderStageVixen.Rendering
- ShadowAtlasTileDeviceTestsVixen.Graphics.Golden.Tests
- SurfaceCacheRendererDeviceTestsVixen.Graphics.Golden.Tests
- SurfaceCardCaptureDeviceTestsVixen.Graphics.Golden.Tests
- TerrainRendererVixen.Rendering.Terrain
- UiRendererVixen.Ui.Renderer