2
0
Эх сурвалжийг харах

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

Docs: Add instanceMatrix to shader documentation
Mr.doob 4 жил өмнө
parent
commit
be0a6d6e55

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