Replace custom ViewportColorCorrector with stageView.py color correction

Remove the custom GL post-process (ViewportColorCorrector) that bypassed
HdxColorCorrectionTask. Instead pass colorCorrectionMode, ocioDisplay,
ocioView, ocioColorSpace, and ocioLook directly to UsdImagingGLRenderParams
and SetColorCorrectionSettings(), delegating correction to Hydra —
the same approach used in usdview's stageView.renderSinglePass().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 01:35:06 +08:00
parent 45d1cc4391
commit a59b3a5405
3 changed files with 36 additions and 361 deletions
+12 -1
View File
@@ -1,6 +1,6 @@
# ADR 0001 — Custom Viewport Color Correction (sRGB / OCIO)
- **Status:** Accepted
- **Status:** Superseded (2026-06-30) — replaced by the stageView.py approach (HdxColorCorrectionTask via RenderParams)
- **Date:** 2026-06-27
- **Component:** `src/core/UsdSceneRenderer.cpp` (`ViewportColorCorrector`, `ApplyViewportColorCorrection`)
- **Commit:** `fb1ae9d`
@@ -181,3 +181,14 @@ expected corrected (non-black) image and sRGB is unchanged. Headless automated
verification is blocked by the stale test-target CMake config (missing USD
include dirs); restoring those targets would let an OCIO-vs-sRGB center-pixel
test assert this automatically.
## Supersession Note (2026-06-30)
This ADR is superseded. The custom `ViewportColorCorrector` was removed in favour
of the approach used in usdview's `stageView.py`: `colorCorrectionMode`,
`ocioDisplay`, `ocioView`, `ocioColorSpace`, and `ocioLook` are now passed
directly to `UsdImagingGLRenderParams` and `SetColorCorrectionSettings()`,
delegating correction to Hydra's `HdxColorCorrectionTask`. The two failure modes
documented in D1 (black OCIO output, bind-stack corruption) may resurface; the
try/catch guard around `Render()` remains in place to mitigate the bind-stack
issue.