- fixed voxel lighting.

In all that impenetrable voodoo math from Polymost it picked the wrong vector to calculate the depth of the scene and since I apparently removed the compensation math for the broken shader on the C++ side the calculated value was no longer correct.
That Polymost renderer really needs to go away. :(
This commit is contained in:
Christoph Oelckers 2019-12-19 17:51:33 +01:00
parent a38077a17e
commit ee93c6e366
3 changed files with 14 additions and 11 deletions

View file

@ -1091,8 +1091,7 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
GLInterface.EnableBlend(true); // else GLInterface.EnableBlend(false);
}
else pc[3] = 1.f;
GLInterface.SetFadeDisable(true); // disable depth fading. The voxel code is somewhat broken and messes this up.
GLInterface.SetShade(0, numshades);
GLInterface.SetShade(std::max(0, globalshade), numshades);
//------------
//transform to Build coords