Browse Source

Texture is a map, not an envMap

WestLangley 6 years ago
parent
commit
25a138a94b

+ 1 - 1
src/renderers/shaders/ShaderLib/cube_frag.glsl

@@ -8,7 +8,7 @@ void main() {
 
 	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
 
-	gl_FragColor = envMapTexelToLinear( texColor );
+	gl_FragColor = mapTexelToLinear( texColor );
 	gl_FragColor.a *= opacity;
 
 	#include <tonemapping_fragment>

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

@@ -68,7 +68,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
 				};
 
 				// enable code injection for non-built-in material
-				Object.defineProperty( boxMesh.material, 'envMap', {
+				Object.defineProperty( boxMesh.material, 'map', {
 
 					get: function () {