Screen-aligned quad: texture coordinates
Hi everyone,
I'm trying to set up a billboard which covers the whole screen. I keep getting artifacts near the edges, so I guess I'm not setting texture coordinates right. Can I just set the coordinates to (0, 0), (0, 1), (1, 0) and (1, 1)? I think I read somewhere that these values should be offset by half a pixel (-0.5*1/viewPort.Dimension) to get a proper result. Or should I set some specific wrapping options through SetSamplerState?
Thank you
It's all right. I have the same result when rendering fullscreen quad.
I solved this problem with this example: 'EffectEdit' sample in DXSDK9.0.
I solved this problem with this example: 'EffectEdit' sample in DXSDK9.0.
Quote:Original post by tokaplan
Hi everyone,
I'm trying to set up a billboard which covers the whole screen. I keep getting artifacts near the edges, so I guess I'm not setting texture coordinates right. Can I just set the coordinates to (0, 0), (0, 1), (1, 0) and (1, 1)? I think I read somewhere that these values should be offset by half a pixel (-0.5*1/viewPort.Dimension) to get a proper result. Or should I set some specific wrapping options through SetSamplerState?
Thank you
No, the texture co-ordinates should be fine. You need to offset the position of your quad, not the texture, by -0.5 pixels.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement