Browse Source

ShaderChunks: Renamed TEXTURE_CUBE_LOD_EXT to TEXTURE_LOD_EXT

Mr.doob 9 years ago
parent
commit
d382d99a4f

+ 5 - 5
src/renderers/shaders/ShaderChunk/lights_pars.glsl

@@ -149,7 +149,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
 			// TODO: replace with properly filtered cubemaps and access the irradiance LOD level, be it the last LOD level
 			// of a specular cubemap, or just the default level of a specially created irradiance cubemap.
 
-			#if defined( TEXTURE_CUBE_LOD_EXT )
+			#ifdef TEXTURE_LOD_EXT
 
 				vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );
 
@@ -210,7 +210,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
 
 		reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
 
-		#ifdef TEXTURE_CUBE_LOD_EXT
+		#ifdef TEXTURE_LOD_EXT
 
 			float specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );
 
@@ -220,7 +220,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
 
 			vec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );
 
-			#ifdef TEXTURE_CUBE_LOD_EXT
+			#ifdef TEXTURE_LOD_EXT
 
 				vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );
 
@@ -236,7 +236,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
 			sampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );
 			sampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;
 
-			#ifdef TEXTURE_CUBE_LOD_EXT
+			#ifdef TEXTURE_LOD_EXT
 
 				vec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );
 
@@ -250,7 +250,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
 
 			vec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));
 
-			#ifdef TEXTURE_CUBE_LOD_EXT
+			#ifdef TEXTURE_LOD_EXT
 
 				vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );
 

+ 1 - 1
src/renderers/webgl/WebGLProgram.js

@@ -417,7 +417,7 @@ THREE.WebGLProgram = ( function () {
 				parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
 				parameters.logarithmicDepthBuffer && renderer.extensions.get( 'EXT_frag_depth' ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
 
-				parameters.envMap && renderer.extensions.get( 'EXT_shader_texture_lod' ) ? '#define TEXTURE_CUBE_LOD_EXT' : '',
+				parameters.envMap && renderer.extensions.get( 'EXT_shader_texture_lod' ) ? '#define TEXTURE_LOD_EXT' : '',
 
 				'uniform mat4 viewMatrix;',
 				'uniform vec3 cameraPosition;',