Original Post
I've been trying to implement skybox rendering. I have it mostly working, except that when I move the camera, the polygons of my skybox will sometimes flicker out of view, showing the backdrop color behind it.
I'm using a textured cube with the vertex order reversed to represent the skybox.
I'm setting the depthstencilstate to this:
My vertex shader looks like this:
I'm rendering the skybox after everything else. Could this just be a problem with my graphics card? I'm currently running on an intel integrated card on my laptop with dx9.
It all works perfectly except for when I start to move or rotate the camera.
Edit: I was able to try it on another computer, and the problem disappeared. So it must have something to do with the intel card. Is there any way I could prevent this problem from occurring though?
I'm using a textured cube with the vertex order reversed to represent the skybox.
I'm setting the depthstencilstate to this:
DepthEnable=TRUE;
DepthWriteMask=D3D11_DEPTH_WRITE_MASK_ALL;
DepthFunc=D3D11_COMPARISON_LESS_EQUAL;
StencilEnable=FALSE;
StencilReadMask=D3D11_DEFAULT_STENCIL_READ_MASK;
StencilWriteMask=D3D11_DEFAULT_STENCIL_WRITE_MASK;My vertex shader looks like this:
VS_OUT VS(float3 Pos : POSITION, float2 Tex: TEXCOORD0)
{
VS_OUT output = (VS_OUT)0;
output.posH=mul(float4(Pos,1),World);
//make z and w the same so that the depth is always considered 1
output.posH=mul(output.posH,ViewProjection).xyww;
output.tex0=Tex;
return output;
}I'm rendering the skybox after everything else. Could this just be a problem with my graphics card? I'm currently running on an intel integrated card on my laptop with dx9.
It all works perfectly except for when I start to move or rotate the camera.
Edit: I was able to try it on another computer, and the problem disappeared. So it must have something to do with the intel card. Is there any way I could prevent this problem from occurring though?