Dynamically Uniform Expression: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
Stub for dynamically uniform expressions
 
m Malformed link.
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{infobox feature
#REDIRECT [[Core Language (GLSL)#Dynamically uniform expression]]
| core = 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.
 
== Definition ==
 
=== Examples ===
 
 
 
== Uses ==
 
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 [[GLSL Type#Opaque arrays|arrays of opaque types]].
* The index to buffer-backed interface blocks.
* In [[Compute Shaders]], the expressions leading to the execution of a {{code|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 {{code|barrier()}} statement in the same sequence and the same number of times.
 
{{stub}}
 
[[Category:OpenGL Shading Language]]

Latest revision as of 09:36, 31 August 2013