KhronosGroup / glTF-Sample-Viewer

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

Refactor/brdf #556

Closed UX3D-haertl closed 4 months ago

UX3D-haertl commented 4 months ago

Implements the fixes discussed here: https://github.com/KhronosGroup/glTF/issues/2386 Fixes #530

Known issues which were already there before the refactoring:

552

Comparison of previous state and new one. Some assets are the same, but most assets got darker with IBL and brighter with punctual lights: brdf_refactor.zip

emackey commented 4 months ago

This is an IBL "furnace test" where the same amount of light comes from all directions. It's hard to read but ideally all of the same-color spheres would be the same brightness here, as they share the same base color.

screenshot

On the left is main, on the right is this PR, using MetalRoughSpheres with this IBL: EdM_75percent_furnace.zip

The darkness in the upper-right shows some loss of energy with highly rough metallic spheres. This was already a known problem and has got a bit worse on this branch I think.

Also some darkening is present along the middle horizontal row, between dielectric and metallic. I wonder if this is an unintended consequence of recent changes to the sample implementation.