[add] LockOn OutLine

This commit is contained in:
kimnuri
2025-11-28 13:40:09 +09:00
parent c676d88990
commit 7c46dacf97
10 changed files with 242 additions and 53 deletions
@@ -43,6 +43,21 @@ RasterizerState RS_Front
CullMode = Front;
};
/*
typedef struct D3D10_DEPTH_STENCIL_DESC
{
BOOL DepthEnable;
D3D10_DEPTH_WRITE_MASK DepthWriteMask;
D3D10_COMPARISON_FUNC DepthFunc;
BOOL StencilEnable;
UINT8 StencilReadMask;
UINT8 StencilWriteMask;
D3D10_DEPTH_STENCILOP_DESC FrontFace;
D3D10_DEPTH_STENCILOP_DESC BackFace;
} D3D10_DEPTH_STENCIL_DESC;
*/
DepthStencilState DSS_Default
{
DepthEnable = true;
@@ -50,13 +65,6 @@ DepthStencilState DSS_Default
DepthFunc = less_equal;
};
DepthStencilState DSS_OutLine
{
DepthEnable = true;
DepthWriteMask = Zero;
DepthFunc = less_equal;
};
DepthStencilState DSS_None
{
DepthEnable = false;
@@ -71,6 +79,48 @@ DepthStencilState DSS_Effect
StencilEnable = false;
};
DepthStencilState DSS_Default_OutLine_Write
{
DepthEnable = true;
DepthWriteMask = true;
DepthFunc = less_equal;
StencilEnable = true;
StencilReadMask = 0xff;
StencilWriteMask = 0xff;
FrontFaceStencilFail = Keep;
FrontFaceStencilDepthFail = Keep;
FrontFaceStencilPass = Replace;
FrontFaceStencilFunc = Always;
BackFaceStencilFail = Keep;
BackFaceStencilDepthFail = Keep;
BackFaceStencilPass = Replace;
BackFaceStencilFunc = Always;
};
DepthStencilState DSS_Default_OutLine_Read
{
DepthEnable = true;
DepthWriteMask = zero;
DepthFunc = less_equal;
StencilEnable = true;
StencilReadMask = 0xff; // <-- ff -> 1111 1111 씀
StencilWriteMask = 0x00; // <-- 00 -> 0000 0000 안씀
FrontFaceStencilFail = Keep;
FrontFaceStencilDepthFail = Keep;
FrontFaceStencilPass = Keep;
FrontFaceStencilFunc = Equal;
BackFaceStencilFail = Keep;
BackFaceStencilDepthFail = Keep;
BackFaceStencilPass = Keep;
BackFaceStencilFunc = Equal;
};
BlendState BS_None
{
BlendEnable[0] = false;