summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2016-10-23 19:54:28 +0200
committerJules Blok <jules.blok@gmail.com>2016-10-23 19:54:28 +0200
commit5c406b5ef0a0604bd443b4f3e7d52b2ac6fbc2cf (patch)
tree31dbd7ea4d3c4d8d4694475cae309b3443c97c5c /Source/Core/VideoCommon/PixelShaderGen.cpp
parentce5881220ff3e0054d5d7c5e7dced3b08d9ef779 (diff)
PixelShaderGen: Fix implicit type conversions.
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index f3a91433c6..3442bf40c5 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -1288,26 +1288,26 @@ static void WriteFog(ShaderCode& out, const pixel_shader_uid_data* uid_data)
static void WriteColor(ShaderCode& out, const pixel_shader_uid_data* uid_data)
{
if (uid_data->rgba6_format)
- out.Write("\tocol0.rgb = (prev.rgb >> 2) / 63.0;\n");
+ out.Write("\tocol0.rgb = float3(prev.rgb >> 2) / 63.0;\n");
else
- out.Write("\tocol0.rgb = prev.rgb / 255.0;\n");
+ out.Write("\tocol0.rgb = float3(prev.rgb) / 255.0;\n");
// Colors will be blended against the 8-bit alpha from ocol1 and
// the 6-bit alpha from ocol0 will be written to the framebuffer
if (uid_data->dstAlphaMode == DSTALPHA_NONE)
{
- out.Write("\tocol0.a = (prev.a >> 2) / 63.0;\n");
- out.Write("\tocol1.a = prev.a / 255.0;\n");
+ out.Write("\tocol0.a = float(prev.a >> 2) / 63.0;\n");
+ out.Write("\tocol1.a = float(prev.a) / 255.0;\n");
}
else
{
out.SetConstantsUsed(C_ALPHA, C_ALPHA);
- out.Write("\tocol0.a = (" I_ALPHA ".a >> 2) / 63.0;\n");
+ out.Write("\tocol0.a = float(" I_ALPHA ".a >> 2) / 63.0;\n");
// Use dual-source color blending to perform dst alpha in a single pass
if (uid_data->dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
- out.Write("\tocol1.a = prev.a / 255.0;\n");
+ out.Write("\tocol1.a = float(prev.a) / 255.0;\n");
else
- out.Write("\tocol1.a = " I_ALPHA ".a / 255.0;\n");
+ out.Write("\tocol1.a = float(" I_ALPHA ".a) / 255.0;\n");
}
}