Some basic fixed light support

This commit is contained in:
Magnus Norddahl 2016-11-15 23:30:42 +01:00
commit a092a03c6d
6 changed files with 21 additions and 10 deletions

View file

@ -82,9 +82,7 @@ void RenderPolyPlane::Render(const TriMatrix &worldToClip, subsector_t *sub, uin
TriUniforms uniforms;
uniforms.objectToClip = worldToClip;
uniforms.light = (uint32_t)(frontsector->lightlevel / 255.0f * 256.0f);
if (fixedlightlev >= 0)
uniforms.light = (uint32_t)(fixedlightlev / 255.0f * 256.0f);
else if (fixedcolormap)
if (fixedlightlev >= 0 || fixedcolormap)
uniforms.light = 256;
uniforms.flags = 0;
uniforms.subsectorDepth = isSky ? RenderPolyScene::SkySubsectorDepth : subsectorDepth;