Struct RenderState ​
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
The complete render state for a draw, built from the packed rendersystemdx11 descriptors.
public record struct RenderState : IEquatable<RenderState>Implements ​
Fields ​
Blend ​
Blend state.
public RsBlendStateDesc BlendField Value ​
DepthStencil ​
Depth and stencil test state.
public RsDepthStencilStateDesc DepthStencilField Value ​
Rasterizer ​
Rasterizer state.
public RsRasterizerStateDesc RasterizerField Value ​
Properties ​
BlendEnable ​
Gets or sets whether blending is enabled.
public bool BlendEnable { readonly get; set; }Property Value ​
ColorWriteMask ​
Gets or sets the color channels that are written.
public RsColorWriteEnableBits ColorWriteMask { readonly get; set; }Property Value ​
Default ​
Gets the renderer default: solid fill, backface culling, depth clip on, multisampling on, depth test and write on, blending off with alpha factors on render target 0, all color channels written.
public static RenderState Default { get; }Property Value ​
DestBlend ​
Gets the destination blend factor.
public readonly RsBlendMode DestBlend { get; }Property Value ​
SrcBlend ​
Gets the source blend factor. Both factors are set at once, by .
public readonly RsBlendMode SrcBlend { get; }Property Value ​
StencilRef ​
Gets the stencil reference value. Some devices bind it on its own, others set it with the comparison, so takes both.
public readonly byte StencilRef { get; }Property Value ​
Methods ​
SetBlend(RsBlendMode, RsBlendMode) ​
Sets the source and destination blend factors.
public void SetBlend(RsBlendMode src, RsBlendMode dst)Parameters ​
src RsBlendMode
dst RsBlendMode
SetStencilFunc(RsComparison, byte) ​
Sets the stencil comparison and the value it compares against, for both faces.
public void SetStencilFunc(RsComparison func, byte reference)Parameters ​
func RsComparison
reference byte
SetStencilPassOp(RsStencilOp) ​
Sets the operation both faces take when the stencil and depth tests pass.
public void SetStencilPassOp(RsStencilOp op)Parameters ​
op RsStencilOp

