Skip to content

Commit

Permalink
Added a sub-pixel offset to the halo/flare origin in GL_CalcLuminace …
Browse files Browse the repository at this point in the history
…so that they are centered to the middle of the brightest pixel.
  • Loading branch information
danij committed Jul 4, 2008
1 parent 829807d commit 37543f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doomsday/engine/portable/src/gl_tex.c
Expand Up @@ -1147,6 +1147,10 @@ void GL_CalcLuminance(int pnum, byte *buffer, int width, int height,
(*brightY) += region[2];
}

// Center on the middle of the brightest pixel.
(*brightX) += .5f;
(*brightY) += .5f;

// The color.
if(!avgCnt)
{
Expand Down

0 comments on commit 37543f2

Please sign in to comment.