Sign in to follow this  
prux

Skybox, texture resizing, it spoils the edges

Recommended Posts

hey there. While I was having fun with skyboxes, I run into a problem. If you dont use a filter (or point filter) this effect doesnt appear. But if you use something else, see what happens: http://img213.imageshack.us/img213/442/skybox.jpg isnt it called "match effect"? How to avoid this? If I use no filter, the sky seems flawless, but then the clouds arent "clear" enough

Share this post


Link to post
Share on other sites
Oh that's really interesting, have you tried setting those textures to clamping mode?

I am guessing the any filtering is picking up white on the other end of the texture

[Edited by - MetaKnight on March 17, 2010 11:14:17 AM]

Share this post


Link to post
Share on other sites
i would rather use a sky dome or sky plane they produce better results. also try and disable the device lighting before u render the sky. well i guess it depends on what effect u r trying to get.

try this sampling method:

device->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
device->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
device->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );

this smooths the texture.

Share this post


Link to post
Share on other sites
Quote:
Original post by MetaKnight
Oh that's really interesting, have you tried setting those textures to clamping mode?

I am guessing the any filtering is picking up white on the other end of the texture


this it solved. I can feel some irony =) still, I dont understand why, these D3DTSS_ADDRESSU settings should applied when an .U or .V are outside of 0..1 arent them...?

Share this post


Link to post
Share on other sites
Quote:
Original post by prux
Quote:
Original post by MetaKnight
Oh that's really interesting, have you tried setting those textures to clamping mode?

I am guessing the any filtering is picking up white on the other end of the texture


this it solved. I can feel some irony =) still, I dont understand why, these D3DTSS_ADDRESSU settings should applied when an .U or .V are outside of 0..1 arent them...?


Yeah I am guessing since it's filtering, it needs data from around the pixel, and if you are at U=0, to one side is 0.1, but the other is 1.0(since it's wrapping). The video card doesn't know that the pixel is the edge of the polygon.

Share this post


Link to post
Share on other sites
Quote:
Original post by prux
Quote:
Original post by MetaKnight
Oh that's really interesting, have you tried setting those textures to clamping mode?

I am guessing the any filtering is picking up white on the other end of the texture


this it solved. I can feel some irony =) still, I dont understand why, these D3DTSS_ADDRESSU settings should applied when an .U or .V are outside of 0..1 arent them...?


The filters are sampling pixels around the actual one and thus can go outside the 0...1 range when working on the border pixels. I guess. :)

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