diff --git a/lighting.cpp b/lighting.cpp index 54a0f1d..0ebccb8 100644 --- a/lighting.cpp +++ b/lighting.cpp @@ -154,7 +154,7 @@ unsigned char compute_faceVertex_light(const world_t* world, const face_t* face, auto point = vertex->toVec(); // Sample this face's lighting contribution - unsigned int light = sample_lightmap(world, face, faceBounds.find(face)->second, point) + (0xFF - face->baselight); + unsigned int light = sample_lightmap(world, face, faceBounds.find(face)->second, point); int numSamples = 1; // Collect edges connected to this vertex, filter out the smooth ones only @@ -210,7 +210,7 @@ unsigned char compute_faceVertex_light2(const world_t* world, const face_t* face auto point = vertex->toVec(); // Sample this face's lighting contribution - unsigned int light = sample_lightmap(world, face, faceBounds.find(face)->second, point) + (0xFF - face->baselight); + unsigned int light = sample_lightmap(world, face, faceBounds.find(face)->second, point); int numSamples = 1; const plane_t* thisPlane = &world->planes[face->plane_id]; @@ -345,7 +345,7 @@ unsigned char compute_faceVertex_light4(const world_t* world, const face_t* refF if (!sample_lightmap(world, face, faceBounds.find(face)->second, point, &sample)) continue; - light += sample + (0xFF - face->baselight); + light += sample; numSamples++; } @@ -393,7 +393,7 @@ unsigned char compute_faceVertex_light5(const world_t* world, const face_t* refF if (!sample_lightmap(world, face, faceBounds.find(face)->second, jitteredPoint, &sample)) continue; - light += sample + (0xFF - face->baselight); + light += sample; numSamples++; } }