Reputation: 302
I'm working on atmospheric shader based on glsl-atmosphere (https://github.com/wwwtyro/glsl-atmosphere) using three.js
First I just applied this shaders to a sphere and I got very good results :)
The original shaders didn't had sun drawing elements, so I just made it by using
float spot = smoothstep(0.0, 1000.0, pMie)*10.0;
and then added this part into the return statement:
return iSun * (spot*totalMie+pRlh * kRlh * totalRlh + pMie * kMie * totalMie);
It looks good from this angle, but when it it near the border of the screen:
It becomes an ellipsoid...
What can I do to fix it?
Upvotes: 1
Views: 961
Reputation: 1334
That's perspective distortion. All you need is to reduce field of view of your camera.
Upvotes: 2