Crytek developer Baldur Karlsson faced a problem during the development of Crysis 3: his existing debugging tools were encountering issues without pinpointing where code was going wrong. But instead of settling for a half-decent, off-the-shelf solution, he built a better one.
“I decided that I would start work at home on a graphics debugger myself to see if it could be achieved,” the senior graphics programmer tells Develop. “I worked mostly in secret for six months until I knew it could be done. Since then I've been working to improve it, adding more features and game compatibility.”
The result is RenderDoc, which Karlsson describes as a frame graphics debugger. This means it will capture a single frame of a game and allow graphics programmers to dive into every part of that frame to see precisely what is happening and diagnose areas where incorrect rendering occurs.
A DISCERNING DEBUGGER
RenderDoc’s first release contains basic debugging functionality that Crytek expects other developers will need, and is a framework that it intends to build on.
Karlsson says the free debugger will be equally useful for anyone who is working on rendering, shaders or graphics programming at triple-A or indie studios.
“I am a graphics programmer working in the industry myself, and the growth of the tool was shaped directly by the team I’m working with, as it was used on real-world situations,” he explains.
The tool was designed to be a graphics debugger first and foremost. This gives it an advantage over similar tools designed primarily as performance analysis tools, which can double as a debugger.
Karlsson says RenderDoc should work out-of-the-box on any Direct3D 11 game. It uses annotations from the application to aid in debuggability and readability. Textures, buffers and parts of the scene can be named and these names are used wherever possible, in addition to type and name info extracted from the shaders.
“RenderDoc aims to get out of your way and let you fix the bug you’re looking for,” Karlsson says. “I’ve tried hard to make it ‘just work’ on D3D 11 out-of-the-box for anyone who tries it. To be intuitive and responsive to pick up and use, and give you information as easily as possible.”
FREE AND EASY
Being part of the studio behind CryEngine, Karlsson tells us in future there might be special RenderDoc functionality made available to the game engine. However, he adds that the tool will “absolutely remain free”, and will only get more accessible, as it’s spun into a full open-source project.
In the meantime, Karlsson encourages users to contact him direct with requests and suggestions via @RenderDoc or email@example.com.
“Graphics is always a hot topic and with the new generation of consoles advancing what technology we will see in games, today is no exception,” says Karlsson.
“As rendering becomes more and more complex the tools must keep pace to ensure that programmers can be as productive as possible.”