[require] GLSL >= 1.10 [vertex shader] void main() { gl_Position = gl_Vertex; } [fragment shader] uniform sampler2D table[2]; struct S { sampler2D tex; vec2 coord; }; struct S2 { sampler2D tex2[2]; }; uniform S s[2]; uniform S2 s2[2]; void main() { vec4 color = texture2D(s[1].tex, s[0].coord); color -= texture2D(s2[1].tex2[1], s[0].coord); color += texture2D(table[1], s[0].coord); gl_FragColor = color; } [test] uniform int table[1] 0 uniform int s[1].tex 0 uniform int s2[1].tex2 0 uniform vec2 s[0].coord 0 0 texture miptree 0 draw rect -1 -1 2 2 probe all rgb 1.0 0.0 0.0