I’m experiencing a challenge with my atmospheric scattering shader when applied to large scale planets and at significant distances from the scene’s origin. The shader exhibits artifacts like “noise” and concentric rings which intensify as the distance from the scene’s center increases.
Here’s a brief outline of the issue:
The shader is designed to render atmospheric effects around 3D planets.
Artifacts occur as planets are placed further from the scene’s center, with larger planets displaying more pronounced “noise”.
The artifacts are less noticeable for planets closer to the light source and become severe as the distance grows.
The artifacts manifest as both concentric rings around the planet and random “noise” in the atmosphere.
Any insights or suggestions to mitigate these artifacts would be greatly appreciated. If more code or context is required, I can provide it.
Thank you for your assistance!
Here are some screenshots demonstrating the problems
Are you using shadow casting lights ?
Are you using logarithmicDepthBuffer ?
Do these effects interact with the depth buffer?
What values are your camera.near and camera.far set to, and what is the world space size of the celestial bodies?
yes and no, in app having Directional light, but it is legacy of start development, when i used default materials, now it doesn’t use for its intended purpose, shadow map is disabled
no
no, depth calculates in shader, using uniforms lightPosition, objectPosition, cameraPosition
it is a good question, camera.near = 0.5 camera.far = 5000000, sizes of every object computes by simple formula - radius * 0.001 (radiuses taken from open sources of physical parameters celestial bodies), vectors scales by the same formula but with astronimical units parameter (vector * au * 0.001), the most large object on scene is 696 units, parameters camera.near and camera.far now are experimental, but changing them up or down did not affect the shader
@sergowt1975 Hey did you ever figure out these artifacts? oddly enough i’m actually doing atmospheric shading myself but i see these artifacts outside of any kind of ray tracing…