1 # test calling subroutine uniforms in an array
2 # with a constant value works.
5 GL_ARB_shader_subroutine
7 [vertex shader passthrough]
11 #extension GL_ARB_shader_subroutine: enable
15 subroutine float getchan1();
17 subroutine uniform getchan1 GetChan1[2];
33 color = vec4(GetChan1[0](), GetChan1[1](), 0.0, 1.0);
38 clear color 0.0 0.0 1.0 0.0
40 subuniform GL_FRAGMENT_SHADER GetChan1[0] chan_full
41 subuniform GL_FRAGMENT_SHADER GetChan1[1] chan_empty
43 probe all rgba 1.0 0.0 0.0 1.0
44 subuniform GL_FRAGMENT_SHADER GetChan1[0] chan_empty
45 subuniform GL_FRAGMENT_SHADER GetChan1[1] chan_full
47 probe all rgba 0.0 1.0 0.0 1.0