Dropped support for the RtCW lighting model (linear only). You can still
mark select lights as linear if you please.
This commit is contained in:
parent
4891ea16f8
commit
7f2d9153e2
5 changed files with 11 additions and 63 deletions
|
@ -58,7 +58,6 @@
|
||||||
0, /* max lightmapped surface verts */
|
0, /* max lightmapped surface verts */
|
||||||
0, /* max surface verts */
|
0, /* max surface verts */
|
||||||
0, /* max surface indexes */
|
0, /* max surface indexes */
|
||||||
qfalse, /* wolf lighting model? */
|
|
||||||
0, /* lightmap width/height */
|
0, /* lightmap width/height */
|
||||||
0, /* lightmap gamma */
|
0, /* lightmap gamma */
|
||||||
qfalse, /* lightmap sRGB */
|
qfalse, /* lightmap sRGB */
|
||||||
|
|
|
@ -103,7 +103,6 @@
|
||||||
65535, /* max lightmapped surface verts */
|
65535, /* max lightmapped surface verts */
|
||||||
65535, /* max surface verts */
|
65535, /* max surface verts */
|
||||||
1048575, /* max surface indexes */
|
1048575, /* max surface indexes */
|
||||||
qfalse, /* wolf lighting model? */
|
|
||||||
512, /* lightmap width/height */
|
512, /* lightmap width/height */
|
||||||
1.0f, /* lightmap gamma */
|
1.0f, /* lightmap gamma */
|
||||||
qfalse, /* lightmap sRGB */
|
qfalse, /* lightmap sRGB */
|
||||||
|
|
|
@ -153,7 +153,6 @@ void HelpLight()
|
||||||
{
|
{
|
||||||
struct HelpOption light[] = {
|
struct HelpOption light[] = {
|
||||||
{"-light <filename.map>", "Switch that enters this stage"},
|
{"-light <filename.map>", "Switch that enters this stage"},
|
||||||
{"-vlight <filename.map>", "Deprecated alias for `-light -fast` ... filename.map"},
|
|
||||||
{"-approx <N>", "Vertex light approximation tolerance (never use in conjunction with deluxemapping)"},
|
{"-approx <N>", "Vertex light approximation tolerance (never use in conjunction with deluxemapping)"},
|
||||||
{"-areascale <F, `-area` F>", "Scaling factor for area lights (surfacelight)"},
|
{"-areascale <F, `-area` F>", "Scaling factor for area lights (surfacelight)"},
|
||||||
{"-border", "Add a red border to lightmaps for debugging"},
|
{"-border", "Add a red border to lightmaps for debugging"},
|
||||||
|
@ -220,7 +219,6 @@ void HelpLight()
|
||||||
{"-novertex", "Disable vertex lighting"},
|
{"-novertex", "Disable vertex lighting"},
|
||||||
{"-patchshadows", "Cast shadows from patches"},
|
{"-patchshadows", "Cast shadows from patches"},
|
||||||
{"-pointscale <F, `-point` F>", "Scaling factor for point lights (light entities)"},
|
{"-pointscale <F, `-point` F>", "Scaling factor for point lights (light entities)"},
|
||||||
{"-q3", "Use nonlinear falloff curve by default (like Q3A)"},
|
|
||||||
{"-samplescale <F>", "Scales all lightmap resolutions"},
|
{"-samplescale <F>", "Scales all lightmap resolutions"},
|
||||||
{"-samplesize <N>", "Sets default lightmap resolution in luxels/qu"},
|
{"-samplesize <N>", "Sets default lightmap resolution in luxels/qu"},
|
||||||
{"-samples <N>", "Adaptive supersampling quality"},
|
{"-samples <N>", "Adaptive supersampling quality"},
|
||||||
|
@ -228,7 +226,6 @@ void HelpLight()
|
||||||
{"-shadeangle <A>", "Angle for phong shading"},
|
{"-shadeangle <A>", "Angle for phong shading"},
|
||||||
{"-shade", "Enable phong shading at default shade angle"},
|
{"-shade", "Enable phong shading at default shade angle"},
|
||||||
{"-skyscale <F, `-sky` F>", "Scaling factor for sky and sun light"},
|
{"-skyscale <F, `-sky` F>", "Scaling factor for sky and sun light"},
|
||||||
{"-smooth", "Deprecated alias for `-samples 2`"},
|
|
||||||
{"-srffile <filename.srf>", "Surface file to read"},
|
{"-srffile <filename.srf>", "Surface file to read"},
|
||||||
{"-style, -styles", "Enable support for light styles"},
|
{"-style, -styles", "Enable support for light styles"},
|
||||||
{"-sunonly", "Only compute sun light"},
|
{"-sunonly", "Only compute sun light"},
|
||||||
|
@ -236,7 +233,6 @@ void HelpLight()
|
||||||
{"-thresh <F>", "Triangle subdivision threshold"},
|
{"-thresh <F>", "Triangle subdivision threshold"},
|
||||||
{"-trianglecheck", "Broken check that should ensure luxels apply to the right triangle"},
|
{"-trianglecheck", "Broken check that should ensure luxels apply to the right triangle"},
|
||||||
{"-trisoup", "Convert brush faces to triangle soup"},
|
{"-trisoup", "Convert brush faces to triangle soup"},
|
||||||
{"-wolf", "Use linear falloff curve by default (like W:ET)"},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
HelpOptions("Light Stage", 0, 80, light, sizeof(light)/sizeof(struct HelpOption));
|
HelpOptions("Light Stage", 0, 80, light, sizeof(light)/sizeof(struct HelpOption));
|
||||||
|
|
|
@ -357,43 +357,21 @@ void CreateEntityLights( void ){
|
||||||
/* handle spawnflags */
|
/* handle spawnflags */
|
||||||
spawnflags = IntForKey( e, "spawnflags" );
|
spawnflags = IntForKey( e, "spawnflags" );
|
||||||
|
|
||||||
/* ydnar: quake 3+ light behavior */
|
|
||||||
if ( wolfLight == qfalse ) {
|
|
||||||
/* set default flags */
|
|
||||||
flags = LIGHT_Q3A_DEFAULT;
|
flags = LIGHT_Q3A_DEFAULT;
|
||||||
|
|
||||||
/* linear attenuation? */
|
/* linear attenuation? */
|
||||||
/*if ( spawnflags & 1 ) {
|
if ( spawnflags & 1 ) {
|
||||||
flags |= LIGHT_ATTEN_LINEAR;
|
flags |= LIGHT_ATTEN_LINEAR;
|
||||||
flags &= ~LIGHT_ATTEN_ANGLE;
|
flags &= ~LIGHT_ATTEN_ANGLE;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/* no angle attenuate? */
|
/* no angle attenuate? */
|
||||||
/*if ( spawnflags & 2 ) {
|
if ( spawnflags & 2 ) {
|
||||||
flags &= ~LIGHT_ATTEN_ANGLE;
|
flags &= ~LIGHT_ATTEN_ANGLE;
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar: wolf light behavior */
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* set default flags */
|
|
||||||
flags = LIGHT_WOLF_DEFAULT;
|
|
||||||
|
|
||||||
/* inverse distance squared attenuation? */
|
|
||||||
/*if ( spawnflags & 1 ) {
|
|
||||||
flags &= ~LIGHT_ATTEN_LINEAR;
|
|
||||||
flags |= LIGHT_ATTEN_ANGLE;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/* angle attenuate? */
|
|
||||||
/*if ( spawnflags & 2 ) {
|
|
||||||
flags |= LIGHT_ATTEN_ANGLE;
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/* other flags (borrowed from wolf) */
|
/* other flags (borrowed from wolf) */
|
||||||
|
|
||||||
/* wolf dark light? */
|
/* wolf dark light? */
|
||||||
if ( ( spawnflags & 4 ) || ( spawnflags & 8 ) ) {
|
if ( ( spawnflags & 4 ) || ( spawnflags & 8 ) ) {
|
||||||
flags |= LIGHT_DARK;
|
flags |= LIGHT_DARK;
|
||||||
|
@ -2258,15 +2236,6 @@ int LightMain( int argc, char **argv ){
|
||||||
Sys_Printf( "--- Light ---\n" );
|
Sys_Printf( "--- Light ---\n" );
|
||||||
Sys_Printf( "--- ProcessGameSpecific ---\n" );
|
Sys_Printf( "--- ProcessGameSpecific ---\n" );
|
||||||
|
|
||||||
/* set standard game flags */
|
|
||||||
wolfLight = game->wolfLight;
|
|
||||||
if ( wolfLight == qtrue ) {
|
|
||||||
Sys_Printf( " lighting model: wolf\n" );
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Sys_Printf( " lighting model: quake3\n" );
|
|
||||||
}
|
|
||||||
|
|
||||||
lmCustomSize = game->lightmapSize;
|
lmCustomSize = game->lightmapSize;
|
||||||
Sys_Printf( " lightmap size: %d x %d pixels\n", lmCustomSize, lmCustomSize );
|
Sys_Printf( " lightmap size: %d x %d pixels\n", lmCustomSize, lmCustomSize );
|
||||||
|
|
||||||
|
@ -2688,18 +2657,6 @@ int LightMain( int argc, char **argv ){
|
||||||
useCustomInfoParms = qtrue;
|
useCustomInfoParms = qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( !strcmp( argv[ i ], "-wolf" ) ) {
|
|
||||||
/* -game should already be set */
|
|
||||||
wolfLight = qtrue;
|
|
||||||
Sys_Printf( "Enabling Wolf lighting model (linear default)\n" );
|
|
||||||
}
|
|
||||||
|
|
||||||
else if ( !strcmp( argv[ i ], "-q3" ) ) {
|
|
||||||
/* -game should already be set */
|
|
||||||
wolfLight = qfalse;
|
|
||||||
Sys_Printf( "Enabling Quake 3 lighting model (nonlinear default)\n" );
|
|
||||||
}
|
|
||||||
|
|
||||||
else if ( !strcmp( argv[ i ], "-extradist" ) ) {
|
else if ( !strcmp( argv[ i ], "-extradist" ) ) {
|
||||||
extraDist = atof( argv[ i + 1 ] );
|
extraDist = atof( argv[ i + 1 ] );
|
||||||
if ( extraDist < 0 ) {
|
if ( extraDist < 0 ) {
|
||||||
|
|
|
@ -242,9 +242,8 @@
|
||||||
#define LIGHT_UNNORMALIZED 2048 /* vortex: do not normalize _color */
|
#define LIGHT_UNNORMALIZED 2048 /* vortex: do not normalize _color */
|
||||||
|
|
||||||
#define LIGHT_SUN_DEFAULT ( LIGHT_ATTEN_ANGLE | LIGHT_GRID | LIGHT_SURFACES )
|
#define LIGHT_SUN_DEFAULT ( LIGHT_ATTEN_ANGLE | LIGHT_GRID | LIGHT_SURFACES )
|
||||||
#define LIGHT_AREA_DEFAULT ( LIGHT_ATTEN_ANGLE | LIGHT_ATTEN_DISTANCE | LIGHT_GRID | LIGHT_SURFACES ) /* q3a and wolf are the same */
|
#define LIGHT_AREA_DEFAULT ( LIGHT_ATTEN_ANGLE | LIGHT_ATTEN_DISTANCE | LIGHT_GRID | LIGHT_SURFACES )
|
||||||
#define LIGHT_Q3A_DEFAULT ( LIGHT_ATTEN_ANGLE | LIGHT_ATTEN_DISTANCE | LIGHT_GRID | LIGHT_SURFACES | LIGHT_FAST )
|
#define LIGHT_Q3A_DEFAULT ( LIGHT_ATTEN_ANGLE | LIGHT_ATTEN_DISTANCE | LIGHT_GRID | LIGHT_SURFACES | LIGHT_FAST )
|
||||||
#define LIGHT_WOLF_DEFAULT ( LIGHT_ATTEN_LINEAR | LIGHT_ATTEN_DISTANCE | LIGHT_GRID | LIGHT_SURFACES | LIGHT_FAST )
|
|
||||||
|
|
||||||
#define MAX_TRACE_TEST_NODES 256
|
#define MAX_TRACE_TEST_NODES 256
|
||||||
#define DEFAULT_INHIBIT_RADIUS 1.5f
|
#define DEFAULT_INHIBIT_RADIUS 1.5f
|
||||||
|
@ -537,7 +536,6 @@ typedef struct game_s
|
||||||
int maxLMSurfaceVerts; /* default maximum meta surface verts */
|
int maxLMSurfaceVerts; /* default maximum meta surface verts */
|
||||||
int maxSurfaceVerts; /* default maximum surface verts */
|
int maxSurfaceVerts; /* default maximum surface verts */
|
||||||
int maxSurfaceIndexes; /* default maximum surface indexes (tris * 3) */
|
int maxSurfaceIndexes; /* default maximum surface indexes (tris * 3) */
|
||||||
qboolean wolfLight; /* when true, lights work like wolf q3map */
|
|
||||||
int lightmapSize; /* bsp lightmap width/height */
|
int lightmapSize; /* bsp lightmap width/height */
|
||||||
float lightmapGamma; /* default lightmap gamma */
|
float lightmapGamma; /* default lightmap gamma */
|
||||||
qboolean lightmapsRGB; /* default lightmap sRGB mode */
|
qboolean lightmapsRGB; /* default lightmap sRGB mode */
|
||||||
|
@ -2196,7 +2194,6 @@ Q_EXTERN vportal_t *sorted_portals[ MAX_MAP_PORTALS * 2 ];
|
||||||
------------------------------------------------------------------------------- */
|
------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* commandline arguments */
|
/* commandline arguments */
|
||||||
Q_EXTERN qboolean wolfLight Q_ASSIGN( qfalse );
|
|
||||||
Q_EXTERN float extraDist Q_ASSIGN( 0.0f );
|
Q_EXTERN float extraDist Q_ASSIGN( 0.0f );
|
||||||
Q_EXTERN qboolean loMem Q_ASSIGN( qfalse );
|
Q_EXTERN qboolean loMem Q_ASSIGN( qfalse );
|
||||||
Q_EXTERN qboolean noStyles Q_ASSIGN( qfalse );
|
Q_EXTERN qboolean noStyles Q_ASSIGN( qfalse );
|
||||||
|
|
Loading…
Reference in a new issue