Graphics Reference
In-Depth Information
Weight Sum
Vertex Shader
Input VBO
(Attrib Pointer)
Difference
Mash 0 VBO
(Attrib Pointer)
Δ[weight][0]
. . .
Δ[weight][N-1]
. . .
Difference
Mesh N-1 VBO
(Attrib Pointer)
Output VBO
(BufferBase)
Transform
Feedback Object
Figure 4.2. Technique overview.
4.4.1 Pose Update
Before we update the pose, we must first compute the changes in the weights.
The following pseudo code illustrates how this can be done.
// Inputs :
// w[] : current frame weight vector
// p[] : previous frame weight vector
// dw[] : delta weight vector
// Per Frame Weight Update:
animate ( w )
for i =0 to length ( w ):
dw [ i ]= w [ i ]
p [ i ]
p [ i ]= w [ i ]
Using the delta weights we can now check to see what components of the weight
vector have changed. For those weights that have changed, do a transform feed-
back pass using the key-pose.
// Inputs :
// q[] : array of difference mesh VBOs
// dw[] : delta weight vector
// vbo[] : array of vertex buffer objects for storing current
// pose
// tfo : transform feedback object
// shader : shader program for accumulation
// Per Frame Pose Update:
glBindTransformFeedback ( tfo )
glEnable ( RASTERIZER_DISCARD )
Search WWH ::




Custom Search