q3map2 * _maxlight worldspawn key (works unless exposure is used) (for those, who know, what they do)
This commit is contained in:
parent
070161fd13
commit
f2f36df58f
|
|
@ -1957,6 +1957,13 @@ void LightWorld( qboolean fastAllocate ){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* maxlight */
|
||||||
|
value = ValueForKey( &entities[ 0 ], "_maxlight" );
|
||||||
|
if ( value[ 0 ] != '\0' ) {
|
||||||
|
f = atof( value );
|
||||||
|
maxLight = f > 255? 255 : f < 0? 0 : f;
|
||||||
|
}
|
||||||
|
|
||||||
/* create world lights */
|
/* create world lights */
|
||||||
Sys_FPrintf( SYS_VRB, "--- CreateLights ---\n" );
|
Sys_FPrintf( SYS_VRB, "--- CreateLights ---\n" );
|
||||||
CreateEntityLights();
|
CreateEntityLights();
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,8 @@ void ColorToBytes( const float *color, byte *colorBytes, float scale ){
|
||||||
if ( lightmapExposure == 0 ) {
|
if ( lightmapExposure == 0 ) {
|
||||||
/* clamp with color normalization */
|
/* clamp with color normalization */
|
||||||
max = VectorMax( sample );
|
max = VectorMax( sample );
|
||||||
if ( max > 255.0f ) {
|
if ( max > maxLight ) {
|
||||||
VectorScale( sample, ( 255.0f / max ), sample );
|
VectorScale( sample, ( maxLight / max ), sample );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -2393,6 +2393,7 @@ Q_EXTERN int defaultLightSubdivide Q_ASSIGN( 999 );
|
||||||
|
|
||||||
Q_EXTERN vec3_t ambientColor;
|
Q_EXTERN vec3_t ambientColor;
|
||||||
Q_EXTERN vec3_t minLight, minVertexLight, minGridLight;
|
Q_EXTERN vec3_t minLight, minVertexLight, minGridLight;
|
||||||
|
Q_EXTERN float maxLight Q_ASSIGN( 255.f );
|
||||||
|
|
||||||
Q_EXTERN int *entitySurface;
|
Q_EXTERN int *entitySurface;
|
||||||
Q_EXTERN vec3_t *surfaceOrigin;
|
Q_EXTERN vec3_t *surfaceOrigin;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user