light = trace->light;
/* clear color */
- trace->forceSubsampling = qfalse; /* to make sure */
+ trace->forceSubsampling = 0.0f; /* to make sure */
VectorClear( trace->color );
VectorClear( trace->colorNoShadow );
VectorClear( trace->directionContribution );
{
/* trace */
TraceLine( trace );
+ trace->forceSubsampling *= add;
if( !(trace->compileFlags & C_SKY) || trace->opaque )
{
VectorClear( trace->color );
/* raytrace */
TraceLine( trace );
+ trace->forceSubsampling *= add;
if( trace->passSolid || trace->opaque )
{
VectorClear( trace->color );
}
/* force subsampling because the lighting is texture dependent */
- trace->forceSubsampling = qtrue;
+ trace->forceSubsampling = 1.0;
/* try to avoid double shadows near triangle seams */
if( u < -ASLF_EPSILON || u > (1.0f + ASLF_EPSILON) ||
/* sample light */
LightContributionToSample( trace );
- if(trace->forceSubsampling)
+ if(trace->forceSubsampling > 1.0f)
{
/* alphashadow: we subsample as deep as we can */
++lighted;
VectorAdd( deluxel, trace.directionContribution, deluxel );
/* check for evilness */
- if(trace.forceSubsampling && lightSamples > 1 && luxelFilterRadius == 0)
+ if(trace.forceSubsampling > 1.0f && lightSamples > 1 && luxelFilterRadius == 0)
{
totalLighted++;
*flag |= FLAG_FORCE_SUBSAMPLING; /* force */
int compileFlags; /* for determining surface compile flags traced through */
qboolean passSolid;
qboolean opaque;
- qboolean forceSubsampling; /* needs subsampling (alphashadow) */
+ vec_t forceSubsampling; /* needs subsampling (alphashadow), value = max color contribution possible from it */
/* working data */
int numTestNodes;