PDA

View Full Version : How to render a simple skyline



rockeye
03-24-2009, 08:54 AM
Hi,

I would like to have a simple skyline, like in Google SketchUp : just a gradient of colors, no skybox, no cubemap... If possible, I would like to avoid shaders.

I thought of a GL_TEXTURE_1D applied to a fullscreen quad. The texCoord of each vertex is depending on the y of the corresponding corner of the far frustum plan. This show grossly were the ground or the sky is but the skyline is not clearly defined since the color interpolation depends on the vertices.

Any ideas about how this could be done ?

zeoverlord
03-24-2009, 11:45 AM
In these cases i would normally use a gluSphere and texture it with a small bitmap.
Just render it inverted without any depthwriting at the same place as the camera and it will work just fine