Envmap reflections too dark on some surfaces after linear pipeline conversion #45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
After converting to the full linear color pipeline (#44, commit
36368a2), envmap reflections on some surfaces appear too dark compared to ground truth.Ground truth
Compare against
window_reflection_02.jpg— window/glass surfaces with visible envmap reflections are noticeably dimmer than they should be.Likely causes
* 2.0on linearized cubemap samples as an overbright factor. The linear conversion dropped this to 1.0. Some surfaces may need a higher scale to compensate.mix(envColor, envColor * envColor, envmapContrast)) and saturation operations now run on linear values which have a different distribution than gamma values — this shifts the response curve darker.Investigation
compare.jsRelated
Fixed in
5cb64b1. AddedenvMapScaleuniform (default 2.0) applied post-linearization to cubemap samples. The reflections were too dim because the lightmap gamma compression shifted the diffuse working space, making the linear envmap contribution proportionally weaker. The 2.0 scale brings reflections in line with Source ground truth — verified againstwindow_reflection.jpgandindoor_shadow_reflections.jpg.