[require] GLSL >= 1.20 [vertex shader] uniform int u = 1; varying vec4 color; void func(inout int i, inout float f) { i = 0; f = 1.; } void main() { vec4 v = vec4(0.); int i = u; func(i, v[i]); color = v; gl_Position = gl_Vertex; } [fragment shader] varying vec4 color; void main() { gl_FragColor = color; } [test] draw rect -1 -1 2 2 probe all rgb 0. 1. 0.