Skip to content

Commit

Permalink
Make PBR Neutral invertible (#7677)
Browse files Browse the repository at this point in the history
Based on model-viewer's change at
google/model-viewer#4716
  • Loading branch information
romainguy authored Mar 19, 2024
1 parent ba9cb2f commit a8fda9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filament/src/ToneMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ float3 PBRNeutralToneMapper::operator()(math::float3 color) const noexcept {
color *= newPeak / peak;

float g = 1.0f - 1.0f / (desaturation * (peak - newPeak) + 1.0f);
return mix(color, float3(1.0f), g);
return mix(color, float3(newPeak), g);
}

//------------------------------------------------------------------------------
Expand Down

0 comments on commit a8fda9b

Please sign in to comment.