WIP : Overlays & Rendering
Well, as you have probably already noticed from the pictures above, I've been quite busy lately with improvements regarding the Overlays and the vectors rendering. This comprehends these three different tasks :
- Rewriting the OpenGL code responsible for rendering the overlays :
In the previous versions, the transparent areas in the overlays were obviously too dark (the colors were barely visible, and the vectors drawn in such areas did not have their colors altered enough).
The new overlays handler now displays textures in a much more colorful way (especially for the vectors showing through the transparent areas), and it also provides different rendering modes, so that every user can select (through a menu) the one that best fits his monitor brightness.
This task is 100% completed.
- Improving the overlays texture quality :
So far, the textures used for the overlays were poor quality pictures found here and there on the Internet, and that I had to alter a bit to conform with the ParaJVE rendering engine. If this was enough for a first shot, it's now clearly not good enough when the emulator is run within a large window (let alone fullscreen).
Therefore, I've decided to create all the overlay textures from scratch. This is a long-drawn-out job that I've been postponing for too long, but the result is really well worth the pain. So far, I've done 12 overlays (Armor Attack, Berzerk, Blitz, CosmicChasm, HyperChase, MineStorm, Fortress of Narzod, RipOff, Scramble, SolarQuest, SpaceWars, and StarHawk) and there is about 12 more to go before the task is over.
The only drawback is that the new overlays size will drastically increase (about 10 to 15 times larger than the old ones), but I will pack them all in a single texture file that should not be bigger than 2,5 MB.
Task completion level : 50%
- Implementing phosphor glow using a shader :
In the versions released previously, the physical properties of the vectrex display system are emulated using a "persistence" option that mimics the phosphor afterglow. The result is fair enough, but it misses another specificity of the original display: the phosphor glow around the vectors being drawn.
As I have finally found some time to learn GLSL (the OpenGL Shading Language), I've started to work on shaders that would help to render the phosphor glow. The current implementation is still in its infancy (as this is a trial & error process, with a lot of parameters to tweak) and the code is far from optimal... But still, the result looks promising, and runs in real-time.
There's still a lot of work to do for this task, because I need to find the best settings, then a way to dynamically and conditionally change the parameters depending on the users preferences and the OpenGL drivers capabilities (availability of p-buffers, etc...)
One thing is certain : this "glow" feature will only be available for users that have a 3D card whose driver is compatible with OpenGL 2.0 (or more), because GLSL is not available for older versions of OpenGL.