|
@@ -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 );
|
|
|
|