提交 94eca51d 编写于 作者: B Ben Houston

adopt new naming scheme per @mrdoob's recommendation.

上级 47aa1beb
......@@ -308,10 +308,10 @@ THREE.TriangleFanDrawMode = 2;
// Texture Encodings
THREE.Linear = 3000; // No encoding at all.
THREE.sRGB = 3001; // AKA gamma 2.2.
THREE.RGBE = 3002; // AKA Radiance
//THREE.LogLuv = 3003; TODO
THREE.RGBM7 = 3004;
THREE.RGBM16 = 3005;
//THREE.RGBD = 3006; TODO
THREE.LinearEncoding = 3000; // No encoding at all.
THREE.sRGBEncoding = 3001; // AKA gamma 2.2.
THREE.RGBEEncoding = 3002; // AKA Radiance
//THREE.LogLuvEncoding = 3003; TODO
THREE.RGBM7Encoding = 3004;
THREE.RGBM16Encoding = 3005;
//THREE.RGBDEncoding = 3006; TODO
......@@ -1962,7 +1962,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
uniforms.envMap.value = material.envMap;
uniforms.envMapEncoding.value = ( material.envMap ? material.envMap.encoding : THREE.Linear );
uniforms.envMapEncoding.value = ( material.envMap ? material.envMap.encoding : THREE.LinearEncoding );
uniforms.flipEnvMap.value = ( material.envMap instanceof THREE.WebGLRenderTargetCube ) ? 1 : - 1;
uniforms.reflectivity.value = material.reflectivity;
......
// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/
// These encodings should have the same integer values as THREE.Linear, THREE.sRGB, etc...
// These encodings should have the same integer values as THREE.LinearEncoding, THREE.sRGBEncoding, etc...
#define ENCODING_Linear 3000
#define ENCODING_sRGB 3001
#define ENCODING_RGBE 3002
......
......@@ -16,7 +16,7 @@ THREE.UniformsLib = {
"alphaMap": { type: "t", value: null },
"envMap": { type: "t", value: null },
"envMapEncoding" : { type: "i", value: THREE.Linear },
"envMapEncoding" : { type: "i", value: THREE.LinearEncoding },
"flipEnvMap": { type: "f", value: - 1 },
"reflectivity": { type: "f", value: 1.0 },
"refractionRatio": { type: "f", value: 0.98 }
......@@ -40,7 +40,7 @@ THREE.UniformsLib = {
emissivemap: {
"emissiveMap": { type: "t", value: null },
"emissiveMapEncoding": { type: "i", value: THREE.Linear }
"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.Linear; // Values !== THREE.Linear only supported on 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 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.
先完成此消息的编辑!
想要评论请 注册