Ogre 13.2.0 was just released. This “holiday release” contains mostly bugfixes, however there are also some notable additions.
Table of Contents
- Vulkan RenderSystem
- Using GLSLang with GL3+
- HiDPi support in Overlays
- Depth of Field Sample
The elephant in the Room is likely the addition of the Vulkan Rendersystem – as was announced earlier. Contrary to my expectation, progress was quite smooth though. This means that all basic features are already in place and the RTSS and Terrain Components support Vulkan too. Therefore, the Vulkan RenderSystem is now tagged [BETA] instead of [EXPERIMENTAL]. Still, some more advanced features are currently missing.
Depending on your usage, you might be able to already port your application – at least you can already start familiarizing with it. There are two caveats though..
Currently Ogre does not try to hide the asynchronicity of Vulkan from the user and rather lets you run into rendering glitches.
The general idea of Vulkan is that you have multiple images in flight to keep the GPU busy. This means that we submit the work for the next frame without waiting for the current frame to finish.
This part hits you as soon as try to update vertex data. If the GPU is not yet done processing it, you will get rendering glitches. Particularly, your rendering will be broken if you update the data each frame.
The solution here is to either implement triple-buffering yourself or discard the buffer contents on update, which will give you new memory on Vulkan. The Ogre internals have been updated accordingly and ideally also improve performance on all other rendersystems.
Closely related to the above is rendering interruption. This means that after the first Renderable was submitted for the current frame (i.e.
RenderSystem::_render has been called), you decide to load another Texture or update a buffer.
As we dont know whether the update affects the current Frame, we would need to interrupt the rendering, do the upload and continue where we left off. While certainly possible, we just throw an exception right now. Typically, it is much easier to just schedule your buffer updates before rendering kicks off, than ordering things mid-flight. And this is faster too.
Using GLSLang with GL3+
As the RTSS was extended to generate SPIRV compatible GLSL for Vulkan, it was natural to enable this path for GL3+ as well. If the
gl_spirv profile is supported, you can now call
to use the glslang reference compiler instead of whatever your GL driver would do.
HiDPi support in Overlays
Some dangling threads in Overlays were fixed and you can now call
which will scale up the UI appropriately and generate higher resolution Fonts. The magic 96 means 96 DPI which is the common setting of all Monitors up to FullHD.
Depth of Field Sample
I have updated the dormant DoF compositor code we had in Ogre to actually do something.
The sample builds upon the code of DWORD flying around the forums and implements the following technique by Thorsten Scheuermann.