DirectX/HLSL error PS2.0
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:
fl开发者_JS百科oat 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?
This bit
Shader uses texture addressing operations
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).
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.
精彩评论