Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GraphicsStateCollection.GraphicsState

A graphics state identifies a specific rendering configuration.
Read time 1 minuteLast updated 13 days ago

Definition

public struct GraphicsStateCollection.GraphicsState

Remarks

Modern graphics APIs (i.e. Metal, D3D12, Vulkan) use both the active shader variant and rendering configuration to create the accurate GPU representation of a shader.

Fields

Value

Description

attachmentsArray of color attachments used in this rendering configuration.
depthAttachmentIndexThe index of the attachment to be used as the depth/stencil buffer for this rendering configuration.
depthBiasThe global depth bias value for this rendering configuration.
forceCullModeThe forced cull mode in this rendering configuration.
invertCullingFlag indicating if backface culling is inverted in this rendering configuration.
invertProjectionFlag indicating if the projection matrix is inverted in this rendering configuration.
multiviewCountThe number of VR views used in this rendering configuration.
negativeScaleFlag indicating if the mesh has inverted scale in this rendering configuration.
renderStateThe render state used in this rendering configuration.
sampleCountThe number of samples per pixel in this rendering configuration.
shadingRateIndexIndex of attachment used as shading rate image.
slopeDepthBiasThe global slope depth bias value for this rendering configuration.
subPassesArray containing information of each subpass.
subPassIndexIndex of the active subpass in this rendering configuration.
topologyThe topology of the Mesh, e.g: Triangles, Lines, Quads, Points, etc. used in this rendering configuration.
vertexAttributesArray containing information of vertex attributes.
wireframeIs wireframe mode enabled for this rendering configuration.