2010-11-17 80 views
0

我有一個出現在Skybox邊緣的可見線條出現問題。Skybox中的奇怪線條

http://project-vanquish.co.cc/index.php < - 顯示

有沒有人有任何想法,爲什麼他們出現的問題?紋理沒有白色的邊緣。

渲染代碼塊:

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; 
} 

回答

4

Store中的SamplerState系列:

SamplerState samplerState = device.SamplerStates[0]; 

然後,將其設置爲AnisotropicClamp(或您的偏好):

device.SamplerStates[0] = SamplerState.AnisotropicClamp; 

再經過渲染,重置您的設置:

device.SamplerStates[0] = samplerState; 
+0

非常好。你剛剛保存了一些頭髮! :O) – 2010-11-17 17:07:53