Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FilmShader: Fix deterioration. #26908

Merged
merged 3 commits into from
Oct 7, 2023
Merged

FilmShader: Fix deterioration. #26908

merged 3 commits into from
Oct 7, 2023

Commits on Oct 6, 2023

  1. 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
    kaisavi committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    538e38b View commit details
    Browse the repository at this point in the history
  2. Use fract() & stricter constraint

    Addresses mrdoob#26908 (comment)
    the constraining function is now fract() instead of mod(n,1.0), and wraps vUv + time instead of only time
    kaisavi committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    b654413 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2023

  1. Update FilmShader.js

    Clean up.
    Mugen87 committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    09bdec2 View commit details
    Browse the repository at this point in the history