Optional__Protected_Protected_Protected Optional_Protected_ReadonlyextraReadonlyextraThe priority of the material extension when applied to the material in ScreenPass set to very low priority, so applied at the end
Global toggle to apply tonemapping on the background. The tonemapping is not applied if either this or RootScene.backgroundTonemap is false.
OptionaluiStatic Optional ReadonlyOldStatic ReadonlyPluginProtected_Protected_Optionalprefix: stringOptionalmeta: anyFunction to return the UI config for this material extension. This is called once when the material extension is registered.
Function to check if this material extension is compatible with the given material. If not compatible, the material extension will not be added to the material. This is only checked when the extension is registered.
The extension is assumed to be compatible if this function is not defined
Whether the screen pass tone maps the pixels of the material, as TonemapPlugin.patch.glsl decides it:
false when the plugin is disabled, or when the material opts out (MaterialTonemapEnabled)
and the screen pass reads the GBuffer flags (HAS_GBUFFER and GBUFFER_HAS_FLAGS of the primary GBuffer).
Without the GBuffer flags, every pixel is tone mapped.
Used by the material previews (materialPreviewOptionsFromViewer).
Custom callback to extend/modify/replace shader code and other shader properties
Optionalmeta: SerializationMetaTypeThe tonemap bit of the GBuffer flags of a material: off when userData.gBufferData.tonemapEnabled (or the legacy
userData.postTonemap) is false, else when the material's own toneMapped is false, so the three.js flag works too.
StaticMaterialWhether the material asks for tone mapping: false when userData.gBufferData.tonemapEnabled
(or the legacy userData.postTonemap) is false, else when the material's own toneMapped is false.
This is the bit written to the GBuffer flags.
Tonemap Plugin
Adds an extension to ScreenPass material for applying tonemapping on the final buffer before rendering to screen.
Also adds support for Uncharted2 tone-mapping.