提交 e3840079 编写于 作者: B Ben Houston

remove THREE.DefaultEncoding and also old uniforms for encoding.

上级 17d1b908
......@@ -315,4 +315,3 @@ THREE.RGBEEncoding = 3002; // AKA Radiance
THREE.RGBM7Encoding = 3004;
THREE.RGBM16Encoding = 3005;
//THREE.RGBDEncoding = 3006; TODO
THREE.DefaultEncoding = 3007; // Use sRGB or Linear as appropriate.
......@@ -1888,7 +1888,6 @@ THREE.WebGLRenderer = function ( parameters ) {
}
uniforms.map.value = material.map;
uniforms.mapEncoding.value = (( material.map && material.map.encoding !== THREE.DefaultEncoding ) ? material.map.encoding : THREE.LinearEncoding );
uniforms.specularMap.value = material.specularMap;
uniforms.alphaMap.value = material.alphaMap;
......@@ -1963,7 +1962,6 @@ THREE.WebGLRenderer = function ( parameters ) {
}
uniforms.envMap.value = material.envMap;
uniforms.envMapEncoding.value = (( material.envMap && material.envMap.encoding !== THREE.DefaultEncoding )? material.envMap.encoding : THREE.LinearEncoding );
uniforms.flipEnvMap.value = ( material.envMap instanceof THREE.WebGLRenderTargetCube ) ? 1 : - 1;
uniforms.reflectivity.value = material.reflectivity;
......@@ -2035,7 +2033,6 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( material.emissiveMap ) {
uniforms.emissiveMap.value = material.emissiveMap;
uniforms.emissiveMapEncoding.value = ( material.emissiveMap.encoding !== THREE.DefaultEncoding ) ? material.emissiveMap.encoding : THREE.LinearEncoding;
}
......@@ -2056,7 +2053,6 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( material.emissiveMap ) {
uniforms.emissiveMap.value = material.emissiveMap;
uniforms.emissiveMapEncoding.value = ( material.emissiveMap.encoding !== THREE.DefaultEncoding ) ? material.emissiveMap.encoding : THREE.LinearEncoding;
}
......@@ -2111,7 +2107,6 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( material.emissiveMap ) {
uniforms.emissiveMap.value = material.emissiveMap;
uniforms.emissiveMapEncoding.value = ( material.emissiveMap.encoding !== THREE.DefaultEncoding ) ? material.emissiveMap.encoding : THREE.LinearEncoding;
}
......
......@@ -10,14 +10,12 @@ THREE.UniformsLib = {
"opacity": { type: "f", value: 1.0 },
"map": { type: "t", value: null },
"mapEncoding" : { type: "i", value: THREE.sRGBEncoding },
"offsetRepeat": { type: "v4", value: new THREE.Vector4( 0, 0, 1, 1 ) },
"specularMap": { type: "t", value: null },
"alphaMap": { type: "t", value: null },
"envMap": { type: "t", value: null },
"envMapEncoding" : { type: "i", value: THREE.LinearEncoding },
"flipEnvMap": { type: "f", value: - 1 },
"reflectivity": { type: "f", value: 1.0 },
"refractionRatio": { type: "f", value: 0.98 }
......@@ -41,7 +39,6 @@ THREE.UniformsLib = {
emissivemap: {
"emissiveMap": { type: "t", value: null },
"emissiveMapEncoding": { type: "i", value: THREE.LinearEncoding }
},
......
......@@ -36,7 +36,7 @@ THREE.Texture = function ( image, mapping, wrapS, wrapT, magFilter, minFilter, f
this.premultiplyAlpha = false;
this.flipY = true;
this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)
this.encoding = THREE.DefaultEncoding; // Values !== THREE.LinearEncoding only supported on map, envMap and emissiveMap (as these maps regularly have unbounded intensity values, i.e. via an *.hdr or *.exr image.)
this.encoding = THREE.LinearEncoding; // Values !== THREE.LinearEncoding only supported on map, envMap and emissiveMap (as these maps regularly have unbounded intensity values, i.e. via an *.hdr or *.exr image.)
this.version = 0;
this.onUpdate = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册