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 surface verts */
|
||||
0, /* max surface indexes */
|
||||
qfalse, /* wolf lighting model? */
|
||||
0, /* lightmap width/height */
|
||||
0, /* lightmap gamma */
|
||||
qfalse, /* lightmap sRGB */
|
||||
|
|
|
@ -103,7 +103,6 @@
|
|||
65535, /* max lightmapped surface verts */
|
||||
65535, /* max surface verts */
|
||||
1048575, /* max surface indexes */
|
||||
qfalse, /* wolf lighting model? */
|
||||
512, /* lightmap width/height */
|
||||
1.0f, /* lightmap gamma */
|
||||
qfalse, /* lightmap sRGB */
|
||||
|
|
|
@ -153,7 +153,6 @@ void HelpLight()
|
|||
{
|
||||
struct HelpOption light[] = {
|
||||
{"-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)"},
|
||||
{"-areascale <F, `-area` F>", "Scaling factor for area lights (surfacelight)"},
|
||||
{"-border", "Add a red border to lightmaps for debugging"},
|
||||
|
@ -220,7 +219,6 @@ void HelpLight()
|
|||
{"-novertex", "Disable vertex lighting"},
|
||||
{"-patchshadows", "Cast shadows from patches"},
|
||||
{"-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"},
|
||||
{"-samplesize <N>", "Sets default lightmap resolution in luxels/qu"},
|
||||
{"-samples <N>", "Adaptive supersampling quality"},
|
||||
|
@ -228,7 +226,6 @@ void HelpLight()
|
|||
{"-shadeangle <A>", "Angle for phong shading"},
|
||||
{"-shade", "Enable phong shading at default shade angle"},
|
||||
{"-skyscale <F, `-sky` F>", "Scaling factor for sky and sun light"},
|
||||
{"-smooth", "Deprecated alias for `-samples 2`"},
|
||||
{"-srffile <filename.srf>", "Surface file to read"},
|
||||
{"-style, -styles", "Enable support for light styles"},
|
||||
{"-sunonly", "Only compute sun light"},
|
||||
|
@ -236,7 +233,6 @@ void HelpLight()
|
|||
{"-thresh <F>", "Triangle subdivision threshold"},
|
||||
{"-trianglecheck", "Broken check that should ensure luxels apply to the right triangle"},
|
||||
{"-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));
|
||||
|
|
|
@ -357,43 +357,21 @@ void CreateEntityLights( void ){
|
|||
/* handle 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? */
|
||||
/*if ( spawnflags & 1 ) {
|
||||
flags |= LIGHT_ATTEN_LINEAR;
|
||||
flags &= ~LIGHT_ATTEN_ANGLE;
|
||||
}*/
|
||||
|
||||
/* no angle attenuate? */
|
||||
/*if ( spawnflags & 2 ) {
|
||||
flags &= ~LIGHT_ATTEN_ANGLE;
|
||||
}*/
|
||||
/* linear attenuation? */
|
||||
if ( spawnflags & 1 ) {
|
||||
flags |= LIGHT_ATTEN_LINEAR;
|
||||
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;
|
||||
}*/
|
||||
/* no angle attenuate? */
|
||||
if ( spawnflags & 2 ) {
|
||||
flags &= ~LIGHT_ATTEN_ANGLE;
|
||||
}
|
||||
|
||||
|
||||
/* other flags (borrowed from wolf) */
|
||||
|
||||
/* wolf dark light? */
|
||||
if ( ( spawnflags & 4 ) || ( spawnflags & 8 ) ) {
|
||||
flags |= LIGHT_DARK;
|
||||
|
@ -2258,15 +2236,6 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "--- Light ---\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;
|
||||
Sys_Printf( " lightmap size: %d x %d pixels\n", lmCustomSize, lmCustomSize );
|
||||
|
||||
|
@ -2688,18 +2657,6 @@ int LightMain( int argc, char **argv ){
|
|||
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" ) ) {
|
||||
extraDist = atof( argv[ i + 1 ] );
|
||||
if ( extraDist < 0 ) {
|
||||
|
|
|
@ -242,9 +242,8 @@
|
|||
#define LIGHT_UNNORMALIZED 2048 /* vortex: do not normalize _color */
|
||||
|
||||
#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_WOLF_DEFAULT ( LIGHT_ATTEN_LINEAR | LIGHT_ATTEN_DISTANCE | LIGHT_GRID | LIGHT_SURFACES | LIGHT_FAST )
|
||||
|
||||
#define MAX_TRACE_TEST_NODES 256
|
||||
#define DEFAULT_INHIBIT_RADIUS 1.5f
|
||||
|
@ -537,12 +536,11 @@ typedef struct game_s
|
|||
int maxLMSurfaceVerts; /* default maximum meta surface verts */
|
||||
int maxSurfaceVerts; /* default maximum surface verts */
|
||||
int maxSurfaceIndexes; /* default maximum surface indexes (tris * 3) */
|
||||
qboolean wolfLight; /* when true, lights work like wolf q3map */
|
||||
int lightmapSize; /* bsp lightmap width/height */
|
||||
float lightmapGamma; /* default lightmap gamma */
|
||||
qboolean lightmapsRGB; /* default lightmap sRGB mode */
|
||||
qboolean texturesRGB; /* default texture sRGB mode */
|
||||
qboolean colorsRGB; /* default color sRGB mode */
|
||||
qboolean colorsRGB; /* default color sRGB mode */
|
||||
float lightmapExposure; /* default lightmap exposure */
|
||||
float lightmapCompensate; /* default lightmap compensate value */
|
||||
float gridScale; /* vortex: default lightgrid scale (affects both directional and ambient spectres) */
|
||||
|
@ -2196,7 +2194,6 @@ Q_EXTERN vportal_t *sorted_portals[ MAX_MAP_PORTALS * 2 ];
|
|||
------------------------------------------------------------------------------- */
|
||||
|
||||
/* commandline arguments */
|
||||
Q_EXTERN qboolean wolfLight Q_ASSIGN( qfalse );
|
||||
Q_EXTERN float extraDist Q_ASSIGN( 0.0f );
|
||||
Q_EXTERN qboolean loMem Q_ASSIGN( qfalse );
|
||||
Q_EXTERN qboolean noStyles Q_ASSIGN( qfalse );
|
||||
|
|
Loading…
Reference in a new issue