This is a new rendering engine for RVGL based on
programmable shaders, targeting OpenGL 2.0+, ES 2.0 and 3.1+ Core Profile. It's very different from the fixed pipeline used by v1.2 and current RVGL, and mapping many of the features supported by the existing renderer was a challenging task.
Expected benefits:
- Significantly improved performance on almost all modern cards.
- Better power efficiency on laptops and mobile devices.
- Possibility of having RVGL ported to GLES platforms like iOS / Android.
What is supported:
- Lights and shadows
- Fog (including vertical fog)
- Mirrors, semi-transparency
- Environment effects (using multi-texturing)
- Mesh deformation effects (waterbox, splash, etc)
- All particle effects
How to use:
The shader-based renderer is used by default on new installations. For existing installations, get the latest RVGL build from the
RVGL project page. Then, edit
profiles\rvgl.ini and set
Shaders = 1 to enable the shader-based rendering mode. If the
shader mode was activated properly, the build number display in Frontend should turn yellow. To temporarily switch back to the old renderer, launch the game with the
-noshader parameter.
See the dedicated thread for Android related information.
► Comparisons and Screenshots
Below is a frame rate comparison against the old renderer version on my laptop running Linux (click for a larger version). With a modern GPU, more than 2x frame rate increase has been commonly reported.
Some more screenshots follow:
- Unlimited transparent polys (in addition to improved frame rate...)
- Utilizes hardware face culling which better handles asymmetric polys.
► ANGLE Direct3D Support
On Windows systems with poor or non-existent OpenGL support, the shader edition can take advantage of
Google's ANGLE project which provide a compliant GLES2 implementation based on Direct3D9 or Direct3D11. ANGLE libs are included with the game. To use this support, edit rvgl.ini and set Shaders = 1 to enable the shader-based renderer, then set GLProfile = 3.
You can verify whether the Direct3D backend is being used by checking the video info in
profiles\re-volt.log. Below is a sample output:
Code: Select all
GL Vendor: Google Inc.
GL Renderer: ANGLE (AMD Radeon™ R4 Graphics Direct3D11 vs_5_0 ps_5_0)
GL Version: OpenGL ES 2.0 (ANGLE 2.1.0.54118be67360)
► Supported OpenGL Profiles
Advanced users can select one of the supported OpenGL Profiles by setting the
GLProfile key in rvgl.ini. The following values are supported:
- 0 - Compatibility profile: Initialize a backwards compatible OpenGL profile (the default).
- 1 - Core profile: Initialize a 3.2+ Core profile. In some cases, driver support may be better when using a core profile.
- 2 - ES profile: Initialize an OpenGL ES profile for Embedded Systems. Requires a mobile GPU or driver support for ES emulation.
- 3 - ES Driver profile: On Windows, initialize an OpenGL ES 2+ profile using the ANGLE Direct3D implementation included with the game.
► Advanced OpenGL Functionality
RVGL has support for new OpenGL functionality that takes advantage of newer hardware.
- Uniform Buffer Objects: Buffer-backed uniform blocks are used to store and update shader state which can provide better stability and improved performance when rendering scenes with large number of meshes. Requires OpenGL 3.0, GLES 3.0 or driver support. The feature can be toggled with EnableUBO in rvgl.ini.
- Separate Shader Objects: Shader programs for the vertex and fragment shading stages are generated separately, enabling better reuse of shader code. Requires OpenGL 4.1, GLES 3.1 or driver support. The feature can be toggled with EnableSSO in rvgl.ini.
- Frame Buffer Objects: Antialias support is implemented through Frame Buffer Objects (i.e., the application maintains its own frame buffers rather than rendering directly to the window buffers). To use a native multisampled window, set EnableFBO to 0 in rvgl.ini. This is particularly useful for embedded GPUs.