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

Water distortions #824

Open
IntegratedQuantum opened this issue Dec 14, 2024 · 0 comments
Open

Water distortions #824

IntegratedQuantum opened this issue Dec 14, 2024 · 0 comments
Labels
enhancement a new feature or improvement experimental a feature or idea that will require lots of experimentation graphics

Comments

@IntegratedQuantum
Copy link
Member

Possible implementation:

  1. Draw all transparent blocks further away than ~100 blocks or so normally (to reduce vertex shader invocations, the effect would be disabled in the distance)
  2. Rasterize all distortable transparent blocks to a depth buffer to find the first layer.
  3. Render all transparent blocks behind that first layer (GL_GREATER) normally.
  4. Copy everything (everything that's behind the distortable layer) into a new framebuffer (half resolution to reduce bandwidth?)
  5. Render the distortable first layer (GL_EQUAL) with a special shader using the new framebuffer as a source for distortions.
  6. Render all transparent blocks before that first layer (GL_EQUAL) normally.

The fact that it would be limited to only the first layer should not be noticable (hopefully). Extending it to more layers would require an unbearable amount of additional passes.

@IntegratedQuantum IntegratedQuantum added enhancement a new feature or improvement experimental a feature or idea that will require lots of experimentation graphics labels Dec 14, 2024
@IntegratedQuantum IntegratedQuantum added this to the Long-Term Goals milestone Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a new feature or improvement experimental a feature or idea that will require lots of experimentation graphics
Projects
None yet
Development

No branches or pull requests

1 participant