浏览代码

Renamed uniform hemisphereLightPosition => hemisphereLightDirection

Because that's what it is.
alteredq 12 年之前
父节点
当前提交
2a7885e8b3

+ 8 - 8
build/three.js

@@ -14013,7 +14013,7 @@ THREE.ShaderChunk = {
 
 
 			"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
-			"uniform vec3 hemisphereLightPosition[ MAX_HEMI_LIGHTS ];",
+			"uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];",
 
 
 		"#endif",
 		"#endif",
 
 
@@ -14221,7 +14221,7 @@ THREE.ShaderChunk = {
 
 
 			"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 			"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 
 
-				"vec4 lDirection = viewMatrix * vec4( hemisphereLightPosition[ i ], 0.0 );",
+				"vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );",
 				"vec3 lVector = normalize( lDirection.xyz );",
 				"vec3 lVector = normalize( lDirection.xyz );",
 
 
 				"float dotProduct = dot( transformedNormal, lVector );",
 				"float dotProduct = dot( transformedNormal, lVector );",
@@ -14349,7 +14349,7 @@ THREE.ShaderChunk = {
 
 
 			"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
-			"uniform vec3 hemisphereLightPosition[ MAX_HEMI_LIGHTS ];",
+			"uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];",
 
 
 		"#endif",
 		"#endif",
 
 
@@ -14656,7 +14656,7 @@ THREE.ShaderChunk = {
 
 
 			"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 			"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 
 
-				"vec4 lDirection = viewMatrix * vec4( hemisphereLightPosition[ i ], 0.0 );",
+				"vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );",
 				"vec3 lVector = normalize( lDirection.xyz );",
 				"vec3 lVector = normalize( lDirection.xyz );",
 
 
 				// diffuse
 				// diffuse
@@ -15390,7 +15390,7 @@ THREE.UniformsLib = {
 		"directionalLightDirection" : { type: "fv", value: [] },
 		"directionalLightDirection" : { type: "fv", value: [] },
 		"directionalLightColor" : { type: "fv", value: [] },
 		"directionalLightColor" : { type: "fv", value: [] },
 
 
-		"hemisphereLightPosition" : { type: "fv", value: [] },
+		"hemisphereLightDirection" : { type: "fv", value: [] },
 		"hemisphereLightSkyColor" : { type: "fv", value: [] },
 		"hemisphereLightSkyColor" : { type: "fv", value: [] },
 		"hemisphereLightGroundColor" : { type: "fv", value: [] },
 		"hemisphereLightGroundColor" : { type: "fv", value: [] },
 
 
@@ -21333,7 +21333,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 		uniforms.hemisphereLightSkyColor.value = lights.hemi.skyColors;
 		uniforms.hemisphereLightSkyColor.value = lights.hemi.skyColors;
 		uniforms.hemisphereLightGroundColor.value = lights.hemi.groundColors;
 		uniforms.hemisphereLightGroundColor.value = lights.hemi.groundColors;
-		uniforms.hemisphereLightPosition.value = lights.hemi.positions;
+		uniforms.hemisphereLightDirection.value = lights.hemi.positions;
 
 
 	};
 	};
 
 
@@ -25122,7 +25122,7 @@ THREE.ShaderUtils = {
 
 
 					"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 					"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 					"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
 					"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
-					"uniform vec3 hemisphereLightPosition[ MAX_HEMI_LIGHTS ];",
+					"uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];",
 
 
 				"#endif",
 				"#endif",
 
 
@@ -25407,7 +25407,7 @@ THREE.ShaderUtils = {
 
 
 						"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 						"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 
 
-							"vec4 lDirection = viewMatrix * vec4( hemisphereLightPosition[ i ], 0.0 );",
+							"vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );",
 							"vec3 lVector = normalize( lDirection.xyz );",
 							"vec3 lVector = normalize( lDirection.xyz );",
 
 
 							// diffuse
 							// diffuse

文件差异内容过多而无法显示
+ 0 - 1
build/three.min.js


+ 2 - 2
examples/js/ShaderSkin.js

@@ -96,7 +96,7 @@ THREE.ShaderSkin = {
 
 
 				"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 				"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 				"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
 				"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
-				"uniform vec3 hemisphereLightPosition[ MAX_HEMI_LIGHTS ];",
+				"uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];",
 
 
 			"#endif",
 			"#endif",
 
 
@@ -255,7 +255,7 @@ THREE.ShaderSkin = {
 
 
 					"for ( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 					"for ( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 
 
-						"vec4 lDirection = viewMatrix * vec4( hemisphereLightPosition[ i ], 0.0 );",
+						"vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );",
 						"vec3 lVector = normalize( lDirection.xyz );",
 						"vec3 lVector = normalize( lDirection.xyz );",
 
 
 						"float dotProduct = dot( normal, lVector );",
 						"float dotProduct = dot( normal, lVector );",

+ 2 - 2
examples/js/ShaderTerrain.js

@@ -99,7 +99,7 @@ THREE.ShaderTerrain = {
 
 
 				"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 				"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 				"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
 				"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
-				"uniform vec3 hemisphereLightPosition[ MAX_HEMI_LIGHTS ];",
+				"uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];",
 
 
 			"#endif",
 			"#endif",
 
 
@@ -230,7 +230,7 @@ THREE.ShaderTerrain = {
 
 
 					"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 					"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 
 
-						"vec4 lDirection = viewMatrix * vec4( hemisphereLightPosition[ i ], 0.0 );",
+						"vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );",
 						"vec3 lVector = normalize( lDirection.xyz );",
 						"vec3 lVector = normalize( lDirection.xyz );",
 
 
 						// diffuse
 						// diffuse

+ 2 - 2
src/extras/ShaderUtils.js

@@ -189,7 +189,7 @@ THREE.ShaderUtils = {
 
 
 					"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 					"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 					"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
 					"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
-					"uniform vec3 hemisphereLightPosition[ MAX_HEMI_LIGHTS ];",
+					"uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];",
 
 
 				"#endif",
 				"#endif",
 
 
@@ -474,7 +474,7 @@ THREE.ShaderUtils = {
 
 
 						"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 						"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 
 
-							"vec4 lDirection = viewMatrix * vec4( hemisphereLightPosition[ i ], 0.0 );",
+							"vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );",
 							"vec3 lVector = normalize( lDirection.xyz );",
 							"vec3 lVector = normalize( lDirection.xyz );",
 
 
 							// diffuse
 							// diffuse

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -5314,7 +5314,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 		uniforms.hemisphereLightSkyColor.value = lights.hemi.skyColors;
 		uniforms.hemisphereLightSkyColor.value = lights.hemi.skyColors;
 		uniforms.hemisphereLightGroundColor.value = lights.hemi.groundColors;
 		uniforms.hemisphereLightGroundColor.value = lights.hemi.groundColors;
-		uniforms.hemisphereLightPosition.value = lights.hemi.positions;
+		uniforms.hemisphereLightDirection.value = lights.hemi.positions;
 
 
 	};
 	};
 
 

+ 5 - 5
src/renderers/WebGLShaders.js

@@ -456,7 +456,7 @@ THREE.ShaderChunk = {
 
 
 			"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
-			"uniform vec3 hemisphereLightPosition[ MAX_HEMI_LIGHTS ];",
+			"uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];",
 
 
 		"#endif",
 		"#endif",
 
 
@@ -664,7 +664,7 @@ THREE.ShaderChunk = {
 
 
 			"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 			"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 
 
-				"vec4 lDirection = viewMatrix * vec4( hemisphereLightPosition[ i ], 0.0 );",
+				"vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );",
 				"vec3 lVector = normalize( lDirection.xyz );",
 				"vec3 lVector = normalize( lDirection.xyz );",
 
 
 				"float dotProduct = dot( transformedNormal, lVector );",
 				"float dotProduct = dot( transformedNormal, lVector );",
@@ -792,7 +792,7 @@ THREE.ShaderChunk = {
 
 
 			"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
 			"uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];",
-			"uniform vec3 hemisphereLightPosition[ MAX_HEMI_LIGHTS ];",
+			"uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];",
 
 
 		"#endif",
 		"#endif",
 
 
@@ -1099,7 +1099,7 @@ THREE.ShaderChunk = {
 
 
 			"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 			"for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {",
 
 
-				"vec4 lDirection = viewMatrix * vec4( hemisphereLightPosition[ i ], 0.0 );",
+				"vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );",
 				"vec3 lVector = normalize( lDirection.xyz );",
 				"vec3 lVector = normalize( lDirection.xyz );",
 
 
 				// diffuse
 				// diffuse
@@ -1833,7 +1833,7 @@ THREE.UniformsLib = {
 		"directionalLightDirection" : { type: "fv", value: [] },
 		"directionalLightDirection" : { type: "fv", value: [] },
 		"directionalLightColor" : { type: "fv", value: [] },
 		"directionalLightColor" : { type: "fv", value: [] },
 
 
-		"hemisphereLightPosition" : { type: "fv", value: [] },
+		"hemisphereLightDirection" : { type: "fv", value: [] },
 		"hemisphereLightSkyColor" : { type: "fv", value: [] },
 		"hemisphereLightSkyColor" : { type: "fv", value: [] },
 		"hemisphereLightGroundColor" : { type: "fv", value: [] },
 		"hemisphereLightGroundColor" : { type: "fv", value: [] },
 
 

部分文件因为文件数量过多而无法显示