This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uniform vec2 u_resolution; | |
| uniform float u_time; | |
| uniform sampler2D u_diffuse; | |
| uniform sampler2D u_dataTexture; | |
| uniform float u_amplitude; | |
| varying vec2 v_uv; | |
| vec3 correctGamma(vec3 color) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vec3 palette(float t) { | |
| vec3 a = vec3(0.5, 0.5, 0.5); | |
| vec3 b = vec3(0.5, 0.5, 0.5); | |
| vec3 c = vec3(1.0, 1.0, 0.5); | |
| vec3 d = vec3(0.80, 0.90, 0.30); | |
| return a + b * cos(6.28318 * (c * t + d)); | |
| } | |
| vec3 col = palette(uv.y + 0.5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Fn, float } from 'three/tsl' | |
| /** | |
| * Applies Reinhard tonemapping to a color vector. | |
| * @param {vec3} _color Input color vector | |
| * @returns {vec3} Tonemapped color | |
| */ | |
| export const reinhardTonemap = Fn(([_color]) => { | |
| return _color.div(_color.add(1.0)) | |
| }) |
OlderNewer