Permalink
Browse files

renderer2: optimizations

  • Loading branch information...
core-c authored and IR4T4 committed Dec 4, 2018
1 parent 00d7462 commit 8e7069d61124e84766dbda46f2374ee58d1667a7
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/renderer2/tr_shade.c
@@ -3244,7 +3244,7 @@ void Tess_StageIteratorGeneric()
}
else
{
Render_generic(stage); //doesnt do normalmapped stuff
Render_generic(stage); // doesn't do normalmapped stuff
}
break;
}
@@ -3441,14 +3441,13 @@ void Tess_StageIteratorShadowFill()
continue;
}
Tess_ComputeTexMatrices(pStage);
switch (pStage->type)
{
case ST_COLORMAP:
{
if (tess.surfaceShader->sort <= SS_OPAQUE)
{
Tess_ComputeTexMatrices(pStage);
Render_shadowFill(stage);
}
break;
@@ -3459,6 +3458,7 @@ void Tess_StageIteratorShadowFill()
case ST_COLLAPSE_lighting_DB:
case ST_COLLAPSE_lighting_DBS:
{
Tess_ComputeTexMatrices(pStage);
Render_shadowFill(stage);
break;
}
@@ -3559,29 +3559,32 @@ void Tess_StageIteratorLighting()
continue;
}
Tess_ComputeColor(attenuationXYStage);
R_ComputeFinalAttenuation(attenuationXYStage, light);
switch (diffuseStage->type)
{
case ST_DIFFUSEMAP:
case ST_COLLAPSE_lighting_DB:
case ST_COLLAPSE_lighting_DBS:
if (light->l.rlType == RL_OMNI)
{
Tess_ComputeColor(attenuationXYStage);
R_ComputeFinalAttenuation(attenuationXYStage, light);
Render_forwardLighting_DBS_omni(diffuseStage, attenuationXYStage, attenuationZStage, light);
}
else if (light->l.rlType == RL_PROJ)
{
if (!light->l.inverseShadows)
{
Tess_ComputeColor(attenuationXYStage);
R_ComputeFinalAttenuation(attenuationXYStage, light);
Render_forwardLighting_DBS_proj(diffuseStage, attenuationXYStage, attenuationZStage, light);
}
}
else if (light->l.rlType == RL_DIRECTIONAL)
{
//if(!light->l.inverseShadows)
{
Tess_ComputeColor(attenuationXYStage);
R_ComputeFinalAttenuation(attenuationXYStage, light);
Render_forwardLighting_DBS_directional(diffuseStage, attenuationXYStage, attenuationZStage, light);
}
}

0 comments on commit 8e7069d

Please sign in to comment.