fix deluxemap when lit from the wrong side as good as possible (by ignoring the deluxemap contribution). now the invariant "deluxemap vector points away from the surface" should hold.
cull none + deluxemapping still is broken by design, but less broken now. git-svn-id: svn://svn.icculus.org/netradiant/trunk@111 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
42d241347b
commit
ef9e16cdb9
|
|
@ -2100,6 +2100,8 @@ void IlluminateRawLightmap( int rawLightmapNum )
|
|||
|
||||
/* add to light direction map (fixme: use luxel normal as starting point for deluxel?) */
|
||||
if( deluxemap )
|
||||
{
|
||||
if(DotProduct(normal, trace.direction) > 0) // do not take light from the back side
|
||||
{
|
||||
/* color to grayscale (photoshop rgb weighting) */
|
||||
brightness = trace.color[ 0 ] * 0.3f + trace.color[ 1 ] * 0.59f + trace.color[ 2 ] * 0.11f;
|
||||
|
|
@ -2109,6 +2111,7 @@ void IlluminateRawLightmap( int rawLightmapNum )
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* don't even bother with everything else if nothing was lit */
|
||||
if( totalLighted == 0 )
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user