mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-01 21:44:17 +01:00
set depth bias
This commit is contained in:
parent
c4688e1ad1
commit
0bb99aaa75
@ -740,7 +740,17 @@ void MetalRenderer::draw_execute(uint32 baseVertex, uint32 baseInstance, uint32
|
||||
|
||||
if (polyOffsetFrontEnable)
|
||||
{
|
||||
// TODO: set depth bias
|
||||
//uint32 frontScaleU32 = LatteGPUState.contextNew.PA_SU_POLY_OFFSET_FRONT_SCALE.getRawValue();
|
||||
//uint32 frontOffsetU32 = LatteGPUState.contextNew.PA_SU_POLY_OFFSET_FRONT_OFFSET.getRawValue();
|
||||
//uint32 offsetClampU32 = LatteGPUState.contextNew.PA_SU_POLY_OFFSET_CLAMP.getRawValue();
|
||||
|
||||
float frontScale = LatteGPUState.contextNew.PA_SU_POLY_OFFSET_FRONT_SCALE.get_SCALE();
|
||||
float frontOffset = LatteGPUState.contextNew.PA_SU_POLY_OFFSET_FRONT_OFFSET.get_OFFSET();
|
||||
float offsetClamp = LatteGPUState.contextNew.PA_SU_POLY_OFFSET_CLAMP.get_CLAMP();
|
||||
|
||||
frontScale /= 16.0f;
|
||||
|
||||
renderCommandEncoder->setDepthBias(frontOffset, frontScale, offsetClamp);
|
||||
}
|
||||
|
||||
// todo - how does culling behave with rects?
|
||||
|
Loading…
Reference in New Issue
Block a user