1 # shader subroutine test using two
2 # shader subroutines with two functions
7 GL_ARB_shader_subroutine
9 [vertex shader passthrough]
13 #extension GL_ARB_shader_subroutine: enable
17 subroutine float getchan1();
18 subroutine uniform getchan1 GetChan1;
20 subroutine float getchan2();
21 subroutine uniform getchan2 GetChan2;
49 color = vec4(GetChan1(), GetChan2(), 0.0, 1.0);
54 clear color 0.0 0.0 1.0 0.0
56 subuniform GL_FRAGMENT_SHADER GetChan1 chan1_full
57 subuniform GL_FRAGMENT_SHADER GetChan2 chan2_empty
59 probe all rgba 1.0 0.0 0.0 1.0
60 subuniform GL_FRAGMENT_SHADER GetChan1 chan1_empty
61 subuniform GL_FRAGMENT_SHADER GetChan2 chan2_full
63 probe all rgba 0.0 1.0 0.0 1.0