PBR materials tinted blue: dark / black materials render as saturated blue (e.g. black clothing shows navy) #872

Open
opened 2026-10-19 15:28:48 +00:00 by sky_line · 3 comments
Owner

Many PBR materials render with a blue tint that the content doesn't have. Example: a top that should be black renders as a clearly saturated navy blue (screenshot below; the black belt and jeans next to it look right, so it isn't a global grade / tonemap shift). Indoors, wooden walls around.

Likely suspects (check in this order)

  1. Sky light leaking into the ambient / specular term. Dark albedo makes the image almost entirely reflection + ambient, so any blue in those dominates. Indoors, the default sky probe (probe0) or an outdoor probe being blended in would paint dark surfaces sky-blue. Related to the GI epic's enclosure criteria (#87).
  2. Specular IBL on dark dielectrics. F0 = 0.04 plus Fresnel over a blue sky probe on a fairly smooth surface; if roughness is wrong (missing / misread ORM -> default roughness too low, or metallic misread) black cloth becomes a blue mirror.
  3. Colour-space errors in the material: base colour texture or baseColorFactor treated as linear vs sRGB (or double-converted), emissive picking up a tint, or a bad ORM channel order (glTF: R = occlusion, G = roughness, B = metallic).
  4. Irradiance / probe filtering: RGB9E5 / BC6H probe formats (#565) shifting dark values toward blue; irradiance SH / filter bias.
  5. Interaction with the legacy-material path vs PBR (only PBR affected?), deferred vs forward (RenderVKDeferredLighting), RT reflection fallback (#859), SSR.

Investigation steps

  • Same spot, same camera: RenderVKDebugView 1 (base colour), 2 (metal/rough/AO), 5 (specular IBL), 6 (diffuse IBL), 3 / 4 (probe radiance / irradiance), 25 (probe blend at the pixel: is the dark-slate default sky probe contributing indoors?), 7 (sun term).
  • A/B: probes off / Raytraced detail, probe format RGBA16F, SSR off, RT reflections off, deferred on/off, exposure / tonemap neutral.
  • Inspect the material asset (base colour factor, textures, ORM) and compare with how other viewers render it.
  • Collect a few more affected items (avatar clothing, buildings) to tell content-specific from systematic.

Acceptance

  • Root cause identified with the debug views / A/B above; black PBR clothing renders black (or neutral dark) indoors and outdoors, matching its authored look, without changing correctly-lit surfaces.
Many PBR materials render with a **blue tint** that the content doesn't have. Example: a top that should be **black** renders as a clearly saturated navy blue (screenshot below; the black belt and jeans next to it look right, so it isn't a global grade / tonemap shift). Indoors, wooden walls around. ## Likely suspects (check in this order) 1. **Sky light leaking into the ambient / specular term.** Dark albedo makes the image almost entirely *reflection + ambient*, so any blue in those dominates. Indoors, the default sky probe (probe0) or an outdoor probe being blended in would paint dark surfaces sky-blue. Related to the GI epic's enclosure criteria (#87). 2. **Specular IBL on dark dielectrics.** F0 = 0.04 plus Fresnel over a blue sky probe on a fairly smooth surface; if roughness is wrong (missing / misread ORM -> default roughness too low, or metallic misread) black cloth becomes a blue mirror. 3. **Colour-space errors in the material:** base colour texture or `baseColorFactor` treated as linear vs sRGB (or double-converted), emissive picking up a tint, or a bad ORM channel order (glTF: R = occlusion, G = roughness, B = metallic). 4. **Irradiance / probe filtering:** RGB9E5 / BC6H probe formats (#565) shifting dark values toward blue; irradiance SH / filter bias. 5. Interaction with the legacy-material path vs PBR (only PBR affected?), deferred vs forward (`RenderVKDeferredLighting`), RT reflection fallback (#859), SSR. ## Investigation steps - Same spot, same camera: `RenderVKDebugView` 1 (base colour), 2 (metal/rough/AO), 5 (specular IBL), 6 (diffuse IBL), 3 / 4 (probe radiance / irradiance), 25 (probe blend at the pixel: is the dark-slate default sky probe contributing indoors?), 7 (sun term). - A/B: probes off / Raytraced detail, probe format RGBA16F, SSR off, RT reflections off, deferred on/off, exposure / tonemap neutral. - Inspect the material asset (base colour factor, textures, ORM) and compare with how other viewers render it. - Collect a few more affected items (avatar clothing, buildings) to tell content-specific from systematic. ## Acceptance - Root cause identified with the debug views / A/B above; black PBR clothing renders black (or neutral dark) indoors and outdoors, matching its authored look, without changing correctly-lit surfaces.
sky_line added this to the Slipstream project 2026-10-19 15:28:48 +00:00
Author
Owner

Screenshot (shirt should be black):

blue tint

Screenshot (shirt should be black): ![blue tint](https://git.slipstreamviewer.org/attachments/4588771a-bd8b-41e7-a036-70812d32730e)
Author
Owner

Owner note: this only affects PBR materials (legacy / Blinn-Phong materials are fine), and it is most likely a pre-existing bug inherited from LL's viewer, not a Vulkan-port regression (to confirm against the official SL viewer). So: compare against LL's PBR shading (probe ambient / IBL, base colour + ORM handling) rather than bisecting our history, and fix it in our own shading per standard PBR practice rather than matching LL.

Owner note: this only affects **PBR** materials (legacy / Blinn-Phong materials are fine), and it is most likely a **pre-existing bug inherited from LL's viewer**, not a Vulkan-port regression (to confirm against the official SL viewer). So: compare against LL's PBR shading (probe ambient / IBL, base colour + ORM handling) rather than bisecting our history, and fix it in our own shading per standard PBR practice rather than matching LL.
Author
Owner

Owner direction: the fix must not depend on ray tracing. RT GI / probe retirement (#87) may improve this on RT hardware later, but non-RT cards need a fix that works on the raster probe path.

Working hypothesis (owner agrees): sky-probe leakage. Indoors / under cover, the default sky probe (probe0) or outdoor probes get blended into dark PBR surfaces and tint them sky-blue. Candidate non-RT fixes:

  • Better automatic probe placement: make sure enclosed / covered spaces get their own interior probe(s) so the sky probe is not the fallback there (detect enclosures from scene geometry, e.g. the weather roof map / a top-down + sideways occlusion test, or probe-capture results that see mostly geometry).
  • More advanced automatic probes: occlusion-aware weighting so an interior probe fully takes over inside its volume and outdoor / sky probes are rejected (visibility / Chebyshev-style test on the probe side, or a per-probe "sky visibility" fraction used to attenuate the sky term indoors).
  • Sky-term attenuation from occlusion: scale the sky probe's contribution by a cheap sky-visibility estimate (AO-style / roof map) so covered surfaces stop receiving full sky ambient + specular.
  • Check the cluster probe selection (debug view 25 / 17 / 20) at affected spots to confirm which probe is supplying the blue before choosing.
Owner direction: **the fix must not depend on ray tracing.** RT GI / probe retirement (#87) may improve this on RT hardware later, but non-RT cards need a fix that works on the raster probe path. Working hypothesis (owner agrees): **sky-probe leakage**. Indoors / under cover, the default sky probe (probe0) or outdoor probes get blended into dark PBR surfaces and tint them sky-blue. Candidate non-RT fixes: - **Better automatic probe placement:** make sure enclosed / covered spaces get their own interior probe(s) so the sky probe is not the fallback there (detect enclosures from scene geometry, e.g. the weather roof map / a top-down + sideways occlusion test, or probe-capture results that see mostly geometry). - **More advanced automatic probes:** occlusion-aware weighting so an interior probe fully takes over inside its volume and outdoor / sky probes are rejected (visibility / Chebyshev-style test on the probe side, or a per-probe "sky visibility" fraction used to attenuate the sky term indoors). - **Sky-term attenuation from occlusion:** scale the sky probe's contribution by a cheap sky-visibility estimate (AO-style / roof map) so covered surfaces stop receiving full sky ambient + specular. - Check the cluster probe selection (debug view 25 / 17 / 20) at affected spots to confirm which probe is supplying the blue before choosing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#872
No description provided.