texture address mode artifact on environment cube map in WP7
I am having some problems getting rid of an artifact in my WP7 XNA application. After figuring out how to create and load a TextureCube and render objects using the EnvironmentMapEffect, I noticed an artifact in the reflection rendered on the object. It looks like the cube texture I'm employing is using a wrap开发者_Python百科 texture address mode instead of clamp texture address mode.
The weird thing is that the problem only appears on the device (LG Optimus 7), the emulator doesn't have this issue.
Does anyone know if this is a bug, or am I doing something wrong?
I am attaching a 'camera-shot' of the issue on my device. << reflection artifact >>
It seems like the environment cube map employed the second SamplerState in the collection. Now it works on the device too, using what Scott suggested, but on the second index:
// clamp texture addressing for environment map
_effect.GraphicsDevice.SamplerStates[1] = SamplerState.LinearClamp;
精彩评论