light: add -highlightseams flag
This commit is contained in:
parent
cf9344f684
commit
69879b4104
|
|
@ -150,6 +150,8 @@ typedef struct {
|
|||
|
||||
/* debug */
|
||||
|
||||
extern bool debug_highlightseams;
|
||||
|
||||
typedef enum {
|
||||
debugmode_none = 0,
|
||||
debugmode_phong,
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ qboolean onlyents = false;
|
|||
qboolean novisapprox = false;
|
||||
bool nolights = false;
|
||||
backend_t rtbackend = backend_embree;
|
||||
bool debug_highlightseams = false;
|
||||
debugmode_t debugmode = debugmode_none;
|
||||
bool verbose_log = false;
|
||||
|
||||
|
|
@ -1019,6 +1020,9 @@ light_main(int argc, const char **argv)
|
|||
|
||||
CheckNoDebugModeSet();
|
||||
debugmode = debugmode_debugneighbours;
|
||||
} else if ( !strcmp( argv[ i ], "-highlightseams" ) ) {
|
||||
logprint("Highlighting lightmap seams\n");
|
||||
debug_highlightseams = true;
|
||||
} else if ( !strcmp( argv[ i ], "-verbose" ) ) {
|
||||
verbose_log = true;
|
||||
} else if ( !strcmp( argv[ i ], "-help" ) ) {
|
||||
|
|
|
|||
|
|
@ -2797,9 +2797,13 @@ WriteLightmaps(const mbsp_t *bsp, bsp2_dface_t *face, facesup_t *facesup, const
|
|||
for (int t = 0; t < actual_height; t++) {
|
||||
for (int s = 0; s < actual_width; s++) {
|
||||
const int sampleindex = (t * actual_width) + s;
|
||||
const qvec4f &color = output_color.at(sampleindex);
|
||||
qvec4f color = output_color.at(sampleindex);
|
||||
const qvec4f &direction = output_dir.at(sampleindex);
|
||||
|
||||
if (debug_highlightseams && color[3] == 0) {
|
||||
color = qvec4f(255, 0, 0, 1);
|
||||
}
|
||||
|
||||
*lit++ = color[0];
|
||||
*lit++ = color[1];
|
||||
*lit++ = color[2];
|
||||
|
|
|
|||
Loading…
Reference in New Issue