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

Higher Variable Inspection Precision #1

Open
gkjohnson opened this issue Sep 27, 2017 · 2 comments
Open

Higher Variable Inspection Precision #1

gkjohnson opened this issue Sep 27, 2017 · 2 comments

Comments

@gkjohnson
Copy link
Owner

Variables are inspected by reading back the framebuffer and converting the pixel value to a float, etc. However, colors are clamped from 0.0 to 1.0 and stored as a byte per channel, meaning a lot of data is lost between the shader and reading that data back.

Possible Solutions

  • A higher precision format, such as a 32-bit per channel texture type would afford higher precision output
  • Packing only 1 float into a single vec4 color channel output would afford more precision, but would require a lot more rendering and be harder to manage.
@gkjohnson
Copy link
Owner Author

This seems solvable in WebGL2 with new data formats like RGBA32F:
https://webgl2fundamentals.org/webgl/lessons/webgl2-whats-new.html

@gkjohnson
Copy link
Owner Author

ThreeJS WebGL2Renderer Issue: mrdoob/three.js#9965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant