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

Explore glow effect for orbits #50

Open
ajmas opened this issue Dec 21, 2023 · 4 comments
Open

Explore glow effect for orbits #50

ajmas opened this issue Dec 21, 2023 · 4 comments

Comments

@ajmas
Copy link
Owner

ajmas commented Dec 21, 2023

The orbit lines at the moment look a little ordinary. We should explore how to improve them, maybe via a bloom effect or by some other means.

While suggesting this, maybe limit the effect to orbit hover and selected orbit scenarios?

@thkruz
Copy link

thkruz commented Dec 24, 2023

What I did for my implementation is reduce the opacity of each line segment so that it subtly fades away as it wraps back around the earth.

Bloom could look nice, but I think you will need to switch to WebGl 2.0. As I recall, you will need frame buffers so that we can draw the bright parts off canvas, blur them, and then draw them back on canvas. There is no way to do that (efficiently) in WebGl 1.0.

The switch isn't a huge amount of work - just updating the shaders (I think it only took me a few hours to google the differences). The other big benefit that gives you is VAOs. Instead of setting every attribute individually before draw calls, you can setup the VAO with all those commands on initialization and then just make one call to load that VAO.

@ajmas
Copy link
Owner Author

ajmas commented Dec 24, 2023

I’d suspect the vast majority of phones and desktop in the last 5 years do WebGL 2, so making that the target should be fine?

@thkruz
Copy link

thkruz commented Dec 29, 2023

I think we should move to WebGL 2 if the goal is modernizing.

This popped up in my github feed and looks relevant. https://github.com/pmndrs/postprocessing

@ajmas
Copy link
Owner Author

ajmas commented Jan 5, 2024

BTW just confirmed that the Context is showing as WebGL 2 as being enabled already. So we should simply code with that being the case.

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

2 participants