Further cleanup of lighting code.

- remove thing color from lighting calculations.
- implement alpha textures and inverse sprites for infrared as texture modes. This still requires some handling for the alpha texture mode for non-shader rendering because there is no way in the fixed pipeline to do it. The inverted texture effect can be done with a texture combiner.
- fixed: ThingColor for sprites was set in the wrong place. It must be in the Process function, not in the lighting calculation.
- added functions for isolated calculation of sprites' dynlight color.
This commit is contained in:
Christoph Oelckers 2014-05-11 17:56:38 +02:00
commit 7793bbbcc9
11 changed files with 134 additions and 73 deletions

View file

@ -338,6 +338,7 @@ void FGLRenderer::DrawTexture(FTexture *img, DCanvas::DrawParms &parms)
else
{
// This is an alpha texture
gl_RenderState.SetTextureMode(TM_REDTOALPHA);
gltex->BindPatch(CM_SHADE, 0);
}