做个记号,graphics shader 2的一段 tessalate

#version 400
#extension GL_ARB_tessellation_shader : enable
uniform float uOuter02, uOuter13, uInner0, uInner1;
layout( vertices = 16 ) out;
void main( )
{
gl_out[ gl_InvocationID ].gl_Position = gl_in[ gl_InvocationID ].gl_Position;
gl_TessLevelOuter[0] = gl_TessLevelOuter[2] = uOuter02;
gl_TessLevelOuter[1] = gl_TesslevelOuter[3] = uOuter13;
gl_TessLevelInner[0] = uInner0;
gl_TessLevelInner[1] = uInner1;
}
In this example, the amount of tessellation is set by uniform variables for
simplicity. But, in fact, those levels could also have been set by examining the
geometry’s coordinate size, screen extent, zoom factors, curvature, etc. That’s
the advantage of placing this capability in the pipeline as a programmable

shader.

这是gpu端更新lod参数,还是cpu端来更新?

这些变量通过什么参数来表现?

希望看完chapter13后可以得到答案,先记着。


geometry’s coordinate size指的难道是gl_PointSize

你可能感兴趣的:(做个记号,graphics shader 2的一段 tessalate)