diff options
| author | Jules Blok <jules.blok@gmail.com> | 2015-05-06 22:42:06 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2015-05-08 14:32:16 +0200 |
| commit | 0f2c72f0f844c219e168faa7de8dd515f8723fdc (patch) | |
| tree | 5b05c1fc8ea173688cf0a2945dc1cc5c9743fe2d /Source/Core/VideoBackends/OGL/TextureCache.cpp | |
| parent | b0770e2a0c2e391139db1365ca3658ada0f87da0 (diff) | |
VideoCommon: Clamp integer conversions.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/TextureCache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index a904ca64af..177d33432d 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -294,7 +294,7 @@ void TextureCache::CompileShaders() "\n" "void main(){\n" " vec4 texcol = texture(samp9, vec3(f_uv0.xy, %s));\n" - " int depth = int(floor(texcol.x * 16777216.0));\n" + " int depth = clamp(int(texcol.x * 16777216.0), 0, 0xFFFFFF);\n" // Convert to Z24 format " ivec4 workspace;\n" |
