Okay, good to see people scrutinising the ideas here, which is always a good thing to prevent wasted time and knots of legacy code. There are some points I agree with, but others I don't really see yet.
In chronological order:
Gez wrote: how long does it typically take?
It doesn't seem to add any visible overhead at this point, but I can't say beyond that. This is a moderately fast laptop and I have no data yet how it scales with hardware.
randi wrote:
Considering that GZDoom would have to regenerate every texture after changing the palette, using them for flashes doesn't sound very viable to me. (And isn't generally useful anyway.)
This is purely intended to be ZDoom (non openGL) code, to overcome a single limitation of the 8 bit renderer, the same way that other engines historically have, by setting the palette once per area (not during the level).
NeuralStunner wrote:Doesn't ZDoom generate colormaps for fogged sectors?
Could you link me a wad with fog so I can test this behaviour?
NeuralStunner wrote:The other issue with dynamic colormaps is losing support for fullbright colors
I had not even thought of this yet, if this is implemented I it guess could be fixed with extra ZMAPINFO flags or similar, it depends how much extra code is tolerable.
NeuralStunner wrote:
I think it would make sense to only generate a colormap if one isn't specified.
Agreed. If a colormap is available there's no way we could get more authenticity than that anyway. The code I've written could also be adapted to test if any present colormap would be sane for the palette before generating a new one.
Graf Zahl wrote:ZDoom never added Boom's TRANMAP for the exact same reason - it'd lock the renderer to 8 bit output.
...
It still is a crippling feature and would block a proper implementation of a true color software renderer.
Sometimes features have to be rejected just to prevent mappers from doing stuff they shouldn't even think of.
Could you explain this to me in more detail (either here or by PM is fine) as I really don't think I understand it myself. If ZDoom moved to 32 bit renderer, all the code for a palette switch workaround could be eliminated. (On a side note, a glance at the forum seems to suggest that a 32 bit solution would probably opt to ditch a lot of code anyway).
I'm sorry if I misunderstand badly, but I would guess that in 32 bit, the plan for current content is:
Doom GFX -> default palette -> decode to 32 bit graphic for use in renderer
whereas the flow with legacy content would be
check at wad loading if multiple palettes are used -> if yes, retrieve palette number at level loading
Doom GFX -> MAPINFO chosen palette slice -> decode to 32 bit...
which doesn't seem like much legacy code to get stuck with in the long run.
In any case, if 32 bit rendering were here tomorrow, I would agree that it is best to forget this idea - but do we have any progress in this area? I think whether to continue trying to implement a workaround should be decided by how long this need is likely to exist for.
Apologies for the long post, any misunderstandings and especially any misquoting.