mateversum icon indicating copy to clipboard operation
mateversum copied to clipboard

Unlit materials probably shouldn't be tonemapped

Open expenses opened this issue 3 years ago • 1 comments

https://gltf-viewer.donmccurdy.com/ displays the Alicia.vrm VRM sample as like this:

20220627_17h18m08s_grim

while we currently render Alicia.VRM like this:

20220627_17h18m02s_grim

This is because we're doing tonemapping for unlit materials but probably shouldn't be.

This is very solveable when doing inline tonemapping - just don't tonemap and just do the linear-to-srgb conversion instead! But when we're doing a seperate tonemapping pass it gets harder. How do we tell that a fragment should be tonemapped or not? Perhaps we could write to the alpha channel and tonemap if the alpha is 1.0 and not if it's 0.0.

expenses avatar Jun 27 '22 15:06 expenses

I've implemented the inline tonemapping solution in this superconductor commit: https://github.com/expenses/mateversum/commit/46fffce3e77f047ccb47f917c2ca0698b4a790e2.

expenses avatar Jun 27 '22 15:06 expenses