Skip to content

Rayleigh v2#6285

Open
Mc-Pain wants to merge 16 commits into
pioneerspacesim:masterfrom
Mc-Pain:rayleigh-v2
Open

Rayleigh v2#6285
Mc-Pain wants to merge 16 commits into
pioneerspacesim:masterfrom
Mc-Pain:rayleigh-v2

Conversation

@Mc-Pain

@Mc-Pain Mc-Pain commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Experimental approach to improve rayleigh shaders:

Might be slow, but still accurate pre-calculated density LUT's and synced models within physics and graphics engines.

@fluffyfreak

Copy link
Copy Markdown
Contributor

What's the best way to test this? What am I looking for?
You mentioned that it might be slow but do you mean slower than the existing version?

@Mc-Pain

Mc-Pain commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

What's the best way to test this? What am I looking for?

Try to look at Venus or Titan, it should not have any sharp edges

You mentioned that it might be slow but do you mean slower than the existing version?

A little bit, not that catastrophic drop from 50 FPS to 3 FPS using uniform arrays and doing mix() between its elements

With my GPU, it was like 55 -> 51 FPS drop

@impaktor

impaktor commented Feb 7, 2026

Copy link
Copy Markdown
Member

If this is slower, this would be an optional setting.

What am I looking for?

In the original PR @Mc-Pain mentions:

This also makes water reflect rays from skylight, bringing realistic Earth colors.

@Mc-Pain

Mc-Pain commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

It's still an optional setting along with legacy atmosphere

Comment thread src/graphics/opengl/TextureGL.cpp
Comment thread src/graphics/opengl/TextureGL.cpp Outdated
@sturnclaw

Copy link
Copy Markdown
Member

Will make some time to benchmark this soon, and I'd like to investigate the possibility of using a similar precomputation method for other objects in the scene.

@Mc-Pain

Mc-Pain commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

Some Work-In-Progress screenshots:
image
image
image
image

@Mc-Pain Mc-Pain force-pushed the rayleigh-v2 branch 3 times, most recently from fd48292 to 2405914 Compare May 26, 2026 16:45
this approach is still slow and buggy
- need to move calculating into vertex shaders
- need to move water/lava flags into another texture map - vertexColor
  manipulating may break something
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

Successfully merging this pull request may close these issues.

4 participants