ToneMapping

A tone mapping effect.

import { ToneMapping } from '@react-three/postprocessing'
import { BlendFunction } from 'postprocessing'

return (
  <ToneMapping
    blendFunction={BlendFunction.NORMAL} // blend mode
    adaptive={true} // toggle adaptive luminance map usage
    resolution={256} // texture resolution of the luminance map
    middleGrey={0.6} // middle grey factor
    maxLuminance={16.0} // maximum luminance
    averageLuminance={1.0} // average luminance
    adaptationRate={1.0} // luminance adaptation rate
  />
)

Example

ToneMapping demo
ToneMapping demo

Props

NameTypeDefaultDescription
resolutionNumber256The resolution of the luminance texture. Must be a power of two.
adaptivebooleantrueToggle adaptive luminance map usage
blendFunctionBlendFunctionThe blend function of this effect.
middleGreyNumber0.6The middle grey factor.
maxLuminanceNumber16Maximum luminance
minLuminanceNumber0.01The minimum luminance. Prevents very high exposure in dark scenes.
averageLuminanceNumber1The average luminance. Used for the non-adaptive Reinhard operator.
adaptationRateNumber1The luminance adaptation rate.