- added colormap shader to postprocessing.
This replaces the in-place application of fullscreen colormaps if renderbuffers are active. This way the fully composed scene gets inverted, not each element on its own which is highly problematic for additively blended things.
That's again one less write access to the buffer. The uniform method was chosen because this way a buffer update can be completely avoided, and setting a single uniform is a lot cheaper and simpler to handle.
Added gl_renderbuffers CVAR that disables render buffers
Added patch shader support to FShaderProgram
Added OpenGL 2 fallback support to render buffers
This fixes some jerkiness with vertical scrollers due to a bad sine period and makes the overall appearance of the effect what it was originally supposed to be. The old warp2 shader was not created by replicating the formula but by trial and error until it looked close enough.
A version of the old warp2 shader with a fixed sine period is still available as a custom hardware shader.
* disable the dynamic light code if no buffers are available
* added a duplicate of the getTexel function which cannot be patched without creating syntax problems.
* fixe int<->float conversion warning, which on some compilers may be an error.
- fixed: The shader code for handling special fixed colormaps did not use the color vertex attribute which was most evident with the 'shadow' render style on the spectre.
Sadly, anything else makes no sense.
All the recently made changes live or die, depending on this extension's presence.
Without it, there are major performance issues with the buffer uploads. All of the traditional buffer upload methods are without exception horrendously slow, especially in the context of a Doom engine where frequent small updates are required.
It could be solved with a complete restructuring of the engine, of course, but that's hardly worth the effort, considering it's only for legacy hardware whose market share will inevitably shrink considerably over the next years.
And even then, under the best circumstances I'd still get the same performance as the old immediate mode renderer in GZDoom 1.x and still couldn't implement the additions I'd like to make.
So, since I need to keep GZDoom 1.x around anyway for older GL 2.x hardware, it may as well serve for 3.x hardware, too. It's certainly less work than constantly trying to find workarounds for the older hardware's limitations that cost more time than working on future-proofing the engine.
This new, trimmed down 4.x renderer runs on a core profile configuration and uses persistently mapped buffers for nearly everything that is getting transferred to the GPU. (The global uniforms are still being used as such but they'll be phased out after the first beta release.