If you are a graphics developer, you have most likely come across RenderDoc at some point during one of your projects. It is a graphics debugger that many developers find saves them a lot of time. It’s now supported on PowerVR and also supports our PVRTC compression format.
What is RenderDoc?
RenderDoc is a frame-capture based graphics debugger. It’s available as an MIT licensed open source project and covers a range of graphics APIs and platforms: Vulkan, D3D11, D3D12, OpenGL®, and OpenGL ES™, Windows 7 and 10, Linux and Android.
RenderDoc began as a spare-time project supporting only Windows and D3D11. Born out of a need for a reliable debugger as a game developer, RenderDoc has maintained a focus on practical use-cases, intuitive workflows, and meeting developer needs. Over time it slowly expanded to cover more APIs and platforms, and the author is currently contracted by Valve Software to work full-time on the project.
In the most recent v1.0 release many new features have been added, as well as Android support for both OpenGL ES and Vulkan with contributions from Samsung and Google.
Operating RenderDoc is very similar to operating PVRTrace – it captures frame data for debugging purposes. But whilst PVRTrace is suited for debugging multiple frames, RenderDoc is best utilised for checking the details of individual frames. As such, these tools complement each other when utilised.
Texture viewer tab: you can look at all the inputs and output textures in this view, and this now includes PVRTC. There are overlays available, and it supports all mip levels, texture slices and faces.
What are the Features?
RenderDoc contains many helpful features when analysing what is happening in a graphical application.
- Flexible texture viewer, including quick inspection of different visible ranges, channels, or subresources. Also, complex custom shaders used for visualising packed or encoded textures.
- Mesh viewer showing inputs and outputs of vertex pipeline, with visualisation options and picking to find and examine specific vertices.
- Organised pipeline state view with inspectors for different types of resource.
- Shader edit and continue, replacing a shader and seeing the effect it has on the frame.
- Unified resource inspector, linking resources across the UI and seeing the API calls involved in their creation.
- Runtime annotation features such as bookmarking and resource renaming, enabling repro cases to be self-contained with comments directing to the specific problem.
- Debugging overlays for render targets showing which pixels passed or failed tests like depth, stencil or backface culling to quickly diagnose problems.
- Export buffer, mesh and texture data to file for examination in external tools.
- Deep python scripting with full access to all data provided in the UI and control over the analysis.
A full run-down on the usage of RenderDoc can be found in the application’s documentation.
Imagination with RenderDoc
As mentioned before, PVRTC is the de-facto format on PowerVR and iOS devices, and is now also supported by RenderDoc.
PVRTC is supported by Unreal Engine 4, Unity, CryEngine, and Lumberyard game engines. Imagination has worked with RenderDoc’s developer to add support for PVRTC textures on Vulkan, and tested Renderdoc with a selection of PowerVR devices, ensuring a reliable experience out of the box. Some of the devices tested were:
You can check out our website for further information regarding our platforms.
Pipeline state tab: you can look at all the resources bound to the graphics pipeline.
PVRTC is PowerVR’s family of proprietary texture compression schemes, providing compression of colour data at four or two bits per pixel (4/2bpp). It uses an interpolation and modulation scheme to compress texture data. Texture data is encoded as two low-resolution images, along with a full resolution, low bit-precision modulation signal. More information on the specifics of this compression technique can be found in the whitepaper Texture Compression using Low-Frequency Signal Modulation.
There are two generations of PVRTC. PVRTC1 and PVRTC2 both support 4bpp and 2bpp compression ratios. They are broadly similar, but PVRTC2 has additional advantages:
- Image quality: In general, PVRTC2 will give a better quality image than PVRTC1. In images with large areas of colour discontinuity, the quality will be significantly higher without the need for texture manipulation techniques such as border expansion. A border around images in a skybox is also no longer needed and non-tiling textures will appear much improved. This is due to the addition of dedicated modes for dealing with areas of high contrast between sections of a texture.
- Non-Power-of-Two (NPOT) dimensions: PVRTC2 offers the developer the use of arbitrary-sized NPOT textures, which are textures that do not have dimensions that are limited to powers of two.
- Sub-texturing: Unlike PVRTC1, sub-texturing is supported in PVRTC2 at data-word boundaries (4×4 or 8×4 for PVRTC2 4bpp or PVRTC2 2bpp, respectively). This further enables techniques such as texture atlasing for applications. It should be noted that this requires Hard Transition Flag mode to be enabled around the sections of a texture to be replaced.
PVRTC supports both opaque (RGB) and translucent (RGBA) textures in the same data footprint (unlike other formats such as S3TC that require additional data to support a full alpha channel). PVRTC also boasts a very high image quality for competitive compression ratios: four or two bits per pixel. These represent savings in memory footprint of 8:1 or 16:1, compared to uncompressed, 32-bit per pixel textures. Alpha channel data is encoded on a per-data-word basis so that fully opaque sections of a texture do not needlessly encode alpha information.
In PVRTC, data is arranged in 64-bit words, each of which contains a pixel from each of the low-resolution images and modulation data for either a 4×4 or 8×4 set of pixels. Unlike traditional block-based formats, PVRTC uses adjacent data-words to reconstruct the original image. This can represent a considerable visual enhancement compared to block-based compression techniques that use the contents of a single block alone to reconstruct the texel values within that individual block.
Imagination’s PVRTexTool can be used to generate PVRTC texture data from source images in most formats.
If you want to know more about RenderDoc, you can contact our DevTech support team on Imagination’s PowerVR Insider dedicated forum. You can also follow us on Twitter @ImaginationTech and @PowerVRInsider and you can also find us on LinkedIn, Facebook and Google+.