Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FilmShader: Fix deterioration. (#26908)
* Fix FilmShader Deterioration Incorrect usage of the ``rand`` function causes the film effect to deteriorate with large time values. This is fixed by applying a modulus to the time value, restraining it to the expected [0,1]x[0,1] range of the ``rand`` function https://github.com/mrdoob/three.js/blob/76e1fb171af400afebbfb851ef7d7297625c5f0a/src/renderers/shaders/ShaderChunk/common.glsl.js#L24 * Use fract() & stricter constraint Addresses #26908 (comment) the constraining function is now fract() instead of mod(n,1.0), and wraps vUv + time instead of only time * Update FilmShader.js Clean up. --------- Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
- Loading branch information