- add managed RenderStateBlock authoring types and wire them through DrawingSettings - let RenderObjectsRendererFeature author depth and stencil overrides for scene draws - apply scene draw render state overrides inside builtin forward pipeline and document the stage plan
29 lines
730 B
C#
29 lines
730 B
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace XCEngine.Rendering
|
|
{
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct StencilState
|
|
{
|
|
[MarshalAs(UnmanagedType.I1)]
|
|
public bool enabled;
|
|
|
|
public byte readMask;
|
|
public byte writeMask;
|
|
public StencilFaceState frontFace;
|
|
public StencilFaceState backFace;
|
|
|
|
public static StencilState CreateDefault()
|
|
{
|
|
return new StencilState
|
|
{
|
|
enabled = false,
|
|
readMask = 0xFF,
|
|
writeMask = 0xFF,
|
|
frontFace = StencilFaceState.CreateDefault(),
|
|
backFace = StencilFaceState.CreateDefault()
|
|
};
|
|
}
|
|
}
|
|
}
|