|
|
@ -154,7 +154,7 @@ unsigned char compute_faceVertex_light(const world_t* world, const face_t* face, |
|
|
auto point = vertex->toVec(); |
|
|
auto point = vertex->toVec(); |
|
|
|
|
|
|
|
|
// Sample this face's lighting contribution
|
|
|
// 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; |
|
|
int numSamples = 1; |
|
|
|
|
|
|
|
|
// Collect edges connected to this vertex, filter out the smooth ones only
|
|
|
// 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(); |
|
|
auto point = vertex->toVec(); |
|
|
|
|
|
|
|
|
// Sample this face's lighting contribution
|
|
|
// 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; |
|
|
int numSamples = 1; |
|
|
|
|
|
|
|
|
const plane_t* thisPlane = &world->planes[face->plane_id]; |
|
|
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)) |
|
|
if (!sample_lightmap(world, face, faceBounds.find(face)->second, point, &sample)) |
|
|
continue; |
|
|
continue; |
|
|
|
|
|
|
|
|
light += sample + (0xFF - face->baselight); |
|
|
|
|
|
|
|
|
light += sample; |
|
|
numSamples++; |
|
|
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)) |
|
|
if (!sample_lightmap(world, face, faceBounds.find(face)->second, jitteredPoint, &sample)) |
|
|
continue; |
|
|
continue; |
|
|
|
|
|
|
|
|
light += sample + (0xFF - face->baselight); |
|
|
|
|
|
|
|
|
light += sample; |
|
|
numSamples++; |
|
|
numSamples++; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|