True Trueflame issues
As reported by wazabear here:
This mod's being really weird. Despite the original report saying not using shaders fixes it, it's actually not possible for OpenMW not to use shaders for it as it's got a bump map, and Capo had had enough of glTexEnv before he figured out how to make the FFP handle those. I've had it broken in two different ways locally - sometimes it looks like it's tested with the wrong threshold, and other times the testing appears okay, but there's a weird black outline that seems to move with the camera. I've turned everything that could possibly induce shaders to be used when they might otherwise not be, and have isolated lighting method = legacy
as the thing that changes between the two behaviours.
lighting method = shaders compatibility
(or shaders
)
lighting method = legacy
I'm reasonably sure at least some of the symptoms are because even though I've disabled A2C when both testing and blending are enabled, I didn't disable coveragePreservingAlphaScale
. I'm becoming increasingly concerned that I shouldn't have let CMAugust talk me into implementing it and should have told him to tell the MOP people to tell texture modders to re-export everything from GIMP with the right flags set to have coverage-preserving mipmaps with no meddling. Intelligent Textures doesn't work well with MOP already, so they're probably going to need a MOP-specific version anyway,
From the way the outline behaves, though, I think something might be reading uninitialised memory with legacy lighting as some shapes in the outline have some suspicious similarities to what I think the depth buffer for that pixel contains. I gave GLSLangValidator a go on the preprocessed shader, but it doesn't like GL_EXT_gpu_shader4
or any of the functions it provides, and doesn't seem to notice anything when I hack around that. @glassmancody.info might want to double-check this.
Part of the issue looks like it's similar to what I fixed with !966 (merged), though - it's definitely using a test threshold of 1.0 instead of 1.0/255.0 in the non-legacy lighting case.