Closed riley-harper closed 3 years ago
Interesting issue: some tone maps, like the average luminance tone map, may depend on global features of the image. But these features can change as the tone maps are applied to the image. So I think how we're applying the tone maps needs to change.
There should be an ApplyToneMaps()
function. In that function, if tone_maps_
is empty, just apply a basic clamp and return. Otherwise, for each tone map in order...
This way things like blurring, component clamping, etc. won't get all mixed up together and cause wacky issues.
Another issue: blurring will need to know about samples near the one being mapped. This may mean that the ImageInfo
struct would need to contain all the bytes for the image....
Maybe we could just pass the entire image to the tone map.
Now the distinction between a tone map and a filter is being blurred. This is something to come back to later before we look at bloom and other filters.
See #45 and #43.
This shouldn't be too difficult now because of the refactoring that's been done. The tone maps can go in
image/ToneMap.h
andimage/ToneMap.cpp
. Deciding how to allow the user to access the tone maps with input file commands may be more difficult.