1
\$\begingroup\$

Here's an example (this if() is inside of a for loop, which itself has the [unroll] attribute):

[dynamic]
if (n.x > 1.0f || n.x < -1.0f || n.y > 1.0f || n.y < -1.0f || n.z < 0.0f || n.z > 1.0f)
{
    break;
}

I've never seen this before, but I stumbled across this in a shader I'm trying to convert to glsl. Searches turned up nothing but the SM 5 dynamic linking ability. I looked at the available if() attributes, and there's only [branch] and [flatten] listed.

\$\endgroup\$
2
  • \$\begingroup\$ I've never seen this before either. Is it possible that it's just a mistake, and the author meant [branch]? \$\endgroup\$ – Nathan Reed Jan 24 '14 at 5:22
  • \$\begingroup\$ Yeah, that's what I was thinking...no way to know though. Thanks for your input, must have been a mistake, I guess the compiler just ignores it? \$\endgroup\$ – Ramon Johannessen Jan 24 '14 at 6:37
2
\$\begingroup\$

As per Microsoft's reference:

http://msdn.microsoft.com/en-us/library/bb313968(v=xnagamestudio.31).aspx

dynamic does not exist as a valid attribute. In this case, the compiler should have emitted a warning, stating that the attribute was unrecognized.

\$\endgroup\$
1
  • \$\begingroup\$ Ah, very good, thanks for the closure on this one. That is, if we can assume it's the same situation for PC.. \$\endgroup\$ – Ramon Johannessen Feb 20 '14 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.