GPU_DepthRange() -> GPU_DepthMap()
This commit is contained in:
parent
44d2606039
commit
624dc1c1b3
@ -130,7 +130,7 @@ void renderFrame()
|
||||
{
|
||||
GPU_SetViewport((u32*)osConvertVirtToPhys((u32)gpuDOut),(u32*)osConvertVirtToPhys((u32)gpuOut),0,0,240*2,400);
|
||||
|
||||
GPU_DepthRange(-1.0f, 0.0f);
|
||||
GPU_DepthMap(-1.0f, 0.0f);
|
||||
GPU_SetFaceCulling(GPU_CULL_BACK_CCW);
|
||||
GPU_SetStencilTest(false, GPU_ALWAYS, 0x00, 0xFF, 0x00);
|
||||
GPU_SetStencilOp(GPU_KEEP, GPU_KEEP, GPU_KEEP);
|
||||
|
@ -214,7 +214,7 @@ void GPU_SetViewport(u32* depthBuffer, u32* colorBuffer, u32 x, u32 y, u32 w, u3
|
||||
|
||||
void GPU_SetScissorTest(GPU_SCISSORMODE mode, u32 x, u32 y, u32 w, u32 h);
|
||||
|
||||
void GPU_DepthRange(float nearVal, float farVal);
|
||||
void GPU_DepthMap(float zScale, float zOffset);
|
||||
void GPU_SetAlphaTest(bool enable, GPU_TESTFUNC function, u8 ref);
|
||||
void GPU_SetDepthTestAndWriteMask(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask); // GPU_WRITEMASK values can be ORed together
|
||||
void GPU_SetStencilTest(bool enable, GPU_TESTFUNC function, u8 ref, u8 mask, u8 replace);
|
||||
|
@ -77,8 +77,8 @@
|
||||
#define GPUREG_004A 0x004A
|
||||
#define GPUREG_004B 0x004B
|
||||
#define GPUREG_004C 0x004C
|
||||
#define GPUREG_DEPTHRANGE_NEAR 0x004D
|
||||
#define GPUREG_DEPTHRANGE_FAR 0x004E
|
||||
#define GPUREG_DEPTHMAP_SCALE 0x004D
|
||||
#define GPUREG_DEPTHMAP_OFFSET 0x004E
|
||||
#define GPUREG_SH_OUTMAP_TOTAL 0x004F
|
||||
#define GPUREG_SH_OUTMAP_O0 0x0050
|
||||
#define GPUREG_SH_OUTMAP_O1 0x0051
|
||||
|
@ -317,11 +317,11 @@ void GPU_SetScissorTest(GPU_SCISSORMODE mode, u32 x, u32 y, u32 w, u32 h)
|
||||
GPUCMD_AddIncrementalWrites(GPUREG_SCISSORTEST_MODE, param, 0x00000003);
|
||||
}
|
||||
|
||||
void GPU_DepthRange(float nearVal, float farVal)
|
||||
void GPU_DepthMap(float zScale, float zOffset)
|
||||
{
|
||||
GPUCMD_AddWrite(GPUREG_006D, 0x00000001); //?
|
||||
GPUCMD_AddWrite(GPUREG_DEPTHRANGE_NEAR, f32tof24(nearVal));
|
||||
GPUCMD_AddWrite(GPUREG_DEPTHRANGE_FAR, f32tof24(farVal));
|
||||
GPUCMD_AddWrite(GPUREG_DEPTHMAP_SCALE, f32tof24(zScale));
|
||||
GPUCMD_AddWrite(GPUREG_DEPTHMAP_OFFSET, f32tof24(zOffset));
|
||||
}
|
||||
|
||||
void GPU_SetAlphaTest(bool enable, GPU_TESTFUNC function, u8 ref)
|
||||
|
Loading…
Reference in New Issue
Block a user