diff options
| author | skidau <skidau@gmail.com> | 2014-10-16 14:04:25 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2014-10-16 14:04:25 +1100 |
| commit | 3023abc1b53107e033527762c68cd7047300112b (patch) | |
| tree | d46fa1ffca2bad5bd882c860b40b6bd8e29f3365 /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | f27aabd4112069044797d5ffef44dc776dabe72f (diff) | |
| parent | 1227bd2ba6f6d5ba984751bc5985879b3c19ce4f (diff) | |
Merge pull request #1285 from degasus/master
PixelShaderGen: replace multiplication with shift
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index dec20636a9..ce136603a0 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -894,7 +894,7 @@ static inline void WriteTevRegular(T& out, const char* components, int bias, int // - a rounding bias is added before dividing by 256 out.Write("(((tevin_d.%s%s)%s)", components, tevBiasTable[bias], tevScaleTableLeft[shift]); out.Write(" %s ", tevOpTable[op]); - out.Write("((((tevin_a.%s*256 + (tevin_b.%s-tevin_a.%s)*(tevin_c.%s+(tevin_c.%s>>7)))%s)%s)>>8)", + out.Write("(((((tevin_a.%s<<8) + (tevin_b.%s-tevin_a.%s)*(tevin_c.%s+(tevin_c.%s>>7)))%s)%s)>>8)", components, components, components, components, components, tevScaleTableLeft[shift], tevLerpBias[2*op+(shift!=3)]); out.Write(")%s", tevScaleTableRight[shift]); |
