KhronosGroup / glTF-Sample-Viewer

Physically-Based Rendering in glTF 2.0 using WebGL
Apache License 2.0
1.21k stars 229 forks source link

Khronos "PBR Neutral" tone mapping #533

Closed emackey closed 2 months ago

emackey commented 2 months ago

Based on a presentation that @elalish gave to PBR TSG today, along with his corresponding tone mapping blog post, here is an implementation of the new tone mapper. This PR does a few things:

emackey commented 2 months ago

Side-by-side comparison of the "welcome screen", the first thing a user sees when arriving at the Khronos glTF Sample Viewer. Left, the model with none/clamped tonemapping in the rainbow-like footprint court. Right, the same model with natural outdoor lighting from Cannon Exterior, using the new PBR neutral tone mapping.

starter screenshot

emackey commented 2 months ago

Left, the "None" (linear / clamped to white) tone mapping. Right, the new PBR neutral tone mapping. Both with the "Studio Neutral" IBL and same exposure settings. A deeper black is visible in the lower-right, and generally richer colors are visible throughout the right side. On the left, some of the clamping artifacts that Emmett discussed are visible, such as a purple tone being introduced on the left side of the top row.

colored spheres screenshot

emackey commented 2 months ago

I noticed that my new choice of default HDR, "Cannon Exterior," apparently lives on a branch of Environments that's not merged into main and doesn't appear to have a PR. But the commit suggests the HDR came from 3D Commerce cert, is this true? Should it and the others get merged to main in that environments repo?

UX3D-haertl commented 2 months ago

This is the low resolution branch for all HDRs which we need to reduce hosting storage (github pages has a 1gb limit) and loading times. Having this in a separat branch is easier than having both versions in the main branch and only downloading the low-res versions. But this deployment process can also be improved in the future e.g. by directly linking to the files on github instead of using git submodules.

emackey commented 2 months ago

Thanks!