简体   繁体   English

WP7中环境多维数据集贴图上的纹理地址模式工件

[英]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. 我在摆脱WP7 XNA应用程序中的工件时遇到了一些问题。 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. 在弄清楚如何使用EnvironmentMapEffect创建和加载TextureCube以及渲染对象之后,我注意到在对象上渲染的反射中有一个伪像。 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. 奇怪的是,问题仅出现在设备(LG Optimus 7)上,仿真器没有此问题。

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. 似乎环境多维数据集映射在集合中使用了第二个SamplerState。 Now it works on the device too, using what Scott suggested, but on the second index: 现在,它也可以使用Scott的建议在设备上运行,但是在第二个索引上:

// clamp texture addressing for environment map
_effect.GraphicsDevice.SamplerStates[1] = SamplerState.LinearClamp;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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