简体   繁体   中英

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 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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM