开发者

texture address mode artifact on environment cube map in WP7

开发者 https://www.devze.com 2023-04-12 06:24 出处:网络
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

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号