AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO
Nans produced by ACES_Glow10 (Forward) under HLSL
- Lingua principale
- C++
- Stelle
- 2.1k
- Fork
- 503
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I'm using the "studio-config-v1.0.0_aces-v1.3_ocio-v2.1" config and OCIO v2.2.0. Performing any DisplayView transform produces nans (showing up as black on the screen).
OCIO produces this line of HLSL code for the ACES_Glow10 (Forward) section:
```hlsl
float chroma = sqrt( outColor.rgb.b * (outColor.rgb.b - outColor.rgb.g) + outColor.rgb.g * (outColor.rgb.g - outColor.rgb.r) + outColor.rgb.r * (outColor.rgb.r - outColor.rgb.b) )
```
I can work around this issue by replace that line with `sqrt(max(0.0, ...))`. I've not yet found the specific ACES2065-1 values that produce this issue (but by eye they seem to all be close to gray). My source is a 8 bit Rec.709 video converted to ACES2065-1 and then the rgb components scaled by some value > 1 (e.g. 3). I'm doing the scale with a MatrixTransform.
It seems like the value in the sqrt can become negative in some circumstances. Possibly due to fp issues? Interestingly this only appears when the shader is compiled with `DXC_ARG_SKIP_OPTIMIZATIONS` (`-Od`).
This shader is running on an RTX 3080Ti, I've not tested on another machine on windows. I don't get this issue with Metal on mac. But it seems safest to me to just always add that `max` function.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo lo shader ACES_Glow10 (Forward) generato con la configurazione dello studio indicata, DXC_ARG_SKIP_OPTIMIZATIONS (-Od) e il ridimensionamento di Rec.709-to-ACES2065-1 MatrixTransform descritto. Ispeziona l’input della radice quadrata e verifica che la trasformazione DisplayView non produca più NaNs nelle condizioni HLSL riportate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- computer-graphics
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100