Skip to content

Commit

Permalink
Added parentheses to weightedSpriteAlpha calculation
Browse files Browse the repository at this point in the history
Not actually needed but this avoids any ambiguity.
  • Loading branch information
danij-deng committed Feb 6, 2012
1 parent 3e0dadf commit 0b4130e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/r_things.c
Expand Up @@ -743,7 +743,7 @@ float R_ShadowStrength(mobj_t* mo)
// We use an average which factors in the coverage ratio
// of alpha:non-alpha pixels.
/// @todo Constant weights could stand some tweaking...
weightedSpriteAlpha = aa->alpha * 0.4f + (1-aa->coverage) * 0.6f;
weightedSpriteAlpha = aa->alpha * (0.4f + (1-aa->coverage) * 0.6f);

// Almost entirely translucent sprite? => no shadow.
if(weightedSpriteAlpha < minSpriteAlphaLimit) return 0;
Expand Down

0 comments on commit 0b4130e

Please sign in to comment.