Sign in to follow this  
eldeann

skybox edges are visible

Recommended Posts

Hello, i'm making a terrain viewer. results are ok except that i have a problem with the skybox : its edges are visible. does anyone has already had this problem ? picture is at : http://eldeann7.chez.tiscali.fr/error_skybox.htm the skybox edge is visible on the reflection on the water. thanks Eldeann

Share this post


Link to post
Share on other sites
This problem is sometimes due to using the wrong sampler state. If you're using D3D try setting the sampler states ADDRESSU = CLAMP and ADDRESSV = CLAMP - the default is wrap which means pixels at the edge can filter with pixels from the other side of the texture. Using clamp stops that happening. I don't know what the equivalent setting for OpenGL is but there is probably something similar.

Another option is to render your skybox with a cubemap - that has the advantage that you don't have to change textures to render the six faces. If you want to get really clever you can use a cubemap to draw your 'skybox' with a single full screen quad and no texture changes.

Share this post


Link to post
Share on other sites
i did as you said (for direct3d), and that works perfectly :

pDevice->SetSamplerState( 0, D3DSAMP_ADDRESSU , D3DTADDRESS_CLAMP );
pDevice->SetSamplerState( 0, D3DSAMP_ADDRESSV , D3DTADDRESS_CLAMP );


thanks much, and about the cubemap, i prefer to pay attention to performance for the terrain rendering, it's my big bottleneck yet.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you're right, setting the sampler states to D3DTADDRESS_CLAMP is not enough, it's better, but edges are still a bit visible.
i set the coordinates to ( 0.002 , 1.0-0.002) instead of ( 0.0,1.0) and that's much better

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this