DethRaid's Awesome Graphics On Nitro


DethRaid's Awesome Graphics On Nitro (DRAGON) is a collection of shaders written in the OpenGL Shading Language that attempt to bring a physically-based shading model to Minecraft. Due to the differences between traditional shading and physically-based shading, DRAGON is accompanied by a custom set of textures to provide the additional information needed. DRAGON focuses on a number of areas to provide physically-based shading.

DRAGON has been completely written by yours truly, David Dubois. I've been interested in graphics programming since I began programming, and with DRAGON I've finally found an achievable way to show off all I know, and to create something beautiful for others to enjoy.

Note: Click on the images for larger versions

Variable-Softness Shadows

In 2007, nVidia developed the Percentage-Closer Soft Shadows (PCSS) algorithm. This algorithm uses a conventional shadow map to provide more realistic shadows than those seen in modern video games. With conventional shadow mapping, a shadow is given a constant-size blur. This is wrong. Shadows should be nice and hard near the shadow caster, and get softer and softer as one moves away from the shadow caster. PCSS solves this problem. Unfortunately, this algorithm hasn't seen widespread industry adoption. Whether professionals are unfamiliar with the algorithm or simply pass it by in favor of yet more lens flares, I cannot say. However, DRAGON uses this algorithm to great effect, as seen in the image on right.

Shiny Metals

In the real world, metals are lit solely by reflections, since light isn't scattered by a metal surface. DRAGON simulates this. The current version of DRAGON features perfectly shiny metals lit by specular highlights, a wonderful approximation for the reflection of a light. DRAGON also uses an optimized screen-space reflection algorithm to simulate the first bounce of a light ray, which is a rather good approximation of reflections from non-emissive objects. Additionally, real-world metals reflect different wavelengths of light at different amplitudes, whereas non-metals reflect different wavelengths of light at similar amplitudes, leading to whiter reflections. This can be seen in the image to the left, showing gold and lapiz lazuli with vastly different specular highlights.

Rough Surfaces

Metals are not the only reflective surfaces in the world. Many other objects produce reflections, and many of them produce rough reflections. This, too, is calculated by DRAGON. Each different material has a smoothnes value associated with it which represents how many sub-pixel microfacets of a surface are oriented in the direction of the surface's normal. If this number is less than one, DRAGON adds a random offset to a surface's normal before calculating the reflection. This produces reflections of varying sharpness, as shown in the image to the right. Additionally, DRAGON's reflection algorithm runs so quickly that multiple reflection rays can be calculated per pixel. On a nVidia GeForce GTX 660, four reflection rays can be simulated while maintaining a framerate of 20 fps. This produces much smoother reflections, as one would expect to find in real life.


Fresnel is the term used to refer to the phonomenon where a material appears less reflective when viewed at a direct angle, but appears more reflective when viewed at a grazing angle. This is a phonomenon all materials exhibit, although the angle where reflections become noticable is incredibly small for some surfaces. DRAGON is well aware of fresnel and is able to effectively simulate the effect. The image to the top left shows a number of surfaces when viewed from above, and the bottom left image shows those same surfaces when viewed from a grazing angle. You can clearly see that both the black obsidian and the less reflective gray stone both exhibit much stronger reflections when viewed at a grazing angle.


DRAGON incorporates the water displacement algorithm from chocapic13's shaderpack. I don't have a lot to say about it, other than that I expect to be fiddling with it a great deal for Version 2 (Note: Version 2 now uses a Gerstner wave simulation).

Additional Images