Stylized GGX Shading blends toon and PBR specular highlights

Stylized GGX Shading blends toon and PBR specular highlights

A graphics programmer who worked on the game Spellcasters Chronicles describes a technique he calls "Stylized GGX Shading", a way to blend toon (flat, thresholded) lighting with physically-based rendering (PBR) so that specular highlights look big and sharp at low roughness, similar to classic toon shading, while gradients stay soft at high roughness, similar to standard PBR. He argues this mixed look feels more modern than classic toon shading because most of the shading still relies on PBR, which keeps materials closer to energy conservation and easier to calibrate and integrate into existing rendering pipelines.

The starting point is the GGX Cook-Torrance microfacet model, specifically the Trowbridge-Reitz Normal Distribution Function (NDF) that most real-time engines use to describe how a rough surface's microfacets are oriented. The author's simple version adds a "Specular Size" parameter to the NDF formula, which returns more reflected energy at higher angles between the surface normal and the half-vector while preserving the original curve's shape. This simple version costs only one extra multiplication and one extra max operation, but it overbrightens rough materials because it doesn't distinguish roughness levels.

To fix that, he presents an improved version that adds a second parameter, "GGXMatching", which controls how closely the stylized NDF matches the original GGX curve at high roughness; he found values of 4 or 8 work well in practice. The improved formula keeps the expanded, toon-like highlights at low roughness while converging back to the standard, unmodified GGX look at high roughness, avoiding the overbrightening problem of the simple version.

He cites The Legend of Zelda: Breath of the Wild as an example where toon-shaded characters are set against more PBR-styled environments, making the characters stand out. On Spellcasters Chronicles, the team tested this Stylized GGX approach during development but ultimately shipped a different solution that still mixes 2D and 3D looks. He also lists other tricks the team explored for pushing the toon feel further: reducing spherical-harmonics (SH) coefficients for global-illumination probes from the usual 9 down to 3 (global, up, and down), which reduces lighting directionality toward a hand-drawn look and also saves performance by storing fewer coefficients, an idea he notes was also used in the game Hi-Fi Rush; simplifying distant props with a depth-based Kuwahara filter, mip biasing and fog; rim lighting; and outline and inline rendering, alongside dedicated texture and modeling work.

Key facts

  • The technique modifies the GGX Trowbridge-Reitz Normal Distribution Function with a "Specular Size" parameter to expand specular highlights at low roughness.
  • The simple version costs one extra multiplication and one extra max operation, but overbrightens rough materials.
  • An improved version adds a "GGXMatching" parameter (4 or 8 work well) to keep the stylized look at low roughness while matching standard GGX at high roughness.
  • The author tested the approach on Spellcasters Chronicles during development but the game ultimately shipped with a different, unspecified solution.
  • A related trick, cutting global-illumination spherical-harmonics coefficients from 9 to 3 for a more hand-drawn look, was also used in Hi-Fi Rush.

Why it matters

Toon-shaded games usually have to choose between flat, thresholded lighting and standard physically-based rendering (PBR). This technique offers a middle ground: it keeps most of a PBR pipeline's benefits, such as energy conservation and easier material calibration, while giving specular highlights the bold, sharp look associated with 2D-style toon shading. That lets a project mix stylized characters with more realistic environments, or push an overall art direction that reads as hand-crafted without abandoning a physically-based lighting pipeline.

Who it affects

This is aimed at graphics and rendering programmers working on stylized or toon-influenced 3D games, particularly teams already using a GGX Cook-Torrance PBR pipeline who want to art-direct highlights toward a more illustrated look. It is a shading technique, not a shipped product, so its reach depends on individual studios adopting or adapting it.

How to use it

The article gives the actual shader code for both the simple and improved versions of the modified NDF, along with the recommended GGXMatching values of 4 or 8. It also includes Desmos graphs so a reader can visualize how the curve changes with the Specular Size and roughness parameters before implementing it. No engine, renderer or platform is specified, so applying it means integrating the modified NDF into an existing PBR shading pipeline.

How solid is it

This is a first-person technical write-up from someone who says he worked on Spellcasters Chronicles and tested the approach during that game's development, though the game ended up shipping with a different solution. The claims about cost (one extra multiplication and one extra max for the simple version) and about the SH-coefficient reduction technique used in Hi-Fi Rush are stated directly by the author; there are no independent benchmarks or third-party verification in the article, and no quantified performance numbers are given for the SH-coefficient saving, only a qualitative claim that it helps.

Risks and caveats

The technique is presented as one option among several the author says the team tried, and it was ultimately not what Spellcasters Chronicles shipped with, so its practical results on a finished game are unstated. The article gives no numbers for frame-time or memory savings from the reduced SH-coefficient approach, and does not name a specific engine or hardware target, so real-world performance and visual results will vary by implementation.

“One might want to mix the 2D and 3D looks: big sharp highlights at low roughness and soft gradients at high roughness.”

— the author