문제

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;
}
도움이 되었습니까?

해결책

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top