Explorar o código

Merge pull request #20293 from Adjective-Object/patch-1

Docs: Add instanceMatrix to shader documentation
Mr.doob %!s(int64=5) %!d(string=hai) anos
pai
achega
be0a6d6e55
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      docs/api/en/renderers/webgl/WebGLProgram.html

+ 10 - 0
docs/api/en/renderers/webgl/WebGLProgram.html

@@ -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>