Skip to content

Commit

Permalink
Map Renderer|Fixed: No so-called "fake contrast" for middle surfaces …
Browse files Browse the repository at this point in the history
…of two-sided lines

The id tech 1 software renderer does not apply a line-angle derived
light level delta to the middle surfaces of two-sided lines.

Todo for later: Make this behavior optional with a new side flag.
  • Loading branch information
danij-deng committed Aug 12, 2012
1 parent 84165ff commit d3b4243
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions doomsday/engine/portable/src/render/rend_main.c
Expand Up @@ -1753,10 +1753,17 @@ static boolean rendHEdgeSection(HEdge* hedge, SideDefSection section,
SideDef* frontSide = HEDGE_SIDEDEF(hedge);
float deltaL, deltaR, diff;

// Do not apply an angle based lighting delta if this surface's material
// has been chosen as a HOM fix (we must remain consistent with the lighting
// applied to the back plane (on this half-edge's back side)).
if(frontSide && isTwoSided && section != SS_MIDDLE && (surface->inFlags & SUIF_FIX_MISSING_MATERIAL))
/**
* Do not apply an angle based lighting delta if:
* a) This surface is the middle wall section of a two-sided line. The
* id tech 1 software renderer does not apply this effect to such
* surfaces. @todo Make this a sidedef flag?
* b) This surface's material has been chosen as a HOM fix (we must remain
* consistent with the lighting applied to the relative back plane (on
* this half-edge's back side)).
*/
if(frontSide && isTwoSided &&
(section == SS_MIDDLE || (surface->inFlags & SUIF_FIX_MISSING_MATERIAL)))
{
deltaL = deltaR = 0;
}
Expand Down

0 comments on commit d3b4243

Please sign in to comment.