You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
516 B
14 lines
516 B
10 years ago
|
layout (quads,equal_spacing,cw) in;
|
||
|
|
||
|
uniform mat4 g_WorldViewProjectionMatrix;
|
||
|
|
||
|
void main(){
|
||
|
vec3 p0 = mix(gl_in[0].gl_Position.xyz, gl_in[3].gl_Position.xyz, gl_TessCoord.x);
|
||
|
// interpolate in horizontal direction between vert. 1 and 2
|
||
|
vec3 p1 = mix(gl_in[1].gl_Position.xyz, gl_in[2].gl_Position.xyz, gl_TessCoord.x);
|
||
|
// interpolate in vert direction
|
||
|
vec3 tePosition = mix(p0, p1, gl_TessCoord.y);
|
||
|
gl_Position = g_WorldViewProjectionMatrix * vec4(tePosition, 1);
|
||
|
}
|
||
|
|