1 # test calling subroutine uniforms in an array
2 # with a constant value works.
5 GL_ARB_explicit_attrib_location
6 GL_ARB_explicit_uniform_location
7 GL_ARB_shader_subroutine
9 [vertex shader passthrough]
13 #extension GL_ARB_explicit_attrib_location : require
14 #extension GL_ARB_explicit_uniform_location : require
15 #extension GL_ARB_shader_subroutine: enable
19 subroutine float getchan1();
21 layout(location = 4) subroutine uniform getchan1 GetChan1[2];
37 color = vec4(GetChan1[0](), GetChan1[1](), 0.0, 1.0);
42 clear color 0.0 0.0 1.0 0.0
44 subuniform GL_FRAGMENT_SHADER GetChan1[0] chan_full
45 subuniform GL_FRAGMENT_SHADER GetChan1[1] chan_empty
47 probe all rgba 1.0 0.0 0.0 1.0
48 subuniform GL_FRAGMENT_SHADER GetChan1[0] chan_empty
49 subuniform GL_FRAGMENT_SHADER GetChan1[1] chan_full
51 probe all rgba 0.0 1.0 0.0 1.0