allowing to customize how directional the light is
git-svn-id: svn://svn.icculus.org/netradiant/trunk@397 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
cf98832704
commit
714c463815
|
|
@ -1455,6 +1455,8 @@ void TraceGrid( int num )
|
||||||
{
|
{
|
||||||
/* get relative directed strength */
|
/* get relative directed strength */
|
||||||
d = DotProduct( contributions[ i ].dir, gp->dir );
|
d = DotProduct( contributions[ i ].dir, gp->dir );
|
||||||
|
/* we map 1 to gridDirectionality, and 0 to gridAmbientDirectionality */
|
||||||
|
d = gridAmbientDirectionality + d * (gridDirectionality - gridAmbientDirectionality);
|
||||||
if( d < 0.0f )
|
if( d < 0.0f )
|
||||||
d = 0.0f;
|
d = 0.0f;
|
||||||
|
|
||||||
|
|
@ -1988,6 +1990,26 @@ int LightMain( int argc, char **argv )
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if( !strcmp( argv[ i ], "-griddirectionality" ) )
|
||||||
|
{
|
||||||
|
f = atof( argv[ i + 1 ] );
|
||||||
|
if(f < 0) f = 0;
|
||||||
|
if(f > gridAmbientDirectionality) f = gridAmbientDirectionality;
|
||||||
|
Sys_Printf( "Grid directionality is %f\n", f );
|
||||||
|
gridDirectionality *= f;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if( !strcmp( argv[ i ], "-gridambientdirectionality" ) )
|
||||||
|
{
|
||||||
|
f = atof( argv[ i + 1 ] );
|
||||||
|
if(f > gridDirectionality) f = gridDirectionality
|
||||||
|
if(f > 1) f = 1;
|
||||||
|
Sys_Printf( "Grid ambient directionality is %f\n", f );
|
||||||
|
gridAmbientDirectionality *= f;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
else if( !strcmp( argv[ i ], "-gamma" ) )
|
else if( !strcmp( argv[ i ], "-gamma" ) )
|
||||||
{
|
{
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
|
|
|
||||||
|
|
@ -2221,6 +2221,8 @@ Q_EXTERN float bounceScale Q_ASSIGN( 0.25f );
|
||||||
/* vortex: gridscale and gridambientscale */
|
/* vortex: gridscale and gridambientscale */
|
||||||
Q_EXTERN float gridScale Q_ASSIGN( 1.0f );
|
Q_EXTERN float gridScale Q_ASSIGN( 1.0f );
|
||||||
Q_EXTERN float gridAmbientScale Q_ASSIGN( 1.0f );
|
Q_EXTERN float gridAmbientScale Q_ASSIGN( 1.0f );
|
||||||
|
Q_EXTERN float gridDirectionality Q_ASSIGN( 1.0f );
|
||||||
|
Q_EXTERN float gridAmbientDirectionality Q_ASSIGN( 0.0f );
|
||||||
|
|
||||||
/* ydnar: lightmap gamma/compensation */
|
/* ydnar: lightmap gamma/compensation */
|
||||||
Q_EXTERN float lightmapGamma Q_ASSIGN( 1.0f );
|
Q_EXTERN float lightmapGamma Q_ASSIGN( 1.0f );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user