If there is a solution via standard OpenGL pipeline, I would implement it in ZenGL, but there is a problem with that. One solution, which can do things like this is color matrix, but latest drivers for new hardware are not support them(here the demo with grayscale effect in realtime, but seems it works only on my ArchLinux with Radeon HD 4650 and Radeon HD 5850 ). Another way - pixel shaders, but for now ZenGL doesn't provide functionality for them. So, the only possible way for now is using different textures. You can modify them in any graphical editor and save for later using, or modify pixels during loading the texture via tex_LoadFromFile. For this - add to flags TEX_CUSTOM_EFFECT and register your own postprocess procedure via zgl_Reg and constant TEX_CURRENT_EFFECT:
Code:
procedure myHUE( var pData : Pointer; Width, Height : Word );
where pData - pointer to pixels in RGBA, which you must modify.
Originally Posted by
NickS
or make variations of monsters with different colours
One more solution - color mix(function fx2d_SetColor, see demo05), but it's not so good as changing hue.
Bookmarks