Improve quality of rings rendering#2917
Conversation
|
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files |
|
Not yet, please! Observe rings from Pan... It seems in perspective projection the rings vanish altogether. Other projections also look weird. See #435, hopefully you can find a solution that also fixes that? |
|
Yes, the problem around #435 is that Pan is inside the rings, so the tessellation in all but Perspective projection makes an ugly mess. Perspective is somewhat bearable. It seems that in your solution the observer is now not surrounded by rings. EDIT: You see, actually Saturn's shadow on the ring should be below the horizon. |
|
@10110111 , do you have a working solution at least for this view from Saturn? Else we should push it to 23.1 to not block 1.2. |
|
No, let this go to a next release. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
894713d to
a6629d7
Compare
|
So, I have undone the simplification of the ring mesh to a square, and fixed #2775. Only roundedness of the rings (as seen from faraway observers) remains to be the topic of this PR, which shouldn't break the look from inside the rings more than it already is. |
I accept it and approve the PR |
|
Hello @10110111! The fix has been merged into source code and you may test it via building Stellarium from source code or wait the weekly development snapshot... |
|
Hello @10110111! Please check the fresh version (development snapshot) of Stellarium: |
|
Hello @10110111! Please check the latest stable version of Stellarium: |




Description
Current code that renders planetary rings has some issues:
Outermost layer has a gap, as noted in Outer ring of Uranus has a gap #2775, and it becomes obvious even on Saturn if we reduce number of "stacks" in the call tosRing()to 3 or 2;Additionally, ring shadow is not quite smooth: sort of aliased.This PR redoes the rings in the following way:
Instead of making a polygonal model of the rings, the whole model becomes just a quad, andtexture coordinates are computed in the fragment shader to yield an annulusinstead of the square.Mip mapping is enabled for ring texture.Shadow is made behave correctly with mip mapping, finally becoming smooth.Screenshots (if appropriate):
Old Saturn (viewed from Jupiter):
New Saturn (viewed from Jupiter)
Old Uranus
New Uranus
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: