Honours Project – Shader Driven Rendering

The following overview and sample video demos provides an idea of the work that Alexandru Ghitescu-Hrin carried as part of his honours project during the 2012-13 academic year. The project consists of a script-driven application designed to aid in real-time graphics programming for beginners and advanced users alike. Titled the eXpandable Procedural Renderer (XPR), the system provides graphics engine functionality designed for current and next generation real-time effects. Interaction with the engine itself can be achieved by simply writing dedicated scripts that can be interpreted and executed in real time.

The distributable version of the engine consists of the XPR executable and the various support libraries that grant access to mathematical functionality, full DirectX 11 support and the Python scripting language. An application designed for XPR needs only to provide a set of Python scripts and the necessary resources for running it such as models, textures and effects. Novice users can rapidly develop a working example in under 50 lines of script while more experienced ones will find that the engine is flexible enough to allow implementation and optimisation of advanced computational and rendering techniques.

XPR can be used as a teaching tool for beginners, an easy development and experimentation tool, a basis for a more complex graphics centric application or even used as a library itself to provide a flexible rendering pipeline for games or visualisation software. While still being generic, it is also heavily optimised and provides easy modular expansion options from the script and source code as well.

The source code, media files and full dependency set needed for development can be checked out from the Google Code XPR repository. In its final form, the resulting software had a development stage that spanned 7 months, totalling over 55,000 lines of code spread across almost 80 classes. The source code successfully grants script access for all texture types and operations DirectX 11 supports, all the available buffer types designed for data storage, transport, shader access and even staging buff ers, all primitive types including control point patches and all geometry buff er arrangements including indexing and multiple simultaneous vertex bu ffers. It enables easy one line use of hardware and shader indexing, facilitates shader bindings and reduces custom binding commands to one flexible line of script code, it provides means of loading custom bit-level data to shaders directly from the script and even allows GPU specific data type conversion.

A rewrite of the NVIDIA SDK Island demo using the XPR Python library and the original NVIDIA media resources.
[youtube http://www.youtube.com/watch?v=0JkIjd7v4hU&w=640&h=360]
A rewrite of the NVIDIA SDK Ocean demo as an extension of XPR which uses the inbuilt Compute Shader pipeline along with the original NVIDIA media resources.
[youtube http://www.youtube.com/watch?v=-43uqqPTpug&w=640&h=360]
XPR Python based rewrite of the NVIDIA SDK Terrain demo. Uses the XPR engine’s mesh generators, resource management system, multipass framework and inbuilt tessellation pipeline.
[youtube http://www.youtube.com/watch?v=EOGjK6s1D6I&w=640&h=360]
A demo that showcases XPR native instancing and geometry shader driven particles using the textures and animation logic from the Microsoft SDK Particle sample.
[youtube http://www.youtube.com/watch?v=La_V4q--x6c&w=640&h=360]
An optimised, procedural representation of the Menger Sponge fractal using the XPR engine’s inbuilt pipeline. The demo supports up to 7 recursive subdivisions of the original cube and can animate each resulting cube individually.
[youtube http://www.youtube.com/watch?v=U2nJ5YrZGgM&w=640&h=360]
A demonstration of hardware instancing as supported by the XPR engine. This sample renders 125.000 boxes using only one model with multiple positions.
[youtube http://www.youtube.com/watch?v=-W3eNXd5JBw&w=640&h=360]
A rewrite of an old Microsoft SDK demo using new completely shader-driven methods. Uses XPR multipass and post-processing features to showcase HDR.
[youtube http://www.youtube.com/watch?v=sPo10-5B9Ts&w=640&h=360]
An XPR engine demo that demonstrates how to override pipeline bindings in order to create and animate custom fractal shaders. In this case the fractals represented are Mandelbrot and Julia set.
[youtube http://www.youtube.com/watch?v=WGvEerH7XGE&w=640&h=360]
An XPR engine demo that loads a series of meshes that form a car from an FBX file.
[youtube http://www.youtube.com/watch?v=OTUpsHciaZ4&w=640&h=360]