# What does [dynamic] do in HLSL

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.

• I've never seen this before either. Is it possible that it's just a mistake, and the author meant [branch]? – Nathan Reed Jan 24 '14 at 5:22
• 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? – Ramon Johannessen Jan 24 '14 at 6:37

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