Hello all! Now that I got my Skybox to render in Deferred Shading and Light Pre-Pass, the next thing on my list is creating a dynamic skydome (moving clouds, time of day, etc). For time of day, I am going to use change the skydome's vertex colors. But before I can do that, I would like to get a smooth gradient. Here's what I have currently:
As you can see, as I continue to look up, it fades from black to blue, but in some spots toward the top, there are dark lines. I would like to get rid of those. I am currently calculating the vertex colors by calculating the distance between the camera's Y component and each vertex's Y component. I then take that distance, multiply it by .1, and set the vertex color's XYZ to the BaseColor.[component] multiplied by the distance.
for (int i = 0; i < Dome.Meshes[0].VertexCount; ++i)
{
float dist = roundf(Dome.Meshes[0].Vertices[i].Position.y - Camera->Position.y);
dist *= 0.1f;
Dome.Meshes[0].Vertices[i].Color.x = (BaseColor.x * dist);
Dome.Meshes[0].Vertices[i].Color.y = (BaseColor.y * dist);
Dome.Meshes[0].Vertices[i].Color.z = (BaseColor.z * dist);
}
Dome.Meshes[0].VertexBuffer.Update(Dome.Meshes[0].Vertices);
How would I get rid of those dark lines? Is there a better way to do this? Thanks! :)