From 52f4a750a3156285ce6ca1bf87004ca1c7b4e95d Mon Sep 17 00:00:00 2001 From: alteredq Date: Sun, 23 Jan 2011 23:21:36 +0100 Subject: [PATCH] Added simple tone mapping to HDR example. Based on formula from: http://transporter-game.googlecode.com/files/HDRRenderingInOpenGL.pdf --- examples/hdr.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/hdr.html b/examples/hdr.html index 4f6e1015..d0066ba4 100644 --- a/examples/hdr.html +++ b/examples/hdr.html @@ -71,6 +71,7 @@ @@ -152,8 +160,9 @@ materialHDR = new THREE.MeshShaderMaterial( { - uniforms: { tDiffuse: { type: "t", value: 0, texture: texture }, - exposure: { type: "f", value: 0.125 } + uniforms: { tDiffuse: { type: "t", value: 0, texture: texture }, + exposure: { type: "f", value: 0.125 }, + brightMax: { type: "f", value: 0.5 } }, vertex_shader: getText( 'vs-hdr' ), fragment_shader: getText( 'fs-hdr' )