- refactoring of fixed colormap stuff to have it better organized and to reduce the number of uniforms in the main shader.
This removes 3 uniforms, consisting of 9 floats. Those were merged into other values that never get used at the same time. It also moves the costly setup of the fixed colormap out of the render state into the 2D processing code. Since 3D forces use of render buffers now, it is no longer necessary to draw the entire scene with the colormap active, meaning it can be handled more efficiently.
This commit is contained in:
parent
9ff7e5a4ef
commit
4937848123
35 changed files with 248 additions and 451 deletions
|
|
@ -128,18 +128,11 @@ extern uint8_t DesaturateColormap[31][256];
|
|||
|
||||
enum EColorManipulation
|
||||
{
|
||||
CM_SPECIAL2D = -3, // the special colormaps get passed as color pair from the 2D drawer so they need a different value here.
|
||||
CM_PLAIN2D = -2, // regular 2D drawing.
|
||||
CM_INVALID = -1,
|
||||
CM_DEFAULT = 0, // untranslated
|
||||
CM_FIRSTSPECIALCOLORMAP, // first special fixed colormap
|
||||
CM_FIRSTSPECIALCOLORMAPFORCED = 0x08000000, // first special fixed colormap, application forced (for 2D overlays)
|
||||
|
||||
CM_FOGLAYER = 0x10000000, // Sprite shaped fog layer
|
||||
|
||||
// These are not to be passed to the texture manager
|
||||
CM_LITE = 0x20000000, // special values to handle these items without excessive hacking
|
||||
CM_TORCH = 0x20000010, // These are not real color manipulations
|
||||
};
|
||||
|
||||
#define CM_MAXCOLORMAP int(CM_FIRSTSPECIALCOLORMAP + SpecialColormaps.Size())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue