• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 310 es
2#extension GL_EXT_tessellation_shader : require
3#extension GL_EXT_gpu_shader5 : require
4
5layout(vertices = 3) out;
6
7layout(location = 0) in highp vec2  in_tc_position[];
8layout(location = 1) in highp float in_tc_tessParam[];
9
10layout(location = 0) out highp vec2 in_te_position[];
11
12precise gl_TessLevelOuter;
13
14void main (void)
15{
16    in_te_position[gl_InvocationID] = in_tc_position[gl_InvocationID];
17
18    gl_TessLevelInner[0] = 5.0;
19    gl_TessLevelInner[1] = 5.0;
20
21    gl_TessLevelOuter[0] = 1.0 + 59.0 * 0.5 * (in_tc_tessParam[1] + in_tc_tessParam[2]);
22    gl_TessLevelOuter[1] = 1.0 + 59.0 * 0.5 * (in_tc_tessParam[2] + in_tc_tessParam[0]);
23    gl_TessLevelOuter[2] = 1.0 + 59.0 * 0.5 * (in_tc_tessParam[0] + in_tc_tessParam[1]);
24}
25