SOS:纹理绘制不完美
这是我的代码。
m_pApp->m_pd3dDevice->SetTextureStageState(0,D3DTSS_COLORARG1,D3DTA_TEXTURE);
m_pApp->m_pd3dDevice->SetTextureStageState(0,D3DTSS_COLORARG2,D3DTA_DIFFUSE);
m_pApp->m_pd3dDevice->SetTextureStageState(0,D3DTSS_COLOROP,D3DTOP_MODULATE);
m_pApp->m_pd3dDevice->SetTextureStageState(1,D3DTSS_COLORARG1,D3DTA_TEXTURE);
m_pApp->m_pd3dDevice->SetTextureStageState(1,D3DTSS_COLORARG2,D3DTA_CURRENT);
m_pApp->m_pd3dDevice->SetTextureStageState(1,D3DTSS_COLOROP,D3DTOP_ADD);
纹理 0 没有任何 Alpha 信息。我想将 alpha 值 0 赋予值高于 0x88 的颜色顶点。我还想将值小于 0x88 的顶点赋为 1。
我不知道纹理遮罩效果。
Here is my code.
m_pApp->m_pd3dDevice->SetTextureStageState(0,D3DTSS_COLORARG1,D3DTA_TEXTURE);
m_pApp->m_pd3dDevice->SetTextureStageState(0,D3DTSS_COLORARG2,D3DTA_DIFFUSE);
m_pApp->m_pd3dDevice->SetTextureStageState(0,D3DTSS_COLOROP,D3DTOP_MODULATE);
m_pApp->m_pd3dDevice->SetTextureStageState(1,D3DTSS_COLORARG1,D3DTA_TEXTURE);
m_pApp->m_pd3dDevice->SetTextureStageState(1,D3DTSS_COLORARG2,D3DTA_CURRENT);
m_pApp->m_pd3dDevice->SetTextureStageState(1,D3DTSS_COLOROP,D3DTOP_ADD);
Texture 0 does not have any alpha information. I want to give alpha value 0 to the color vertex whose value is higher than 0x88. I also want to give value 1 to the vertex whose value is lower than 0x88.
I don't know about texture mask effect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哦是的。
这个问题与光有关。
设置 Light 后,纹理成功显示。
Oh, Yes.
The problem was linked to light.
after I set Light the texture was displayed successfully.