Cosmetics.

This commit is contained in:
Jules Blok
2016-08-12 13:55:35 +02:00
parent 959d1879e5
commit 8c1c7fc2da
4 changed files with 12 additions and 12 deletions

View File

@ -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");
}