فهرست منبع

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

Docs: Add instanceMatrix to shader documentation
Mr.doob 4 سال پیش
والد
کامیت
be0a6d6e55
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  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>