Archived

This topic is now archived and is closed to further replies.

FantasyGuy

Sky box

Recommended Posts

I have added a sky box to my scene. Everything was fine except for the edges of the box that I can still see. I checked the original bitmap images of the sky box and I didn''t see anything wrong with it. I still don''t know what''s the cause of the problem. The lighting is turned off. The skybox was loaded from an x file which I have taken from one of the samples of DX8 SDK. What made me baffled is that I found that the same problem exist in Unreal Tournament. Couldn''t they solve this problem? My VGA card is a TNT II with 32MB of VRAM. I''ll be grateful if anyone helps me solving this.

Share this post


Link to post
Share on other sites
add the following code before render the skybox and see it this hleps.

m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ADDRESSU, D3DTADDRESS_MIRROR );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ADDRESSV, D3DTADDRESS_MIRROR );

best wishes
Edidas

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I''m assuming you have linear filtering enabled or something like that right?

If so, then do this before rendering the skybox:

m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ADDRESSU, D3DTADDRESS_CLAMP );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ADDRESSV, D3DTADDRESS_CLAMP );

Even though your tex. coords may be in range (0-1) when the filtering happens it may be looking slightly past 1 and getting a dark value and blending it for the final pixel. Just clamp it.
Then it will take the value at 1 instead...

ao



Share this post


Link to post
Share on other sites
If neither of those work I have a piece of code that will fix it. I am a bit busy at the moment, so I don''t have the time to post it unless you need it (I don''t have the internet on the computer that has my programming stuff on).

Moe''s site

Share this post


Link to post
Share on other sites