mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
Still some little improvements to flares.
This commit is contained in:
parent
d18f7bb738
commit
57cc0f901e
2 changed files with 8 additions and 1 deletions
|
@ -354,13 +354,17 @@ void RB_RenderFlare( flare_t *f ) {
|
|||
VectorScale(f->color, f->drawIntensity * tr.identityLight * intensity, color);
|
||||
|
||||
// Calculations for fogging
|
||||
if(f->fogNum)
|
||||
if(f->fogNum < tr.world->numfogs)
|
||||
{
|
||||
tess.numVertexes = 1;
|
||||
VectorCopy(f->origin, tess.xyz[0]);
|
||||
tess.fogNum = f->fogNum;
|
||||
|
||||
RB_CalcModulateColorsByFog(fogFactors);
|
||||
|
||||
// We don't need to render the flare if colors are 0 anyways.
|
||||
if(!fogFactors[0] && !fogFactors[1] && !fogFactors[2])
|
||||
return;
|
||||
}
|
||||
|
||||
iColor[0] = color[0] * fogFactors[0];
|
||||
|
|
|
@ -3018,7 +3018,10 @@ static void CreateExternalShaders( void ) {
|
|||
int index;
|
||||
|
||||
for(index = 0; index < tr.flareShader->numUnfoggedPasses; index++)
|
||||
{
|
||||
tr.flareShader->stages[index]->adjustColorsForFog = ACFF_NONE;
|
||||
tr.flareShader->stages[index]->stateBits |= GLS_DEPTHTEST_DISABLE;
|
||||
}
|
||||
}
|
||||
|
||||
tr.sunShader = R_FindShader( "sun", LIGHTMAP_NONE, qtrue );
|
||||
|
|
Loading…
Reference in a new issue