Dynamically Uniform Expression
|Core in version||4.5|
|Core since version||4.0|
A Dynamically Uniform Expression is a GLSL expression in which all invocations of that shader within a particular rendering command will compute the same value. This concept only matters in GLSL 4.00 and above.
There are places where GLSL requires the expression to be dynamically uniform. All of the following must use a dynamically uniform expression:
- The array index for arrays of opaque types.
- The index to buffer-backed interface blocks.
- In Compute Shaders, the expressions leading to the execution of a barrier() call. So if there is a loop or a conditional statement or somesuch, all of these conditions must be dynamically uniform expressions, so that every compute shader invocation encounters every barrier() statement in the same sequence and the same number of times.
|This article is a stub. You can help the OpenGL Wiki by expanding it.|