Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
ccameron-chromium committed Jul 24, 2024
1 parent aa9ec98 commit 87ce612
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
var gl_program = null;

let drawGLCanvas = function() {
// Select the tone mapping mode based on the radio button.
let toneMappingMode = null;
if (ToneMapModeStandard.checked) {
toneMappingMode = "standard";
}
if (ToneMapModeExtended.checked) {
toneMappingMode = "extended";
}
gl.drawingBufferToneMapping({ mode:toneMappingMode });


gl.useProgram(gl_program);

let vertices = gl.createBuffer();
Expand Down Expand Up @@ -51,16 +62,6 @@
PixelValueLinear.innerHTML = srgbToLinear(PixelValueSlider.value).toFixed(2);
}

// Select the tone mapping mode based on the radio button.
let toneMappingMode = null;
if (ToneMapModeStandard.checked) {
toneMappingMode = "standard";
}
if (ToneMapModeExtended.checked) {
toneMappingMode = "extended";
}
gl.drawingBufferToneMapping({ mode:toneMappingMode });

drawGLCanvas();
}

Expand Down

0 comments on commit 87ce612

Please sign in to comment.