Skip to content

Commit

Permalink
Don't wash out HDR vertex lite surfaces in OpenGL2
Browse files Browse the repository at this point in the history
Vertex lite surfaces being brighter than light maps looks bad,
they're meant to look the same. Especially in ET, which mixes
them fequently. It's noticeable in Q3 too though.

BSP lightmaps (i.e. not external HDR lightmaps) use
R_ColorShiftLightingBytes, now *Floats (used by vertex colors)
has the same behavior.

This may be a problem for HDR lightmaps, as the RGB will always be
scaled to 0.0 to 1.0 range.

I had enabled this for non-HDR before, but now HDR needs it too.
  • Loading branch information
zturtleman committed Mar 8, 2014
1 parent 8caeb62 commit e7f4354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/renderergl2/tr_bsp.c
Expand Up @@ -143,7 +143,7 @@ static void R_ColorShiftLightingFloats(float in[4], float out[4], float scale )
b = in[2] * scale;

// normalize by color instead of saturating to white
if ( !r_hdr->integer && ( r > 1 || g > 1 || b > 1 ) ) {
if ( r > 1 || g > 1 || b > 1 ) {
float max;

max = r > g ? r : g;
Expand Down

0 comments on commit e7f4354

Please sign in to comment.