summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureConversionShader.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2015-08-15 13:46:34 +0200
committerJules Blok <jules.blok@gmail.com>2015-08-15 13:50:43 +0200
commitb01ca1794a81435c215519ef42b5ffd056a54170 (patch)
treedb4849f371fe876498fc70c683501bf35288411e /Source/Core/VideoCommon/TextureConversionShader.cpp
parente28fa1588febbfe24d37009ed38f89d4121d2473 (diff)
Revert "VideoCommon: Clamp integer conversions."
This reverts commit 0f2c72f0f844c219e168faa7de8dd515f8723fdc.
Diffstat (limited to 'Source/Core/VideoCommon/TextureConversionShader.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureConversionShader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp
index f93d465a16..2d8b7ef9c9 100644
--- a/Source/Core/VideoCommon/TextureConversionShader.cpp
+++ b/Source/Core/VideoCommon/TextureConversionShader.cpp
@@ -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);