wpf 支持除 TEXCOORD 之外的任何着色器输入

发布于 2024-09-15 19:00:40 字数 324 浏览 4 评论 0原文

我知道您可以将常量寄存器绑定到依赖属性,也可以将画笔绑定到采样器,但是我见过的 wpf 着色器的每个示例都使用声明

main( float2 uv : TEXCOORD ) : COLOR

我是 HLSL 的完全新手但我知道除了 TEXCOORD 之外还有其他语义。它们中的任何一个都可以与 WPF 着色器一起使用吗?

同样,除了语义 COLOR 之外,是否还可以使用任何有效的返回值?

或者语义只是对用户的“提醒”,WPF 将运行它收到的任何着色器,就好像它具有 TEXCOORD 输入和 COLOR 输出一样(并且会在 float4 或 struct 输入上阻塞)?

I know that you can tie constant registers to dependency properties as well as tie a brush to a sampler, but every example I have seen of a wpf shader uses the declaration

main( float2 uv : TEXCOORD ) : COLOR

I am a complete newbie to HLSL but I know there are other semantics than TEXCOORD. Can any of them be used with a WPF shader?

Similarly are there any valid returns that can be used other than the semantic COLOR?

Or are the semantics just "reminders" to the user and WPF will run whatever shader it receives as if it has TEXCOORD inputs and a COLOR output regardless (and will choke on a float4 or struct input)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月下客 2024-09-22 19:00:40

根据优秀的教程Greg Schechter,WPF 仅支持具有该签名的 main 方法。虽然这是在 PS3 支持之前编写的,但我认为这方面没有任何改变。

According to the excellent tutorial by Greg Schechter, WPF only supports a main method with that signature. Although that was written before PS3 support, I don't think anything has changed in this regard.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文