3 GL_ARB_tessellation_shader
5 [vertex shader passthrough]
6 [tessellation evaluation shader]
7 #extension GL_ARB_tessellation_shader : require
10 uniform sampler2D tex;
14 gl_in[0].gl_Position * gl_TessCoord[0] +
15 gl_in[1].gl_Position * gl_TessCoord[1] +
16 gl_in[2].gl_Position * gl_TessCoord[2];
17 color = texture(tex, gl_Position.xy*0.5 + vec2(0.5));
37 patch parameter default level outer 25 25 25 25
38 patch parameter default level inner 25 25
40 clear color 0.5 0.5 0.5 1.0
42 patch parameter vertices 3
44 texture checkerboard 0 0 (32, 32) (0.0, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0)
45 texparameter 2D min nearest
46 texparameter 2D mag nearest
48 draw arrays GL_PATCHES 0 6
50 # black portion of checkerboard
51 relative probe rgba (0, 0) (0, 0, 0, 0)
52 relative probe rgba (0.25, 0.25) (0,0,0,0)
53 relative probe rgba (0.75, 0.75) (0,0,0,0)
55 # green portion of checkerboard
56 relative probe rgba (0, 0.75) (0,1,0,0)
57 relative probe rgba (0.75, 0.25) (0,1,0,0)
58 relative probe rgba (0.5, 0.5) (0,1,0,0)
60 # should hit the red border color of the texture
61 tolerance 0.1 0.1 0 0.1
62 relative probe rgba (1, 1) (1,0,0,1)
63 relative probe rgba (0, 1) (1,0,0,1)
64 relative probe rgba (1, 0) (1,0,0,1)