<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/stylized-ggx-shading-5kx5fr2xq" -->

---
title: Stylized GGX Shading | daily.dev
description: A practical guide to implementing 'Stylized GGX Shading' — a technique that blends toon-style sharp specular highlights at low roughness with soft PBR...
canonical: https://daily.dev/posts/stylized-ggx-shading-5kx5fr2xq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Stylized GGX Shading | daily.dev
og:description: A practical guide to implementing 'Stylized GGX Shading' — a technique that blends toon-style sharp specular highlights at low roughness with soft PBR...
og:url: https://daily.dev/posts/stylized-ggx-shading-5kx5fr2xq
og:image: https://api.daily.dev/og/posts/5Kx5Fr2Xq.png
og:image:alt: Stylized GGX Shading
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Stylized GGX Shading

**[Hacker News](https://daily.dev/sources/hn)** · 4 min read · 0 upvotes · 0 comments

## Summary

A practical guide to implementing 'Stylized GGX Shading' — a technique that blends toon-style sharp specular highlights at low roughness with soft PBR gradients at high roughness. The post walks through modifying the Trowbridge-Reitz Normal Distribution Function (NDF) with a new SpecularSize parameter, presents a simple version (cheap, 1 mul + 1 max) and an improved version that preserves the original NDF shape at high roughness via a GGXMatching parameter. Additional stylization techniques used in game development (SH coefficient pruning, Kuwahara filter, rim lighting, outlines) are briefly discussed.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://alexandrelamure.github.io/graphics-posts/stylized-ggx-shading.html>

## Questions this post answers

### How do I get sharp toon-style specular highlights while keeping soft PBR gradients at high roughness in GLSL?

Modify the GGX Trowbridge-Reitz NDF by adding a SpecularSize parameter that expands the specular highlight at low roughness while preserving the original NDF shape at high roughness. A simple version adds one multiply and one max to the denominator. An improved version introduces a GGXMatching parameter (values of 4 or 8 work well) so the stylized NDF converges to standard GGX at high roughness, avoiding the overbright rough-material artifact of the simpler approach.

_Graphics developers blending toon and PBR shading track techniques like this on daily.dev._

### What is the GGXMatching parameter in a stylized GGX NDF and what value should I use?

GGXMatching controls how closely the stylized NDF converges to the standard GGX Trowbridge-Reitz NDF at high roughness values. It prevents rough materials from appearing overly bright — a problem with the simpler SpecularSize-only approach. In practice, values of 4 or 8 work well for most materials.

_Developers tuning real-time shading parameters find relevant shader research on daily.dev._

## Similar posts on daily.dev

- [A series of tricks and techniques I learned doing tiny GLSL demos](https://daily.dev/posts/a-series-of-tricks-and-techniques-i-learned-doing-tiny-glsl-demos-hwkufqxor) · Hacker News · 0 upvotes · 0 comments
- [Graphics Programming weekly - Issue 457 - September 27th, 2026](https://daily.dev/posts/graphics-programming-weekly---issue-457---september-27th-2026-ttollowih) · Jendrik Illner · 0 upvotes · 0 comments
- [Temporally stable generative illumination with a one-step diffusion model](https://daily.dev/posts/temporally-stable-generative-illumination-with-a-one-step-diffusion-model-kucunnvtq) · AMD GPUOpen · 1 upvotes · 1 comments
- [I put a real-time 3D shader on the Game Boy Color](https://daily.dev/posts/i-put-a-real-time-3d-shader-on-the-game-boy-color-q8lvbe7g3) · Two Stop Bits · 0 upvotes · 0 comments

---

Tags: [#3d](https://daily.dev/tags/3d), [#game-design](https://daily.dev/tags/game-design)

[View this post on daily.dev](https://daily.dev/posts/stylized-ggx-shading-5kx5fr2xq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Stylized GGX Shading","url":"https://daily.dev/posts/stylized-ggx-shading-5kx5fr2xq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/stylized-ggx-shading-5kx5fr2xq"},"datePublished":"2026-08-09T12:42:16.521Z","dateModified":"2026-08-09T12:42:43.802Z","description":"A practical guide to implementing 'Stylized GGX Shading' — a technique that blends toon-style sharp specular highlights at low roughness with soft PBR...","image":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","thumbnailUrl":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/stylized-ggx-shading-5kx5fr2xq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"3d,game-design","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Stylized GGX Shading"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/stylized-ggx-shading-5kx5fr2xq#faq","mainEntity":[{"@type":"Question","name":"How do I get sharp toon-style specular highlights while keeping soft PBR gradients at high roughness in GLSL?","acceptedAnswer":{"@type":"Answer","text":"Modify the GGX Trowbridge-Reitz NDF by adding a SpecularSize parameter that expands the specular highlight at low roughness while preserving the original NDF shape at high roughness. A simple version adds one multiply and one max to the denominator. An improved version introduces a GGXMatching parameter (values of 4 or 8 work well) so the stylized NDF converges to standard GGX at high roughness, avoiding the overbright rough-material artifact of the simpler approach. Graphics developers blending toon and PBR shading track techniques like this on daily.dev."}},{"@type":"Question","name":"What is the GGXMatching parameter in a stylized GGX NDF and what value should I use?","acceptedAnswer":{"@type":"Answer","text":"GGXMatching controls how closely the stylized NDF converges to the standard GGX Trowbridge-Reitz NDF at high roughness values. It prevents rough materials from appearing overly bright — a problem with the simpler SpecularSize-only approach. In practice, values of 4 or 8 work well for most materials. Developers tuning real-time shading parameters find relevant shader research on daily.dev."}}]}
```

