- Home /
Profile does not support "for" statements and "for" could not be unrolled.
I have a "for" statement in my Cg. I DID add the line: "#pragma target 3.0"
above: "#pragma vertex vert #pragma fragment frag"
But, nothing.
I was able to write for loops in GLSL, HLSL, and Cg using C++, and C# languages; It's not clear to me why this wouldn't work as my graphics card definitely supports the "for" statement.
The Shader, once compiled without the for loop, says its using 3.0; So, I'm confused! =D
for(int i = 0; i < 5; ++i)
{
noise += noise3(float3(x, y, z) * freq) * amp;
freq *= 2;
amp *= _Persistence;
}
if I replace the 5 with _Octaves(as it should be) I no longer get the errors, though I then get to many Temp Registers(32 limit, used 50); I added the profile option NumTemps=256 but nothing changed.. any clues?
Best regards, Kyle
Your answer
Follow this Question
Related Questions
Cg and "for" statements, what's the deal? 2 Answers
[SOLVED] Cg Error: profile does not support "for" statements 1 Answer
Shader error in ... : Syntax error at line 30 1 Answer
CG shader is treated as GLSL and doesn't compile 0 Answers
Shader compiler: internal error compiling shader snippet type=0 platform=0: 1 Answer