D3D11 Effect状态的设置

Texture2D txMesh;
SamplerState samLinear
{
    Filter = MIN_MAG_MIP_LINEAR;
    AddressU = Wrap;
    AddressV = Wrap;
};
float4 meshColor = txMesh.Sample( samLinear, input.Tex);


DepthStencilState EnableDepth
{
    DepthEnable = TRUE;
    DepthWriteMask = ALL;
    DepthFunc = LESS_EQUAL;
};

RasterizerState rsWireframe
{
    FillMode = WireFrame;
};

RasterizerState rsSolid
{
    FillMode = Solid;
};

SetDepthStencilState( EnableDepth, 0 );
SetRasterizerState( rsSolid );

原文地址:https://www.cnblogs.com/sifenkesi/p/2138020.html