Skip to content

Commit 6d739b8

Browse files
committed
Fix the ACES tone map
1 parent 4508a77 commit 6d739b8

File tree

1 file changed

+2
-2
lines changed
  • chunky/src/java/se/llbit/chunky/renderer/scene

1 file changed

+2
-2
lines changed

chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,8 +1839,8 @@ public void postProcessPixel(int x, int y, double[] result) {
18391839
float aces_d = 0.59f;
18401840
float aces_e = 0.14f;
18411841
r = QuickMath.max(QuickMath.min((r * (aces_a * r + aces_b)) / (r * (aces_c * r + aces_d) + aces_e), 1), 0);
1842-
g = QuickMath.max(QuickMath.min((g * (aces_a * g + aces_b)) / (r * (aces_c * g + aces_d) + aces_e), 1), 0);
1843-
b = QuickMath.max(QuickMath.min((b * (aces_a * b + aces_b)) / (r * (aces_c * b + aces_d) + aces_e), 1), 0);
1842+
g = QuickMath.max(QuickMath.min((g * (aces_a * g + aces_b)) / (g * (aces_c * g + aces_d) + aces_e), 1), 0);
1843+
b = QuickMath.max(QuickMath.min((b * (aces_a * b + aces_b)) / (b * (aces_c * b + aces_d) + aces_e), 1), 0);
18441844
break;
18451845
case TONEMAP3:
18461846
// http://filmicgames.com/archives/75

0 commit comments

Comments
 (0)