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

Implement distance fade and transparency #54222

Merged
merged 2 commits into from
Oct 28, 2021

Commits on Oct 25, 2021

  1. Configuration menu
    Copy the full SHA
    88d9914 View commit details
    Browse the repository at this point in the history
  2. Implement distance fade and transparency

    The built-in ALPHA in spatial shaders comes pre-set with a per-instance
    transparency value. Multiply by it if you want to keep it.
    
    The transparency value of any given GeometryInstance3D is affected by:
       - Its new "transparency" property.
       - Its own visiblity range when the new "visibility_range_fade_mode"
         property is set to "Self".
       - Its parent visibility range when the parent's fade mode is
         set to "Dependencies".
    
    The "Self" mode will fade-out the instance when reaching the visibility
    range limits, while the "Dependencies" mode will fade-in its
    dependencies.
    
    Per-instance transparency is only implemented in the forward clustered
    renderer, support for mobile should be added in the future.
    
    Co-authored-by: reduz <reduzio@gmail.com>
    JFonS and reduz committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    c571e4a View commit details
    Browse the repository at this point in the history