mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Revert "VideoCommon: Clamp integer conversions."
This reverts commit 0f2c72f0f8
.
This commit is contained in:
@ -492,7 +492,7 @@ static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteSampleColor(p, "r", "depth", 0, ApiType);
|
||||
if (ApiType == API_D3D) WRITE(p, "depth = 1.0f - depth;\n");
|
||||
|
||||
WRITE(p, " depth = clamp(depth * 16777216.0, 0.0, float(0xFFFFFF));\n");
|
||||
WRITE(p, " depth *= 16777216.0;\n");
|
||||
WRITE(p, " expanded.r = floor(depth / (256.0 * 256.0));\n");
|
||||
WRITE(p, " depth -= expanded.r * 256.0 * 256.0;\n");
|
||||
WRITE(p, " expanded.g = floor(depth / 256.0);\n");
|
||||
@ -503,7 +503,7 @@ static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteSampleColor(p, "r", "depth", 1, ApiType);
|
||||
if (ApiType == API_D3D) WRITE(p, "depth = 1.0f - depth;\n");
|
||||
|
||||
WRITE(p, " depth = clamp(depth * 16777216.0, 0.0, float(0xFFFFFF));\n");
|
||||
WRITE(p, " depth *= 16777216.0;\n");
|
||||
WRITE(p, " expanded.r = floor(depth / (256.0 * 256.0));\n");
|
||||
WRITE(p, " depth -= expanded.r * 256.0 * 256.0;\n");
|
||||
WRITE(p, " expanded.g = floor(depth / 256.0);\n");
|
||||
@ -526,7 +526,7 @@ static void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
||||
WriteSampleColor(p, "r", "depth", 0, ApiType);
|
||||
if (ApiType == API_D3D) WRITE(p, "depth = 1.0f - depth;\n");
|
||||
|
||||
WRITE(p, " depth = clamp(depth * 16777216.0, 0.0, float(0xFFFFFF));\n");
|
||||
WRITE(p, " depth *= 16777216.0;\n");
|
||||
WRITE(p, " expanded.r = floor(depth / (256.0 * 256.0));\n");
|
||||
WRITE(p, " depth -= expanded.r * 256.0 * 256.0;\n");
|
||||
WRITE(p, " expanded.g = floor(depth / 256.0);\n");
|
||||
@ -539,7 +539,7 @@ static void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
||||
WriteSampleColor(p, "r", "depth", 1, ApiType);
|
||||
if (ApiType == API_D3D) WRITE(p, "depth = 1.0f - depth;\n");
|
||||
|
||||
WRITE(p, " depth = clamp(depth * 16777216.0, 0.0, float(0xFFFFFF));\n");
|
||||
WRITE(p, " depth *= 16777216.0;\n");
|
||||
WRITE(p, " expanded.r = floor(depth / (256.0 * 256.0));\n");
|
||||
WRITE(p, " depth -= expanded.r * 256.0 * 256.0;\n");
|
||||
WRITE(p, " expanded.g = floor(depth / 256.0);\n");
|
||||
@ -568,7 +568,7 @@ static void WriteZ24Encoder(char*& p, API_TYPE ApiType)
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
WRITE(p, " depth%i = clamp(depth%i * 16777216.0, 0.0, float(0xFFFFFF));\n", i, i);
|
||||
WRITE(p, " depth%i *= 16777216.0;\n", i);
|
||||
|
||||
WRITE(p, " expanded%i.r = floor(depth%i / (256.0 * 256.0));\n", i, i);
|
||||
WRITE(p, " depth%i -= expanded%i.r * 256.0 * 256.0;\n", i, i);
|
||||
|
Reference in New Issue
Block a user