mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-14 07:43:14 +00:00
GPU: Add enable_depth_clip to RasterizerState (#10964)
This commit is contained in:
@@ -1355,6 +1355,11 @@ typedef struct SDL_GPUTransferBufferCreateInfo
|
||||
* A structure specifying the parameters of the graphics pipeline rasterizer
|
||||
* state.
|
||||
*
|
||||
* NOTE: Some backend APIs (D3D11/12) will enable depth clamping even if
|
||||
* enable_depth_clip is true. If you rely on this clamp+clip behavior,
|
||||
* consider enabling depth clip and then manually clamping depth in your
|
||||
* fragment shaders on Metal and Vulkan.
|
||||
*
|
||||
* \since This struct is available since SDL 3.0.0
|
||||
*
|
||||
* \sa SDL_GPUGraphicsPipelineCreateInfo
|
||||
@@ -1368,9 +1373,9 @@ typedef struct SDL_GPURasterizerState
|
||||
float depth_bias_clamp; /**< The maximum depth bias of a fragment. */
|
||||
float depth_bias_slope_factor; /**< A scalar factor applied to a fragment's slope in depth calculations. */
|
||||
bool enable_depth_bias; /**< true to bias fragment depth values. */
|
||||
bool enable_depth_clip; /**< true to enable depth clip, false to enable depth clamp. */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
} SDL_GPURasterizerState;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user