International Journal of Computer Games Technology / 2019 / Article / Alg 2

Research Article

Real-Time Large Crowd Rendering with Efficient Character and Instance Management on GPU

Algorithm 2

Transforming vertices of an instance in vertex shader.
GetLoc(
Input:, , , dim
Output:, , , )
 (1) ;
 (2) ;
 (3) ;
 (4) ;
TransformVertices(
Input:, , , , , , ;
Output:)
(1) for each vertex in in parallel do
(2) ;
(3) ;
(4) ;
(5) ;
(6) ;
(7) for each in 4 do
(8) ;
(9) ;
(10) for each in 4
(11) ;
(12) end for
(13) ;
(14) ;
(15) ;
(16) for each in 4 do
(17) ;
(18) end for
(19) ;
(20) end for
(21) ;
(22) end for