[quote name='Magmatwister' timestamp='1309620555' post='4830364']
Could you tell me what you're trying to achieve here? Do you just want Earth with some sort of atmospheric scattering? I'm working on a planet renderer and I can probably point you in the right direction based on what you want to do.
I try to do space-view to Earth for my game.
I want that looks like google earth.
Must be very fast and very easy - becouse will port to android and OpenGl ES
now i improve as
ginkgo explained. will better:
and very easy shader for terminator and shadow
void main( void )
{
vec4 texel0, texel1, resultColor;
float alpha = clamp( 8.0 * max( 0.0, dot( light_dir, normal ) ), 0.0, 1.0 );
texel0 = texture2D( sampler2d, myTexCoord );
texel1 = texture2D( nightTexture, myTexCoord );
resultColor = mix( texel0, texel1, alpha );
gl_FragColor = resultColor;
}
will to do glow around Earth looks like google earth.
[/quote]
Ah, ok, If you don't want anything fancy then I suggest taking a page from a guy that I will link below. If you want to keep it simple then this is probably the way to go, If you have any questions regarding his approach I'm sure he won't mind you asking him. I provided you with two links, depending on the complexity you want. If you want anything more realistic/appealling than that (taking into account that your atmosphere will most likely be very thin compared to his), then you will have to implement considerably harder code, with the added computation cost that comes with that. Hope that helped.
http://petrocket.blogspot.com/2010/01/simple-flexibile-atmosphere-shaders.html
http://petrocket.blogspot.com/2010/04/atmosphere-shader-update-and-treegrass.html
Currently trying to make a planet renderer. After many hours of work, somehow I know It'll never be complete.
Also, If I help you, please give me an ++