fix RadLightForPatch planar test

This commit is contained in:
Garux
2025-12-02 01:55:31 +05:00
parent 8b255b32cc
commit 758837dd1c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 );
}
+1 -1
View File
@@ -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;