Skip to content

Commit

Permalink
Add CINEON tone mapping mode
Browse files Browse the repository at this point in the history
  • Loading branch information
vanruesc committed Sep 6, 2024
1 parent 92dc519 commit 3a1d4bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/effects/ToneMappingEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ export class ToneMappingEffect extends Effect {
this.defines.set("toneMapping(texel)", "ReinhardToneMapping(texel)");
break;

case ToneMappingMode.CINEON:
this.defines.set("toneMapping(texel)", "CineonToneMapping(texel)");
break;

case ToneMappingMode.OPTIMIZED_CINEON:
this.defines.set("toneMapping(texel)", "OptimizedCineonToneMapping(texel)");
break;
Expand Down
10 changes: 6 additions & 4 deletions src/enums/ToneMappingMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* @property {Number} REINHARD2 - Modified Reinhard tone mapping.
* @property {Number} REINHARD2_ADAPTIVE - Simulates the optic nerve responding to the amount of light it is receiving.
* @property {Number} UNCHARTED2 - Uncharted 2 tone mapping. http://filmicworlds.com/blog/filmic-tonemapping-operators.
* @property {Number} OPTIMIZED_CINEON - Optimized filmic operator by Jim Hejl and Richard Burgess-Dawson.
* @property {Number} OPTIMIZED_CINEON - Deprecated. Use `CINEON` instead.
* @property {Number} CINEON - Optimized filmic operator by Jim Hejl and Richard Burgess-Dawson. Requires three r168 or higher.
* @property {Number} ACES_FILMIC - ACES tone mapping with a scale of 1.0/0.6.
* @property {Number} AGX - Filmic tone mapping. Requires three r160 or higher. https://github.com/EaryChow/AgX.
* @property {Number} NEUTRAL - Neutral tone mapping by Khronos. Requires three r162 or higher. https://modelviewer.dev/examples/tone-mapping.
Expand All @@ -20,7 +21,8 @@ export const ToneMappingMode = {
REINHARD2_ADAPTIVE: 3,
UNCHARTED2: 4,
OPTIMIZED_CINEON: 5,
ACES_FILMIC: 6,
AGX: 7,
NEUTRAL: 8
CINEON: 6,
ACES_FILMIC: 7,
AGX: 8,
NEUTRAL: 9
};

0 comments on commit 3a1d4bd

Please sign in to comment.