mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Cosmetics.
This commit is contained in:
@ -406,13 +406,14 @@ ShaderCode GenerateVertexShaderCode(APIType api_type, const vertex_shader_uid_da
|
||||
out.Write("o.clipDist0 = o.pos.z + o.pos.w;\n"); // Near: z < -w
|
||||
out.Write("o.clipDist1 = -o.pos.z;\n"); // Far: z > 0
|
||||
|
||||
// We have to handle the depth range in the vertex shader, because some games will use a depth range beyond
|
||||
// the normal depth range of 0..1.
|
||||
out.Write("o.pos.z = o.pos.w * " I_PIXELCENTERCORRECTION".w - o.pos.z * " I_PIXELCENTERCORRECTION".z;\n");
|
||||
// We have to handle the depth range in the vertex shader, because some games will use a depth
|
||||
// range beyond the normal depth range of 0..1.
|
||||
out.Write("o.pos.z = o.pos.w * " I_PIXELCENTERCORRECTION ".w - "
|
||||
"o.pos.z * " I_PIXELCENTERCORRECTION ".z;\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
// User-defined clipping is not supported, thus we rely on the API to handle the depth range for us.
|
||||
// User-defined clipping is not supported, thus we rely on the API to handle the depth range.
|
||||
// We still need to take care of the reversed depth, so we do that here.
|
||||
out.Write("o.pos.z = -o.pos.z;\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user