ianmackenzie / elm-3d-scene

A high-level 3D rendering engine for Elm, with support for lighting, shadows, and realistic materials.
https://package.elm-lang.org/packages/ianmackenzie/elm-3d-scene/latest/
Mozilla Public License 2.0
205 stars 27 forks source link

Add ToneMapping type? #68

Closed ianmackenzie closed 4 years ago

ianmackenzie commented 4 years ago

Would allow for

toneMapping = Scene3d.noToneMapping
toneMapping = Scene3d.reinhardToneMapping
toneMapping = Scene3d.reinhardToneMappingWith { maxOverExposure = 5 }

etc. instead of

dynamicRange = 1
dynamicRange = infinity
dynamicRange = 5

in Scene3d.toHtml and would allow for greater variety of possible tone mapping options in the future (ACES, Uncharted etc.).

Reinhard paper to link to in documentation of reinhardToneMapping/reinhardToneMappingWith: http://www.cmap.polytechnique.fr/~peyre/cours/x2005signal/hdr_photographic.pdf

ianmackenzie commented 4 years ago

Implemented in b17fafb67dd5615621f6d2079f1ca7b12a870331.