Hi, I'm a long time reader, first time poster in these forums so please forgive me if this post is in the wrong section.
I've been having a problem with the HLSL distance function in my pixel shader.
Here is my code:
float3 Dist = distance(LightSource.xyz, In.AimDirection.xyz);
And here's my exception message:
Error 1 Errors compiling C:\Users\Public\Michael's Projects\XNA\Game\Game\Content\SkyBox.fx:
C:\Users\Public\Michael's Projects\XNA\Game\Game\Content\SkyBox.fx(35): warning X4707: texcoord inputs used directly (that is, other than sampling from textures) in shader body in ps_1_1 are always clamped from 0 to 1
C:\Users\Public\Michael's Projects\XNA\Game\Game\Content\SkyBox.fx(35): error X4532: cannot map expression to pixel shader instruction set
C:\Users\Public\Michael's Projects\XNA\Game\Game\Content\SkyBox.fx(46): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression
ID3DXEffectCompiler: Compilation failed C:\Users\Public\Michael's Projects\XNA\Game\Game\Content\SkyBox.fx 35 1
I have no idea what that whole texcoord stuff is about...
Thanks in advance for any help.
--Michael