浏览代码

Docs: Improve WebGLProgram page. (#24889)

Michael Herzog 2 年之前
父节点
当前提交
3a52fda6b7
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 4 1
      docs/api/en/renderers/webgl/WebGLProgram.html
  2. 4 1
      docs/api/zh/renderers/webgl/WebGLProgram.html

+ 4 - 1
docs/api/en/renderers/webgl/WebGLProgram.html

@@ -35,7 +35,7 @@
 		uniform vec3 cameraPosition;
 		</code>
 		<code>
-		// default vertex attributes provided by Geometry and BufferGeometry
+		// default vertex attributes provided by BufferGeometry
 		attribute vec3 position;
 		attribute vec3 normal;
 		attribute vec2 uv;
@@ -55,6 +55,9 @@
 		<h3>Vertex shader (conditional):</h3>
 		<div>
 		<code>
+		#ifdef USE_TANGENT
+			attribute vec4 tangent;
+		#endif
 		#if defined( USE_COLOR_ALPHA )
 			// vertex color attribute with alpha
 			attribute vec4 color;

+ 4 - 1
docs/api/zh/renderers/webgl/WebGLProgram.html

@@ -35,7 +35,7 @@
 		uniform vec3 cameraPosition;
 		</code>
 		<code>
-		// default vertex attributes provided by Geometry and BufferGeometry
+		// default vertex attributes provided and BufferGeometry
 		attribute vec3 position;
 		attribute vec3 normal;
 		attribute vec2 uv;
@@ -55,6 +55,9 @@
 		<h3>顶点着色器(有条件的):</h3>
 		<div>
 		<code>
+		#ifdef USE_TANGENT
+			attribute vec4 tangent;
+		#endif
 		#if defined( USE_COLOR_ALPHA )
 			// vertex color attribute with alpha
 			attribute vec4 color;