UNPKG

glsl-tone-map

Version:

A collection of tone mapping functions available both as ES modules strings and as GLSL files for use with glslify.

14 lines (9 loc) 268 B
export default /* glsl */ `vec3 reinhard2(vec3 x) { const float L_white = 4.0; return (x * (1.0 + x / (L_white * L_white))) / (1.0 + x); } float reinhard2(float x) { const float L_white = 4.0; return (x * (1.0 + x / (L_white * L_white))) / (1.0 + x); } `;