DirectX/HLSL 错误 PS2.0
我收到此错误
着色器在依赖链中使用纹理寻址操作,该依赖链对于目标着色器模型 (ps_2_0) 来说过于复杂,无法处理。
since i have added this line to my pixelshader:
float Gauss[NUMWT] = { 5.052271056506993e-15, 9.134720359492243e-12, 6.07588281731559e-9, 0.0000014867195067797903, 0.00013383022504883334, 0.004431848388225362, 0.053990966224306644, 0.2419707232244606, 0.39894227826685835, 0.2419707232244606, 0.053990966224306644, 0.004431848388225362, 0.00013383022504883334, 0.0000014867195067797903, 6.07588281731559e-9, 9.134720359492243e-12, 5.052271056506993e-15 };
这个数组太大了吗?
i am getting this error
Shader uses texture addressing operations in a dependency chain that is too complex for the target shader model (ps_2_0) to handle.
since i have added this line to my pixelshader:
float Gauss[NUMWT] = { 5.052271056506993e-15, 9.134720359492243e-12, 6.07588281731559e-9, 0.0000014867195067797903, 0.00013383022504883334, 0.004431848388225362, 0.053990966224306644, 0.2419707232244606, 0.39894227826685835, 0.2419707232244606, 0.053990966224306644, 0.004431848388225362, 0.00013383022504883334, 0.0000014867195067797903, 6.07588281731559e-9, 9.134720359492243e-12, 5.052271056506993e-15 };
is this array too big?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这一点
可能是问题所在的关键。错误没有附带行号和字符号吗?
在复杂路径(可能是分支)内寻找从纹理采样或计算位置的点。
This bit
is probably the key to where your problem is. Did the error not come with a line and character number?
Look for spots where you're sampling from textures or calculating the position, within complex paths (possibly branching).
做了一个快速测试,数组使用 ps_2_0 (将 NUMWT 定义为 17)对我来说编译得很好,所以我猜你的错误在其他地方。
另外,为什么它在处理如此“小”的数组时会有任何问题呢?纹理要大得多。
Did a quick test and the array compiles fine for me using ps_2_0 (defining NUMWT as 17) so I guess your error is somewhere else.
Also why should it have any issues handling such "small" arrays? textures are far bigger.