|
@@ -92,6 +92,16 @@
|
|
|
attribute vec4 skinWeight;
|
|
|
#endif
|
|
|
</code>
|
|
|
+ <code>
|
|
|
+ #ifdef USE_INSTANCING
|
|
|
+ // Note that modelViewMatrix is not set when rendering an instanced model,
|
|
|
+ // but can be calculated from viewMatrix * modelMatrix.
|
|
|
+ //
|
|
|
+ // Basic Usage:
|
|
|
+ // gl_Position = projectionMatrix * viewMatrix * modelMatrix * instanceMatrix * vec4(position, 1.0);
|
|
|
+ attribute mat4 instanceMatrix;
|
|
|
+ #endif
|
|
|
+ </code>
|
|
|
</div>
|
|
|
|
|
|
<h3>Fragment shader:</h3>
|