Skip to main content
GameDev.net gamedev.net
🔒 Locked

cant compile shader with "normlize" function in sourcecode

Started by c-mos Jun 13, 2009 at 1:58 PM 2 replies 450+ views
Original Post
c-mos
c-mos
Hello, In my shader sourcecode I use the function normalize(). when i load and compile my cgfx shader file and call cgValidateTechnique then it occurs an error. Technique has not been validated. But when I dont use normalize, the tachnique will be validate. The error occurs not during run-time. Occurs by compiling the shader. What the ... is that ? I use the latest cg version 2.2 c-mos
AndyEsser
AndyEsser
Just a shot in the dark, but have you tried normalise() instead?
c-mos
c-mos
Hello, now it's working. The code itself has not changed a lot.
In the fragment shader main function i had some variable declerations
like float4 dir = float4(0.0,0.0,0.0,0.0); right at the beginning;
The I didnt declared the variables , instead i declared them in the
code where i needed them i.e
...
..
...
float4 dir = end - front;
..
..
...
I think the command is normalize(), with z ?. Correct me if im wrong.
I choosed the fp40/vp40 profile. Should support normalize.

Anyway i will chekc out the normali(s)e.

thanks,
c-mos

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.