D3D11_RASTERIZER_DESC Structure

Describes rasterizer state.

Syntax

typedef struct D3D11_RASTERIZER_DESC {
  D3D11_FILL_MODE FillMode;
  D3D11_CULL_MODE CullMode;
  BOOL            FrontCounterClockwise;
  INT             DepthBias;
  FLOAT           DepthBiasClamp;
  FLOAT           SlopeScaledDepthBias;
  BOOL            DepthClipEnable;
  BOOL            ScissorEnable;
  BOOL            MultisampleEnable;
  BOOL            AntialiasedLineEnable;
} D3D11_RASTERIZER_DESC;

Mitglieder

  • FillMode
    Typ: D3D11_FILL_MODE

    Determines the fill mode to use when rendering (see D3D11_FILL_MODE).

  • CullMode
    Typ: D3D11_CULL_MODE

    Indicates triangles facing the specified direction are not drawn (see D3D11_CULL_MODE).

  • FrontCounterClockwise
    Typ: BOOL

    Determines if a triangle is front- or back-facing. If this parameter is true, then a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If this parameter is false then the opposite is true.

  • DepthBias
    Typ: INT

    Depth value added to a given pixel.

  • DepthBiasClamp
    Typ: FLOAT

    Maximum depth bias of a pixel.

  • SlopeScaledDepthBias
    Typ: FLOAT

    Scalar on a given pixel's slope.

  • DepthClipEnable
    Typ: BOOL

    Enable clipping based on distance.

    The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default–TRUE, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm).

    0 < w
    -w <= x <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
    -w <= y <= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden)
    0 <= z <= w
    

    When you set DepthClipEnable to FALSE, the hardware skips the z clipping (that is, the last step in the preceding algorithm). However, the hardware still performs the "0 < w" clipping. When z clipping is disabled, improper depth ordering at the pixel level might result. However, when z clipping is disabled, stencil shadow implementations are simplified. In other words, you can avoid complex special-case handling for geometry that goes beyond the back clipping plane.

  • ScissorEnable
    Typ: BOOL

    Enable scissor-rectangle culling. All pixels ouside an active scissor rectangle are culled.

  • MultisampleEnable
    Typ: BOOL

    Enable multisample antialiasing.

  • AntialiasedLineEnable
    Typ: BOOL

    Enable line antialiasing; only applies if doing line drawing and MultisampleEnable is false.

Hinweise

Rasterizer state defines the behavior of the rasterizer stage; to set rasterizer state, call ID3D11DeviceContext::RSSetState.

These are the default values for rasterizer state.

State Default Value
FillMode Solid
CullMode Back
FrontCounterClockwise FALSE
DepthBias 0
SlopeScaledDepthBias 0.0f
DepthBiasClamp 0.0f
DepthClipEnable TRUE
ScissorEnable FALSE
MultisampleEnable FALSE
AntialiasedLineEnable FALSE

 

Anforderungen

Header

D3D11.h

Siehe auch

Core Structures