HAHA. Fix a bug that prevented ANY non-sRGB builds with the current default build menu. For ages now. Also addd some attempt to track down a bounce issue.
This commit is contained in:
parent
f0df907b19
commit
a78573e0e9
|
|
@ -2343,12 +2343,21 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Colors are linear\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nosRGB" ) ) {
|
||||
else if ( !strcmp( argv[ i ], "-sRGB" ) ) {
|
||||
lightmapsRGB = qtrue;
|
||||
Sys_Printf( "Lighting is linear\n" );
|
||||
Sys_Printf( "Lighting is in sRGB\n" );
|
||||
texturesRGB = qtrue;
|
||||
Sys_Printf( "Textures are linear\n" );
|
||||
Sys_Printf( "Textures are in sRGB\n" );
|
||||
colorsRGB = qtrue;
|
||||
Sys_Printf( "Colors are in sRGB\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nosRGB" ) ) {
|
||||
lightmapsRGB = qfalse;
|
||||
Sys_Printf( "Lighting is linear\n" );
|
||||
texturesRGB = qfalse;
|
||||
Sys_Printf( "Textures are linear\n" );
|
||||
colorsRGB = qfalse;
|
||||
Sys_Printf( "Colors are linear\n" );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -551,6 +551,8 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
|
|||
|
||||
/* bouncing light? */
|
||||
if ( !bouncing ) {
|
||||
Sys_Printf( "BUG: RadSubdivideDiffuseLight !bouncing shouldn't happen\n" );
|
||||
|
||||
/* handle first-pass lights in normal q3a style */
|
||||
value = si->value;
|
||||
light->photons = value * area * areaScale;
|
||||
|
|
@ -616,6 +618,9 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
|
|||
light->dist = DotProduct( light->origin, normal );
|
||||
}
|
||||
|
||||
if (light->photons < 0 || light->add < 0 || light->color[0] < 0 || light->color[1] < 0 || light->color[2] < 0)
|
||||
Sys_Printf( "BUG: RadSubdivideDiffuseLight created a darkbulb\n" );
|
||||
|
||||
/* emit light from both sides? */
|
||||
if ( si->compileFlags & C_FOG || si->twoSided ) {
|
||||
light->flags |= LIGHT_TWOSIDED;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user