Question

I have a problem with visible lines appearing at the edges of the Skybox.

http://project-vanquish.co.cc/index.php <-- Shows the problem

Has anyone got any ideas as to why they are appearing? The textures don't have the white edge.

Rendering code block:

public override void Render(GraphicsDevice device)
{
    device.DepthStencilState = DepthStencilState.None;
    for (int i = 0; i < 6; i++)
    {
        this.sides[i].Position = CameraManager.ActiveCamera.Position + this.offsets[i];
        EffectManager.ActiveShader.SetParameters(this.sides[i]);

        foreach (EffectPass pass in EffectManager.ActiveShader.Effect.CurrentTechnique.Passes)
        {
            pass.Apply();
            this.sides[i].Render(device);
        }
    }

    device.DepthStencilState = DepthStencilState.Default;
}
Was it helpful?

Solution

Store your SamplerState:

SamplerState samplerState = device.SamplerStates[0];

Then, set it to AnisotropicClamp (or your preference):

device.SamplerStates[0] = SamplerState.AnisotropicClamp;

then after the render, reset your setting:

device.SamplerStates[0] = samplerState;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top