mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VideoBackends: Allow the viewport to use the full depth range.
This commit is contained in:
@ -587,7 +587,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
|
||||
else
|
||||
out.Write("\tint zCoord = int(rawpos.z * 16777216.0);\n");
|
||||
}
|
||||
out.Write("\tzCoord = clamp(zCoord, " I_ZBIAS"[1].x - " I_ZBIAS"[1].y, " I_ZBIAS"[1].x);\n");
|
||||
out.Write("\tzCoord = clamp(zCoord, 0, 0xFFFFFF);\n");
|
||||
|
||||
// depth texture can safely be ignored if the result won't be written to the depth buffer (early_ztest) and isn't used for fog either
|
||||
const bool skip_ztexture = !per_pixel_depth && !bpmem.fog.c_proj_fsel.fsel;
|
||||
|
@ -96,8 +96,8 @@ void PixelShaderManager::SetConstants()
|
||||
|
||||
if (s_bViewPortChanged)
|
||||
{
|
||||
constants.zbias[1][0] = MathUtil::Clamp<u32>((u32)xfmem.viewport.farZ, 0, 0xFFFFFF);
|
||||
constants.zbias[1][1] = MathUtil::Clamp<u32>((u32)xfmem.viewport.zRange, 0, 0xFFFFFF);
|
||||
constants.zbias[1][0] = (u32)xfmem.viewport.farZ;
|
||||
constants.zbias[1][1] = (u32)xfmem.viewport.zRange;
|
||||
dirty = true;
|
||||
s_bViewPortChanged = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user