InlineMatrixArrayTexture.kl

Types

InlineMatrixArrayTexture (object)

バージョン 1.12.0 で追加.

The InlineMatrixArrayTexture provides a facility to upload large amounts of matrices as a texture. These can then be used in a skinning shader, for example, to deform crowds.

/*
** Example: InlineMatrixArrayTexture
*/

require InlineDrawing;
  
operator entry() {

      InlineDrawing draw = OGLInlineDrawing();
      
      // register the texture in the drawing
      InlineMatrixArrayTexture texture = draw.registerTexture(InlineMatrixArrayTexture('crowdMatrices'));
      
      // update the texture later with new poses
      Mat44 poses[];
      poses.resize(1024);
      
      // add some code to fill the poses
      
      texture.update(poses);
  
}

/*
** Output:


*/