diff --git a/include/light/light.h b/include/light/light.h index 29e887e7..3354b8bc 100644 --- a/include/light/light.h +++ b/include/light/light.h @@ -273,7 +273,8 @@ extern qboolean parse_escape_sequences; extern qboolean scaledonly; extern unsigned int lightturb; extern uint32_t *extended_texinfo_flags; - +extern qboolean novis; + void SetupDirt(); /* Used by fence texture sampling */ diff --git a/light/light.cc b/light/light.cc index 34318761..ea256507 100644 --- a/light/light.cc +++ b/light/light.cc @@ -91,6 +91,7 @@ int write_luxfile = 0; /* 0 for none, 1 for .lux, 2 for bspx, 3 for both */ qboolean onlyents = false; qboolean phongDebug = false; qboolean parse_escape_sequences = true; +qboolean novis = false; /* if true, don't use vis data */ uint32_t *extended_texinfo_flags = NULL; @@ -911,6 +912,9 @@ main(int argc, const char **argv) phongDebug = true; write_litfile |= 1; logprint( "Phong shading debug mode enabled\n" ); + } else if ( !strcmp( argv[ i ], "-novis" ) ) { + novis = true; + logprint( "Skipping use of vis data to optimize lighting\n" ); } else if (argv[i][0] == '-') Error("Unknown option \"%s\"", argv[i]); else diff --git a/light/ltface.c b/light/ltface.c index ca713db4..1a4db872 100644 --- a/light/ltface.c +++ b/light/ltface.c @@ -1174,6 +1174,7 @@ VisCullEntity(const bsp2_t *bsp, const lightsurf_t *lightsurf, const entity_t *e { int i; + if (novis) return false; if (lightsurf->pvs == NULL) return false; if (entity->leaf == NULL) return false;