Skip to content

Commit

Permalink
PixelShaderGen: Revert the part of revision f7fcf7e that forced stret…
Browse files Browse the repository at this point in the history
…ching c from 0..255 to 0..256 (it's just an optimization in VideoSoftware which doesn't differ from floating point logic at all).

Fixes wrong clouds in the ZWW title screen.
  • Loading branch information
neobrain committed Feb 19, 2013
1 parent 65084d7 commit a82d41b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/LinearDiskCache.h
Expand Up @@ -24,7 +24,7 @@
// Increment this every time you change shader generation code.
enum
{
LINEAR_DISKCACHE_VER = 6980
LINEAR_DISKCACHE_VER = 6981
};

// On disk format:
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoCommon/Src/PixelShaderGen.cpp
Expand Up @@ -897,7 +897,7 @@ static void WriteStage(char *&p, int n, API_TYPE ApiType)
if (cc.bias != TevBias_COMPARE) // if not compare
{
//normal color combiner goes here
WRITE(p, "FIX_PRECISION_U8(%s * (%s %s FIX_PRECISION_U8(lerp(%s, %s, FIX_PRECISION_U8(%s*(256.0f/255.0f)))) %s))", tevScaleTable[cc.shift], "input_cd", tevOpTable[cc.op], "input_ca", "input_cb", "input_cc", tevBiasTable[cc.bias]);
WRITE(p, "FIX_PRECISION_U8(%s * (%s %s FIX_PRECISION_U8(lerp(%s, %s, %s)) %s))", tevScaleTable[cc.shift], "input_cd", tevOpTable[cc.op], "input_ca", "input_cb", "input_cc", tevBiasTable[cc.bias]);
}
else
{
Expand All @@ -923,7 +923,7 @@ static void WriteStage(char *&p, int n, API_TYPE ApiType)
if (ac.bias != TevBias_COMPARE) // if not compare
{
//normal alpha combiner goes here
WRITE(p, "FIX_PRECISION_U8(%s * (%s.a %s FIX_PRECISION_U8(lerp(%s.a, %s.a, FIX_PRECISION_U8(%s.a*(256.0f/255.0f)))) %s))", tevScaleTable[ac.shift], "input_ad", tevOpTable[ac.op], "input_aa", "input_ab", "input_ac", tevBiasTable[ac.bias]);
WRITE(p, "FIX_PRECISION_U8(%s * (%s.a %s FIX_PRECISION_U8(lerp(%s.a, %s.a, %s.a)) %s))", tevScaleTable[ac.shift], "input_ad", tevOpTable[ac.op], "input_aa", "input_ab", "input_ac", tevBiasTable[ac.bias]);
}
else
{
Expand Down

0 comments on commit a82d41b

Please sign in to comment.