Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::RasterizerStateDesc Struct Reference

Rasterizer state description. More...

#include <RasterizerState.h>

Public Member Functions

constexpr bool operator== (const RasterizerStateDesc &RHS) const
 Tests if two structures are equivalent.
 

Public Attributes

FILL_MODE FillMode = FILL_MODE_SOLID
 Determines triangle fill mode, see Diligent::FILL_MODE for details.
 
CULL_MODE CullMode = CULL_MODE_BACK
 Determines triangle cull mode, see Diligent::CULL_MODE for details.
 
Bool FrontCounterClockwise = False
 Determines if a triangle is front- or back-facing.
 
Bool DepthClipEnable = True
 Enable clipping against near and far clip planes.
 
Bool ScissorEnable = False
 Enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.
 
Bool AntialiasedLineEnable = False
 Specifies whether to enable line antialiasing.
 
Int32 DepthBias = 0
 Constant value added to the depth of a given pixel.
 
Float32 DepthBiasClamp = 0.f
 Maximum depth bias of a pixel.
 
Float32 SlopeScaledDepthBias = 0.f
 Scalar that scales the given pixel's slope before adding to the pixel's depth.
 

Detailed Description

Rasterizer state description.

This structure describes the rasterizer state and is part of the GraphicsPipelineDesc.

Member Data Documentation

◆ AntialiasedLineEnable

Bool Diligent::RasterizerStateDesc::AntialiasedLineEnable = False

Specifies whether to enable line antialiasing.

Default value: False.

◆ CullMode

CULL_MODE Diligent::RasterizerStateDesc::CullMode = CULL_MODE_BACK

Determines triangle cull mode, see Diligent::CULL_MODE for details.

Default value: Diligent::CULL_MODE_BACK.

◆ DepthBias

Int32 Diligent::RasterizerStateDesc::DepthBias = 0

Constant value added to the depth of a given pixel.

Default value: 0.

◆ DepthBiasClamp

Float32 Diligent::RasterizerStateDesc::DepthBiasClamp = 0.f

Maximum depth bias of a pixel.

Warning
Depth bias clamp is not available in OpenGL

Default value: 0.

◆ DepthClipEnable

Bool Diligent::RasterizerStateDesc::DepthClipEnable = True

Enable clipping against near and far clip planes.

Default value: True.

By default polygon faces are clipped against the near and far planes of the view frustum. If depth clipping is disabled, the depth of the fragments that would be clipped is clamped to the near/far plane instead of discarding them.

To check if the device supports depth clamping, use the DepthClamp device feature. If it is not supported, the value of this member must be True.

◆ FillMode

FILL_MODE Diligent::RasterizerStateDesc::FillMode = FILL_MODE_SOLID

Determines triangle fill mode, see Diligent::FILL_MODE for details.

Default value: Diligent::FILL_MODE_SOLID.

◆ FrontCounterClockwise

Bool Diligent::RasterizerStateDesc::FrontCounterClockwise = False

Determines if a triangle is front- or back-facing.

If this parameter is True, 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, the opposite is true. Default value: False.

◆ ScissorEnable

Bool Diligent::RasterizerStateDesc::ScissorEnable = False

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

Default value: False.

◆ SlopeScaledDepthBias

Float32 Diligent::RasterizerStateDesc::SlopeScaledDepthBias = 0.f

Scalar that scales the given pixel's slope before adding to the pixel's depth.

Default value: 0.