mirror of
https://github.com/Garux/netradiant-custom.git
synced 2026-09-28 00:00:03 +02:00
fix RadLightForPatch planar test
This commit is contained in:
@@ -409,7 +409,7 @@ void ProcessDecals(){
|
||||
#if 0
|
||||
/* planar? (nuking this optimization as it doesn't work on non-rectangular quads) */
|
||||
if ( 0 && PlaneFromPoints( plane, dv[ 0 ]->xyz, dv[ 1 ]->xyz, dv[ 2 ]->xyz ) &&
|
||||
std::fabs( plane3_distance_to_point( plane, dv[ 1 ]->xyz ) ) <= PLANAR_EPSILON ) {
|
||||
std::fabs( plane3_distance_to_point( plane, dv[ 3 ]->xyz ) ) <= PLANAR_EPSILON ) {
|
||||
/* make a quad projector */
|
||||
MakeDecalProjector( p.shaderInfo, projection, distance, 4, dv );
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ void RadLightForPatch( int num, int lightmapNum, const rawLightmap_t *lm, const
|
||||
/* planar? */
|
||||
Plane3f plane;
|
||||
const bool planar = PlaneFromPoints( plane, quad[ 0 ]->xyz, quad[ 1 ]->xyz, quad[ 2 ]->xyz )
|
||||
&& std::fabs( plane3_distance_to_point( plane, quad[ 1 ]->xyz ) ) < PLANAR_EPSILON;
|
||||
&& std::fabs( plane3_distance_to_point( plane, quad[ 3 ]->xyz ) ) < PLANAR_EPSILON;
|
||||
/* generate a quad */
|
||||
if ( planar ) {
|
||||
radWinding_t rw;
|
||||
|
||||
Reference in New Issue
Block a user