Browse Source

Docs: Improve WebGLProgram page. (#24889)

Michael Herzog 2 years ago
parent
commit
3a52fda6b7

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