Skip to content

Add support for KHR_materials_retroreflection - #50

Open
mklefrancois wants to merge 1 commit into
KhronosGroup:mainfrom
mklefrancois:feature/khr-materials-retroreflection
Open

Add support for KHR_materials_retroreflection#50
mklefrancois wants to merge 1 commit into
KhronosGroup:mainfrom
mklefrancois:feature/khr-materials-retroreflection

Conversation

@mklefrancois

@mklefrancois mklefrancois commented Aug 22, 2026

Copy link
Copy Markdown
trafficCone_KhrViewer

Summary

Implements KHR_materials_retroreflection, based on the Minimal Retroreflective Microfacet (MRM) model (Portsmouth et al., JCGT 15(1), 2026).

  • Substitutes the view direction with its reflection about the normal (V_retro = reflect(-V, N)) before evaluating the metallic and dielectric BRDFs, then linearly blends the result with the regular BRDF by retroreflectionFactor.
  • Applied to both the IBL path (getIBLRadianceGGXRetroreflection in ibl.glsl) and the punctual-light path (pbr.frag).
  • Adds KHR_materials_retroreflection material extension parsing (retroreflectionFactor, retroreflectionTexture), the MATERIAL_RETROREFLECTION shader define, and a Retroreflection Strength debug output channel.

A companion PR to glTF-Sample-Viewer adds the corresponding "Retroreflection" UI toggle and bumps this submodule pointer, and references glTF-Sample-Viewer#664.

Test plan

  • npm run build succeeds with no shader compile errors
  • Loaded the glTF-Sample-Assets#285 traffic cone test asset (retroreflective sleeve using retroreflectionFactor: 1.0, masked by retroreflectionTexture) — the retroreflective stripe reads noticeably brighter than the plain reflective stripe when camera and light are closely aligned, matching the extension's reference behavior

Implements the Minimal Retroreflective Microfacet (MRM) model: substitutes
the view direction with its reflection about the normal before evaluating
the metallic and dielectric BRDFs, then linearly blends the result with the
regular BRDF by retroreflectionFactor. Applied to both the IBL and punctual
light paths.
@CLAassistant

CLAassistant commented Aug 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@emackey

emackey commented Aug 24, 2026

Copy link
Copy Markdown
Member

For UX3D: The PBR TSG is requesting that you fully check the PBR shader math and check how well it matches the draft spec provided in KhronosGroup/glTF#2610 (because the author is the same between both). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants