如何让 d3d 使用我的顶点 alpha 值?
我正在尝试在 d3d 中渲染纹理四边形,并且它不使用纹理渲染到的四边形的 VERTICES 的 alpha 值。相反,它使用纹理的 Alpha。
我希望 d3d 使用它所在多边形的顶点的 alpha。
我有一个想法,它与 SetTextureStageState,不过我还没找到。。
I'm trying to render a textured quad in d3d, and its not using the alpha values of the VERTICES of the quad the texture is being rendered to. Rather it is using the alpha of the TEXTURE.
I want d3d to use the alpha of the VERTICES of the polygon it is placed upon.
I have an idea it has to do with SetTextureStageState, but I can't quite find it yet..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,这就是我得到的:
D3DTSS 枚举(包含 D3DTSS_* 设置的默认值)
D3DTA 枚举
下一步是重大变化:
其余部分并没有真正改变默认值的任何内容,但它在这里所以一切都可以看到:
我认为这是可行的。
进一步理解:此链接包含一个旧的但非常简洁的工具,称为 MFCTex:
因此,当您使用不同的参数时,很容易看到所发生的效果。
我意识到这不再是一种很酷的方法了,而且编写自己的顶点和像素着色器确实很酷的方法已经有一段时间了。
OK, here's what I got:
D3DTSS enumeration (containing default values for D3DTSS_* settings)
D3DTA enumeration
THE BIG CHANGE COMES NEXT:
The rest doesn't really change anything from the default values, but its here so everything can be seen:
I think that works.
Further to understanding: this link contains an old but very neat tool called MFCTex:
So its very easy to see the effect of what's going on when you use different args.
I realize this is not the cool way to do this anymore, and really the cool way has been for some time to write your own vertex and pixel shaders.