1 # two subroutine test adding a uniform in
2 # this makes sure normal uniforms and
3 # subroutine uniforms don't interfere.
7 GL_ARB_shader_subroutine
9 [vertex shader passthrough]
13 #extension GL_ARB_shader_subroutine: enable
18 subroutine float getchan1();
19 subroutine uniform getchan1 GetChan1;
21 subroutine float getchan2();
22 subroutine uniform getchan2 GetChan2;
50 color = vec4(GetChan1(), GetChan2(), myin, 1.0);
55 clear color 0.0 0.0 1.0 0.0
57 subuniform GL_FRAGMENT_SHADER GetChan1 chan1_full
58 subuniform GL_FRAGMENT_SHADER GetChan2 chan2_empty
59 uniform float myin 1.0
61 probe all rgba 1.0 0.0 1.0 1.0
62 subuniform GL_FRAGMENT_SHADER GetChan1 chan1_empty
63 subuniform GL_FRAGMENT_SHADER GetChan2 chan2_full
64 uniform float myin 1.0
66 probe all rgba 0.0 1.0 1.0 1.0