Explorar o código

WebGLRenderer: Remove RGBEEncoding and RGBEFormat. (#23060)

* WebGLRenderer: Remove RGBEEncoding and RGBEFormat.

* Shaders: Clean up.
Michael Herzog %!s(int64=3) %!d(string=hai) anos
pai
achega
cee9706c1c

+ 0 - 4
docs/api/en/constants/Textures.html

@@ -151,7 +151,6 @@
 		THREE.RGBAIntegerFormat
 		THREE.RGBAIntegerFormat
 		THREE.LuminanceFormat
 		THREE.LuminanceFormat
 		THREE.LuminanceAlphaFormat
 		THREE.LuminanceAlphaFormat
-		THREE.RGBEFormat
 		THREE.DepthFormat
 		THREE.DepthFormat
 		THREE.DepthStencilFormat
 		THREE.DepthStencilFormat
 		</code>
 		</code>
@@ -199,8 +198,6 @@
 		The same process occurs as for the [page:constant LuminanceFormat], except that the
 		The same process occurs as for the [page:constant LuminanceFormat], except that the
 		alpha channel may have values other than *1.0*.<br /><br />
 		alpha channel may have values other than *1.0*.<br /><br />
 
 
-		[page:constant RGBEFormat] is identical to [page:constant RGBAFormat].<br /><br />
-
 		[page:constant DepthFormat] reads each element as a single depth value, converts it to floating point, and clamps to the range [0,1].
 		[page:constant DepthFormat] reads each element as a single depth value, converts it to floating point, and clamps to the range [0,1].
 		This is the default for [page:DepthTexture DepthTexture].<br /><br />
 		This is the default for [page:DepthTexture DepthTexture].<br /><br />
 
 
@@ -560,7 +557,6 @@
 		THREE.LinearEncoding
 		THREE.LinearEncoding
 		THREE.sRGBEncoding
 		THREE.sRGBEncoding
 		THREE.GammaEncoding
 		THREE.GammaEncoding
-		THREE.RGBEEncoding
 		THREE.BasicDepthPacking
 		THREE.BasicDepthPacking
 		THREE.RGBADepthPacking
 		THREE.RGBADepthPacking
 		</code>
 		</code>

+ 2 - 2
docs/api/en/extras/PMREMGenerator.html

@@ -42,7 +42,7 @@
 		<p>
 		<p>
 			[page:Texture equirectangular] - The equirectangular texture.<br /><br />
 			[page:Texture equirectangular] - The equirectangular texture.<br /><br />
 
 
-			Generates a PMREM from an equirectangular texture, which can be either LDR (RGBFormat) or HDR (RGBEFormat).
+			Generates a PMREM from an equirectangular texture, which can be either LDR or HDR.
 			The ideal input image size is 1k (1024 x 512), as this matches best with the 256 x 256 cubemap output.
 			The ideal input image size is 1k (1024 x 512), as this matches best with the 256 x 256 cubemap output.
 		</p>
 		</p>
 
 
@@ -50,7 +50,7 @@
 		<p>
 		<p>
 			[page:CubeTexture cubemap] - The cubemap texture.<br /><br />
 			[page:CubeTexture cubemap] - The cubemap texture.<br /><br />
 
 
-			Generates a PMREM from an cubemap texture, which can be either LDR (RGBFormat) or HDR (RGBEFormat).
+			Generates a PMREM from an cubemap texture, which can be either LDR or HDR.
 			The ideal input cube size is 256 x 256, as this matches best with the 256 x 256 cubemap output.
 			The ideal input cube size is 256 x 256, as this matches best with the 256 x 256 cubemap output.
 		</p>
 		</p>
 
 

+ 0 - 4
docs/api/ko/constants/Textures.html

@@ -148,7 +148,6 @@
 		THREE.RGBAIntegerFormat
 		THREE.RGBAIntegerFormat
 		THREE.LuminanceFormat
 		THREE.LuminanceFormat
 		THREE.LuminanceAlphaFormat
 		THREE.LuminanceAlphaFormat
-		THREE.RGBEFormat
 		THREE.DepthFormat
 		THREE.DepthFormat
 		THREE.DepthStencilFormat
 		THREE.DepthStencilFormat
 		</code>
 		</code>
@@ -195,8 +194,6 @@
 		The same process occurs as for the [page:constant LuminanceFormat]와 같은 절차가 이루어지며, 알파 채널에 *1.0* 이외의 값이 들어갈 수 있다는 점만 다릅니다.
 		The same process occurs as for the [page:constant LuminanceFormat]와 같은 절차가 이루어지며, 알파 채널에 *1.0* 이외의 값이 들어갈 수 있다는 점만 다릅니다.
 		<br /><br />
 		<br /><br />
 
 
-		[page:constant RGBEFormat]은 [page:constant RGBAFormat]과 동일합니다..<br /><br />
-
 		[page:constant DepthFormat]은 각 요소를 단일 깊이 값으로 일거들이며 부동 소수점으로 변환하고, [0,1]범위에 고정합니다.
 		[page:constant DepthFormat]은 각 요소를 단일 깊이 값으로 일거들이며 부동 소수점으로 변환하고, [0,1]범위에 고정합니다.
 		[page:DepthTexture DepthTexture]의 기본값이기도 합니다.<br /><br />
 		[page:DepthTexture DepthTexture]의 기본값이기도 합니다.<br /><br />
 
 
@@ -554,7 +551,6 @@
 		THREE.LinearEncoding
 		THREE.LinearEncoding
 		THREE.sRGBEncoding
 		THREE.sRGBEncoding
 		THREE.GammaEncoding
 		THREE.GammaEncoding
-		THREE.RGBEEncoding
 		THREE.BasicDepthPacking
 		THREE.BasicDepthPacking
 		THREE.RGBADepthPacking
 		THREE.RGBADepthPacking
 		</code>
 		</code>

+ 5 - 5
docs/api/ko/extras/PMREMGenerator.html

@@ -11,7 +11,7 @@
 
 
 		<p class="desc">
 		<p class="desc">
 			이 클래스는 큐브맵 환경 텍스처로부터 사전 필터링된 Mipmap Radiance Environment Map(PMREM)을 생성합니다.
 			이 클래스는 큐브맵 환경 텍스처로부터 사전 필터링된 Mipmap Radiance Environment Map(PMREM)을 생성합니다.
-이를 통해 재질의 거칠기에 따라 다양한 수준의 블러를 빠르게 적용할 수 있습니다. RGBE와 같은 비선형 형식을 지원할 수 있도록 사용자 지정 보간을 수행할 수 있는 특수 CubeUV 형식으로 포장되어 있습니다. 
+이를 통해 재질의 거칠기에 따라 다양한 수준의 블러를 빠르게 적용할 수 있습니다. RGBE와 같은 비선형 형식을 지원할 수 있도록 사용자 지정 보간을 수행할 수 있는 특수 CubeUV 형식으로 포장되어 있습니다.
 기존의 mipmap 체인과는 달리, LOD_MIN 수준까지만 내려가며(위), 더 높은 거칠기 수준과 연관된 동일한 LOD_MIN 해상도에서 훨씬 더 많은 필터링된 'mips'를 생성합니다.
 기존의 mipmap 체인과는 달리, LOD_MIN 수준까지만 내려가며(위), 더 높은 거칠기 수준과 연관된 동일한 LOD_MIN 해상도에서 훨씬 더 많은 필터링된 'mips'를 생성합니다.
 이러한 방법으로 샘플링 계산을 제한하면서 확산 조명을 부드럽게 보간하기 위한 해상도를 유지합니다.
 이러한 방법으로 샘플링 계산을 제한하면서 확산 조명을 부드럽게 보간하기 위한 해상도를 유지합니다.
 		</p>
 		</p>
@@ -40,7 +40,7 @@
 		<p>
 		<p>
 			[page:Texture equirectangular] - 등장방형 텍스쳐입니다.<br /><br />
 			[page:Texture equirectangular] - 등장방형 텍스쳐입니다.<br /><br />
 
 
-			LDR(RGBFormat) 또는 HDR(RGBEFormat)일 수 있는 등장방형 텍스처로부터 PMREM을 생성합니다.
+			LDR 또는 HDR일 수 있는 등장방형 텍스처로부터 PMREM을 생성합니다.
 			이상적인 입력 이미지 크기는 1k(1024 x 512)로, 256 x 256 큐브 맵 출력과 가장 잘 일치합니다.
 			이상적인 입력 이미지 크기는 1k(1024 x 512)로, 256 x 256 큐브 맵 출력과 가장 잘 일치합니다.
 		</p>
 		</p>
 
 
@@ -48,7 +48,7 @@
 		<p>
 		<p>
 			[page:CubeTexture cubemap] - 큐브맵 텍스쳐입니다.<br /><br />
 			[page:CubeTexture cubemap] - 큐브맵 텍스쳐입니다.<br /><br />
 
 
-			LDR(RGBFormat) 또는 HDR(RGBEFormat)일 수 있는 큐브맵 텍스처로부터 PMREM을 생성합니다.
+			LDR 또는 HDR일 수 있는 큐브맵 텍스처로부터 PMREM을 생성합니다.
 			이상적인 입력 이미지 크기는 1k(1024 x 512)로, 256 x 256 큐브 맵 출력과 가장 잘 일치합니다.
 			이상적인 입력 이미지 크기는 1k(1024 x 512)로, 256 x 256 큐브 맵 출력과 가장 잘 일치합니다.
 		</p>
 		</p>
 
 
@@ -64,8 +64,8 @@
 
 
 		<h3>[method:undefined dispose]()</h3>
 		<h3>[method:undefined dispose]()</h3>
 		<p>
 		<p>
-			PMREM 제너레이터의 내장 메모리를 폐기합니다. 
-			PMREMGenerator는 정적 클래스이므로 두 개 이상의 PMREMGenerator 개체가 필요하지 않습니다. 
+			PMREM 제너레이터의 내장 메모리를 폐기합니다.
+			PMREMGenerator는 정적 클래스이므로 두 개 이상의 PMREMGenerator 개체가 필요하지 않습니다.
 			이 경우 둘 중 하나에 대해 dispose()를 호출하면 다른 항목도 사용할 수 없게 됩니다.
 			이 경우 둘 중 하나에 대해 dispose()를 호출하면 다른 항목도 사용할 수 없게 됩니다.
 		</p>
 		</p>
 
 

+ 0 - 4
docs/api/zh/constants/Textures.html

@@ -141,7 +141,6 @@
 		THREE.RGBAIntegerFormat
 		THREE.RGBAIntegerFormat
 		THREE.LuminanceFormat
 		THREE.LuminanceFormat
 		THREE.LuminanceAlphaFormat
 		THREE.LuminanceAlphaFormat
-		THREE.RGBEFormat
 		THREE.DepthFormat
 		THREE.DepthFormat
 		THREE.DepthStencilFormat
 		THREE.DepthStencilFormat
 	</code>
 	</code>
@@ -185,8 +184,6 @@
 		[page:constant LuminanceAlphaFormat] 将每个元素同时作为亮度分量和Alpha分量来读取。
 		[page:constant LuminanceAlphaFormat] 将每个元素同时作为亮度分量和Alpha分量来读取。
 		和上面[page:constant LuminanceFormat]的处理过程是一致的,除了Alpha分量具有除了*1.0*以外的值。<br /><br />
 		和上面[page:constant LuminanceFormat]的处理过程是一致的,除了Alpha分量具有除了*1.0*以外的值。<br /><br />
 
 
-		[page:constant RGBEFormat] 与 [page:constant RGBAFormat] 是相同的。<br /><br />
-
 		[page:constant DepthFormat]将每个元素作为单独的深度值来读取,将其转换为范围限制在[0,1]区间的浮点数。
 		[page:constant DepthFormat]将每个元素作为单独的深度值来读取,将其转换为范围限制在[0,1]区间的浮点数。
 		它是[page:DepthTexture DepthTexture]的默认值。<br /><br />
 		它是[page:DepthTexture DepthTexture]的默认值。<br /><br />
 
 
@@ -549,7 +546,6 @@
 		THREE.LinearEncoding
 		THREE.LinearEncoding
 		THREE.sRGBEncoding
 		THREE.sRGBEncoding
 		THREE.GammaEncoding
 		THREE.GammaEncoding
-		THREE.RGBEEncoding
 		THREE.BasicDepthPacking
 		THREE.BasicDepthPacking
 		THREE.RGBADepthPacking
 		THREE.RGBADepthPacking
 		</code>
 		</code>

+ 2 - 2
docs/api/zh/extras/PMREMGenerator.html

@@ -42,7 +42,7 @@
 		<p>
 		<p>
 			[page:Texture equirectangular] - The equirectangular texture.<br /><br />
 			[page:Texture equirectangular] - The equirectangular texture.<br /><br />
 
 
-			Generates a PMREM from an equirectangular texture, which can be either LDR (RGBFormat) or HDR (RGBEFormat).
+			Generates a PMREM from an equirectangular texture, which can be either LDR or HDR.
 			The ideal input image size is 1k (1024 x 512), as this matches best with the 256 x 256 cubemap output.
 			The ideal input image size is 1k (1024 x 512), as this matches best with the 256 x 256 cubemap output.
 		</p>
 		</p>
 
 
@@ -50,7 +50,7 @@
 		<p>
 		<p>
 			[page:CubeTexture cubemap] - The cubemap texture.<br /><br />
 			[page:CubeTexture cubemap] - The cubemap texture.<br /><br />
 
 
-			Generates a PMREM from an cubemap texture, which can be either LDR (RGBFormat) or HDR (RGBEFormat).
+			Generates a PMREM from an cubemap texture, which can be either LDR or HDR.
 			The ideal input cube size is 256 x 256, as this matches best with the 256 x 256 cubemap output.
 			The ideal input cube size is 256 x 256, as this matches best with the 256 x 256 cubemap output.
 		</p>
 		</p>
 
 

+ 1 - 1
editor/js/libs/ui.three.js

@@ -56,7 +56,7 @@ class UITexture extends UISpan {
 
 
 					// assuming RGBE/Radiance HDR iamge format
 					// assuming RGBE/Radiance HDR iamge format
 
 
-					const loader = new RGBELoader().setDataType( THREE.FloatType );
+					const loader = new RGBELoader();
 					loader.load( event.target.result, function ( hdrTexture ) {
 					loader.load( event.target.result, function ( hdrTexture ) {
 
 
 						hdrTexture.sourceFile = file.name;
 						hdrTexture.sourceFile = file.name;

+ 1 - 14
examples/jsm/loaders/HDRCubeTextureLoader.js

@@ -7,11 +7,7 @@ import {
 	LinearEncoding,
 	LinearEncoding,
 	LinearFilter,
 	LinearFilter,
 	Loader,
 	Loader,
-	NearestFilter,
-	RGBAFormat,
-	RGBEEncoding,
-	RGBFormat,
-	UnsignedByteType
+	RGBFormat
 } from '../../../build/three.module.js';
 } from '../../../build/three.module.js';
 import { RGBELoader } from '../loaders/RGBELoader.js';
 import { RGBELoader } from '../loaders/RGBELoader.js';
 
 
@@ -47,15 +43,6 @@ class HDRCubeTextureLoader extends Loader {
 
 
 		switch ( texture.type ) {
 		switch ( texture.type ) {
 
 
-			case UnsignedByteType:
-
-				texture.encoding = RGBEEncoding;
-				texture.format = RGBAFormat;
-				texture.minFilter = NearestFilter;
-				texture.magFilter = NearestFilter;
-				texture.generateMipmaps = false;
-				break;
-
 			case FloatType:
 			case FloatType:
 
 
 				texture.encoding = LinearEncoding;
 				texture.encoding = LinearEncoding;

+ 0 - 20
examples/jsm/loaders/RGBELoader.js

@@ -5,11 +5,7 @@ import {
 	HalfFloatType,
 	HalfFloatType,
 	LinearEncoding,
 	LinearEncoding,
 	LinearFilter,
 	LinearFilter,
-	NearestFilter,
-	RGBEEncoding,
-	RGBEFormat,
 	RGBFormat,
 	RGBFormat,
-	UnsignedByteType
 } from '../../../build/three.module.js';
 } from '../../../build/three.module.js';
 
 
 // https://github.com/mrdoob/three.js/issues/5552
 // https://github.com/mrdoob/three.js/issues/5552
@@ -378,13 +374,6 @@ class RGBELoader extends DataTextureLoader {
 
 
 				switch ( this.type ) {
 				switch ( this.type ) {
 
 
-					case UnsignedByteType:
-
-						data = image_rgba_data;
-						format = RGBEFormat; // handled as THREE.RGBAFormat in shaders
-						type = UnsignedByteType;
-						break;
-
 					case FloatType:
 					case FloatType:
 
 
 						numElements = image_rgba_data.length / 4;
 						numElements = image_rgba_data.length / 4;
@@ -455,15 +444,6 @@ class RGBELoader extends DataTextureLoader {
 
 
 			switch ( texture.type ) {
 			switch ( texture.type ) {
 
 
-				case UnsignedByteType:
-
-					texture.encoding = RGBEEncoding;
-					texture.minFilter = NearestFilter;
-					texture.magFilter = NearestFilter;
-					texture.generateMipmaps = false;
-					texture.flipY = true;
-					break;
-
 				case FloatType:
 				case FloatType:
 
 
 					texture.encoding = LinearEncoding;
 					texture.encoding = LinearEncoding;

+ 1 - 28
examples/jsm/nodes/utils/ColorSpaceNode.js

@@ -1,7 +1,6 @@
 import {
 import {
 	GammaEncoding,
 	GammaEncoding,
 	LinearEncoding,
 	LinearEncoding,
-	RGBEEncoding,
 	sRGBEncoding
 	sRGBEncoding
 } from '../../../../build/three.module.js';
 } from '../../../../build/three.module.js';
 
 
@@ -143,33 +142,12 @@ ColorSpaceNode.Nodes = ( function () {
 		}`
 		}`
 	);
 	);
 
 
-	const RGBEToLinear = new FunctionNode( /* glsl */`
-		vec4 RGBEToLinear( in vec4 value ) {
-
-			return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );
-
-		}`
-	);
-
-	const LinearToRGBE = new FunctionNode( /* glsl */`
-		vec4 LinearToRGBE( in vec4 value ) {
-
-			float maxComponent = max( max( value.r, value.g ), value.b );
-			float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );
-			return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );
-
-		}`
-	);
-
-
 	return {
 	return {
 		LinearToLinear: LinearToLinear,
 		LinearToLinear: LinearToLinear,
 		GammaToLinear: GammaToLinear,
 		GammaToLinear: GammaToLinear,
 		LinearToGamma: LinearToGamma,
 		LinearToGamma: LinearToGamma,
 		sRGBToLinear: sRGBToLinear,
 		sRGBToLinear: sRGBToLinear,
-		LinearTosRGB: LinearTosRGB,
-		RGBEToLinear: RGBEToLinear,
-		LinearToRGBE: LinearToRGBE
+		LinearTosRGB: LinearTosRGB
 	};
 	};
 
 
 } )();
 } )();
@@ -182,9 +160,6 @@ ColorSpaceNode.LINEAR_TO_GAMMA = 'LinearToGamma';
 ColorSpaceNode.SRGB_TO_LINEAR = 'sRGBToLinear';
 ColorSpaceNode.SRGB_TO_LINEAR = 'sRGBToLinear';
 ColorSpaceNode.LINEAR_TO_SRGB = 'LinearTosRGB';
 ColorSpaceNode.LINEAR_TO_SRGB = 'LinearTosRGB';
 
 
-ColorSpaceNode.RGBE_TO_LINEAR = 'RGBEToLinear';
-ColorSpaceNode.LINEAR_TO_RGBE = 'LinearToRGBE';
-
 ColorSpaceNode.getEncodingComponents = function ( encoding ) {
 ColorSpaceNode.getEncodingComponents = function ( encoding ) {
 
 
 	switch ( encoding ) {
 	switch ( encoding ) {
@@ -193,8 +168,6 @@ ColorSpaceNode.getEncodingComponents = function ( encoding ) {
 			return [ 'Linear' ];
 			return [ 'Linear' ];
 		case sRGBEncoding:
 		case sRGBEncoding:
 			return [ 'sRGB' ];
 			return [ 'sRGB' ];
-		case RGBEEncoding:
-			return [ 'RGBE' ];
 		case GammaEncoding:
 		case GammaEncoding:
 			return [ 'Gamma', new ExpressionNode( 'float( GAMMA_FACTOR )', 'f' ) ];
 			return [ 'Gamma', new ExpressionNode( 'float( GAMMA_FACTOR )', 'f' ) ];
 
 

+ 1 - 6
examples/jsm/renderers/nodes/display/ColorSpaceNode.js

@@ -5,7 +5,7 @@ import { ShaderNode,
 	lessThanEqual } from '../ShaderNode.js';
 	lessThanEqual } from '../ShaderNode.js';
 
 
 import { LinearEncoding,
 import { LinearEncoding,
-	sRGBEncoding/*, RGBEEncoding, GammaEncoding*/ } from '../../../../../build/three.module.js';
+	sRGBEncoding/*, GammaEncoding*/ } from '../../../../../build/three.module.js';
 
 
 export const LinearToLinear = new ShaderNode( ( inputs ) => {
 export const LinearToLinear = new ShaderNode( ( inputs ) => {
 
 
@@ -60,8 +60,6 @@ function getEncodingComponents( encoding ) {
 		case sRGBEncoding:
 		case sRGBEncoding:
 			return [ 'sRGB' ];
 			return [ 'sRGB' ];
 /*
 /*
-		case RGBEEncoding:
-			return [ 'RGBE' ];
 		case GammaEncoding:
 		case GammaEncoding:
 			return [ 'Gamma', new CodeNode( 'float( GAMMA_FACTOR )' ) ];
 			return [ 'Gamma', new CodeNode( 'float( GAMMA_FACTOR )' ) ];
 */
 */
@@ -79,9 +77,6 @@ class ColorSpaceNode extends TempNode {
 	/*
 	/*
 	static GAMMA_TO_LINEAR = 'GammaToLinear';
 	static GAMMA_TO_LINEAR = 'GammaToLinear';
 	static LINEAR_TO_GAMMA = 'LinearToGamma';
 	static LINEAR_TO_GAMMA = 'LinearToGamma';
-
-	static RGBE_TO_LINEAR = 'RGBEToLinear';
-	static LINEAR_TO_RGBE = 'LinearToRGBE';
 */
 */
 	constructor( method, node ) {
 	constructor( method, node ) {
 
 

+ 0 - 1
examples/misc_controls_arcball.html

@@ -143,7 +143,6 @@
 						render();
 						render();
 
 
 						new RGBELoader()
 						new RGBELoader()
-							.setDataType( THREE.UnsignedByteType )
 							.setPath( 'textures/equirectangular/' )
 							.setPath( 'textures/equirectangular/' )
 							.load( 'venice_sunset_1k.hdr', function ( hdrEquirect ) {
 							.load( 'venice_sunset_1k.hdr', function ( hdrEquirect ) {
 
 

+ 0 - 1
examples/webgl_loader_texture_hdr.html

@@ -48,7 +48,6 @@
 				camera = new THREE.OrthographicCamera( - aspect, aspect, 1, - 1, 0, 1 );
 				camera = new THREE.OrthographicCamera( - aspect, aspect, 1, - 1, 0, 1 );
 
 
 				new RGBELoader()
 				new RGBELoader()
-					.setDataType( THREE.UnsignedByteType ) // alt: FloatType, HalfFloatType
 					.load( 'textures/memorial.hdr', function ( texture, textureData ) {
 					.load( 'textures/memorial.hdr', function ( texture, textureData ) {
 
 
 						//console.log( textureData );
 						//console.log( textureData );

+ 0 - 1
examples/webgl_materials_envmaps_hdr.html

@@ -89,7 +89,6 @@
 				const hdrUrls = [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ];
 				const hdrUrls = [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ];
 				hdrCubeMap = new HDRCubeTextureLoader()
 				hdrCubeMap = new HDRCubeTextureLoader()
 					.setPath( './textures/cube/pisaHDR/' )
 					.setPath( './textures/cube/pisaHDR/' )
-					.setDataType( THREE.UnsignedByteType )
 					.load( hdrUrls, function () {
 					.load( hdrUrls, function () {
 
 
 						hdrCubeRenderTarget = pmremGenerator.fromCubemap( hdrCubeMap );
 						hdrCubeRenderTarget = pmremGenerator.fromCubemap( hdrCubeMap );

+ 0 - 1
examples/webgl_materials_envmaps_hdr_nodes.html

@@ -98,7 +98,6 @@
 				const hdrUrls = [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ];
 				const hdrUrls = [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ];
 				hdrCubeMap = new HDRCubeTextureLoader()
 				hdrCubeMap = new HDRCubeTextureLoader()
 					.setPath( './textures/cube/pisaHDR/' )
 					.setPath( './textures/cube/pisaHDR/' )
-					.setDataType( THREE.UnsignedByteType )
 					.load( hdrUrls, function () {
 					.load( hdrUrls, function () {
 
 
 						hdrCubeRenderTarget = pmremGenerator.fromCubemap( hdrCubeMap );
 						hdrCubeRenderTarget = pmremGenerator.fromCubemap( hdrCubeMap );

+ 0 - 1
examples/webgl_materials_envmaps_pmrem_nodes.html

@@ -106,7 +106,6 @@
 				const hdrUrls = [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ];
 				const hdrUrls = [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ];
 				hdrCubeMap = new HDRCubeTextureLoader()
 				hdrCubeMap = new HDRCubeTextureLoader()
 					.setPath( './textures/cube/pisaHDR/' )
 					.setPath( './textures/cube/pisaHDR/' )
-					.setDataType( THREE.UnsignedByteType )
 					.load( hdrUrls, function () {
 					.load( hdrUrls, function () {
 
 
 						hdrCubeRenderTarget = pmremGenerator.fromCubemap( hdrCubeMap );
 						hdrCubeRenderTarget = pmremGenerator.fromCubemap( hdrCubeMap );

+ 0 - 1
examples/webgl_materials_standard_nodes.html

@@ -135,7 +135,6 @@
 
 
 					const filename = environments[ name ].filename;
 					const filename = environments[ name ].filename;
 					new RGBELoader()
 					new RGBELoader()
-						.setDataType( THREE.UnsignedByteType )
 						.setPath( 'textures/equirectangular/' )
 						.setPath( 'textures/equirectangular/' )
 						.load( filename, function ( hdrEquirect ) {
 						.load( filename, function ( hdrEquirect ) {
 
 

+ 0 - 1
examples/webgl_pmrem_test.html

@@ -127,7 +127,6 @@
 
 
 				let radianceMap = null;
 				let radianceMap = null;
 				new RGBELoader()
 				new RGBELoader()
-					.setDataType( THREE.UnsignedByteType )
 					// .setDataType( THREE.FloatType )
 					// .setDataType( THREE.FloatType )
 					.setPath( 'textures/equirectangular/' )
 					.setPath( 'textures/equirectangular/' )
 					.load( 'spot1Lux.hdr', function ( texture ) {
 					.load( 'spot1Lux.hdr', function ( texture ) {

+ 0 - 1
examples/webxr_ar_lighting.html

@@ -83,7 +83,6 @@
 				//
 				//
 
 
 				new RGBELoader()
 				new RGBELoader()
-					.setDataType( THREE.UnsignedByteType )
 					.setPath( 'textures/equirectangular/' )
 					.setPath( 'textures/equirectangular/' )
 					.load( 'royal_esplanade_1k.hdr', function ( texture ) {
 					.load( 'royal_esplanade_1k.hdr', function ( texture ) {
 
 

+ 0 - 2
src/constants.js

@@ -91,7 +91,6 @@ export const RGBFormat = 1022;
 export const RGBAFormat = 1023;
 export const RGBAFormat = 1023;
 export const LuminanceFormat = 1024;
 export const LuminanceFormat = 1024;
 export const LuminanceAlphaFormat = 1025;
 export const LuminanceAlphaFormat = 1025;
-export const RGBEFormat = RGBAFormat;
 export const DepthFormat = 1026;
 export const DepthFormat = 1026;
 export const DepthStencilFormat = 1027;
 export const DepthStencilFormat = 1027;
 export const RedFormat = 1028;
 export const RedFormat = 1028;
@@ -158,7 +157,6 @@ export const TriangleFanDrawMode = 2;
 export const LinearEncoding = 3000;
 export const LinearEncoding = 3000;
 export const sRGBEncoding = 3001;
 export const sRGBEncoding = 3001;
 export const GammaEncoding = 3007;
 export const GammaEncoding = 3007;
-export const RGBEEncoding = 3002;
 export const BasicDepthPacking = 3200;
 export const BasicDepthPacking = 3200;
 export const RGBADepthPacking = 3201;
 export const RGBADepthPacking = 3201;
 export const TangentSpaceNormalMap = 0;
 export const TangentSpaceNormalMap = 0;

+ 2 - 8
src/extras/PMREMGenerator.js

@@ -7,7 +7,6 @@ import {
 	LinearFilter,
 	LinearFilter,
 	NoToneMapping,
 	NoToneMapping,
 	NoBlending,
 	NoBlending,
-	RGBEEncoding,
 	RGBAFormat,
 	RGBAFormat,
 	UnsignedByteType,
 	UnsignedByteType,
 	sRGBEncoding,
 	sRGBEncoding,
@@ -47,7 +46,6 @@ const MAX_SAMPLES = 20;
 const ENCODINGS = {
 const ENCODINGS = {
 	[ LinearEncoding ]: 0,
 	[ LinearEncoding ]: 0,
 	[ sRGBEncoding ]: 1,
 	[ sRGBEncoding ]: 1,
-	[ RGBEEncoding ]: 2,
 	[ GammaEncoding ]: 6
 	[ GammaEncoding ]: 6
 };
 };
 
 
@@ -132,7 +130,7 @@ class PMREMGenerator {
 
 
 	/**
 	/**
 	 * Generates a PMREM from an equirectangular texture, which can be either LDR
 	 * Generates a PMREM from an equirectangular texture, which can be either LDR
-	 * (RGBFormat) or HDR (RGBEFormat). The ideal input image size is 1k (1024 x 512),
+	 * or HDR. The ideal input image size is 1k (1024 x 512),
 	 * as this matches best with the 256 x 256 cubemap output.
 	 * as this matches best with the 256 x 256 cubemap output.
 	 */
 	 */
 	fromEquirectangular( equirectangular ) {
 	fromEquirectangular( equirectangular ) {
@@ -143,7 +141,7 @@ class PMREMGenerator {
 
 
 	/**
 	/**
 	 * Generates a PMREM from an cubemap texture, which can be either LDR
 	 * Generates a PMREM from an cubemap texture, which can be either LDR
-	 * (RGBFormat) or HDR (RGBEFormat). The ideal input cube size is 256 x 256,
+	 * or HDR. The ideal input cube size is 256 x 256,
 	 * as this matches best with the 256 x 256 cubemap output.
 	 * as this matches best with the 256 x 256 cubemap output.
 	 */
 	 */
 	fromCubemap( cubemap ) {
 	fromCubemap( cubemap ) {
@@ -910,10 +908,6 @@ function _getEncodings() {
 
 
 				return sRGBToLinear( value );
 				return sRGBToLinear( value );
 
 
-			} else if ( inputEncoding == 2 ) {
-
-				return RGBEToLinear( value );
-
 			} else {
 			} else {
 
 
 				return GammaToLinear( value, 2.2 );
 				return GammaToLinear( value, 2.2 );

+ 0 - 11
src/renderers/shaders/ShaderChunk/encodings_pars_fragment.glsl.js

@@ -21,15 +21,4 @@ vec4 LinearTosRGB( in vec4 value ) {
 	return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
 	return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
 }
 }
 
 
-vec4 RGBEToLinear( in vec4 value ) {
-	return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );
-}
-
-vec4 LinearToRGBE( in vec4 value ) {
-	float maxComponent = max( max( value.r, value.g ), value.b );
-	float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );
-	return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );
-	// return vec4( value.brg, ( 3.0 + 128.0 ) / 256.0 );
-}
-
 `;
 `;

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

@@ -1,7 +1,7 @@
 import { WebGLUniforms } from './WebGLUniforms.js';
 import { WebGLUniforms } from './WebGLUniforms.js';
 import { WebGLShader } from './WebGLShader.js';
 import { WebGLShader } from './WebGLShader.js';
 import { ShaderChunk } from '../shaders/ShaderChunk.js';
 import { ShaderChunk } from '../shaders/ShaderChunk.js';
-import { RGBFormat, NoToneMapping, AddOperation, MixOperation, MultiplyOperation, CubeRefractionMapping, CubeUVRefractionMapping, CubeUVReflectionMapping, CubeReflectionMapping, PCFSoftShadowMap, PCFShadowMap, VSMShadowMap, ACESFilmicToneMapping, CineonToneMapping, CustomToneMapping, ReinhardToneMapping, LinearToneMapping, GammaEncoding, RGBEEncoding, sRGBEncoding, LinearEncoding, GLSL3 } from '../../constants.js';
+import { RGBFormat, NoToneMapping, AddOperation, MixOperation, MultiplyOperation, CubeRefractionMapping, CubeUVRefractionMapping, CubeUVReflectionMapping, CubeReflectionMapping, PCFSoftShadowMap, PCFShadowMap, VSMShadowMap, ACESFilmicToneMapping, CineonToneMapping, CustomToneMapping, ReinhardToneMapping, LinearToneMapping, GammaEncoding, sRGBEncoding, LinearEncoding, GLSL3 } from '../../constants.js';
 
 
 let programIdCount = 0;
 let programIdCount = 0;
 
 
@@ -27,8 +27,6 @@ function getEncodingComponents( encoding ) {
 			return [ 'Linear', '( value )' ];
 			return [ 'Linear', '( value )' ];
 		case sRGBEncoding:
 		case sRGBEncoding:
 			return [ 'sRGB', '( value )' ];
 			return [ 'sRGB', '( value )' ];
-		case RGBEEncoding:
-			return [ 'RGBE', '( value )' ];
 		case GammaEncoding:
 		case GammaEncoding:
 			return [ 'Gamma', '( value, float( GAMMA_FACTOR ) )' ];
 			return [ 'Gamma', '( value, float( GAMMA_FACTOR ) )' ];
 		default:
 		default:

+ 0 - 2
test/unit/src/constants.tests.js

@@ -91,7 +91,6 @@ export default QUnit.module( 'Constants', () => {
 		assert.equal( Constants.RGBAFormat, 1023, 'RGBAFormat is equal to 1023' );
 		assert.equal( Constants.RGBAFormat, 1023, 'RGBAFormat is equal to 1023' );
 		assert.equal( Constants.LuminanceFormat, 1024, 'LuminanceFormat is equal to 1024' );
 		assert.equal( Constants.LuminanceFormat, 1024, 'LuminanceFormat is equal to 1024' );
 		assert.equal( Constants.LuminanceAlphaFormat, 1025, 'LuminanceAlphaFormat is equal to 1025' );
 		assert.equal( Constants.LuminanceAlphaFormat, 1025, 'LuminanceAlphaFormat is equal to 1025' );
-		assert.equal( Constants.RGBEFormat, Constants.RGBAFormat, 'RGBEFormat is equal to RGBAFormat' );
 		assert.equal( Constants.DepthFormat, 1026, 'DepthFormat is equal to 1026' );
 		assert.equal( Constants.DepthFormat, 1026, 'DepthFormat is equal to 1026' );
 		assert.equal( Constants.DepthStencilFormat, 1027, 'DepthStencilFormat is equal to 1027' );
 		assert.equal( Constants.DepthStencilFormat, 1027, 'DepthStencilFormat is equal to 1027' );
 		assert.equal( Constants.RGB_S3TC_DXT1_Format, 33776, 'RGB_S3TC_DXT1_Format is equal to 33776' );
 		assert.equal( Constants.RGB_S3TC_DXT1_Format, 33776, 'RGB_S3TC_DXT1_Format is equal to 33776' );
@@ -132,7 +131,6 @@ export default QUnit.module( 'Constants', () => {
 		assert.equal( Constants.LinearEncoding, 3000, 'LinearEncoding is equal to 3000' );
 		assert.equal( Constants.LinearEncoding, 3000, 'LinearEncoding is equal to 3000' );
 		assert.equal( Constants.sRGBEncoding, 3001, 'sRGBEncoding is equal to 3001' );
 		assert.equal( Constants.sRGBEncoding, 3001, 'sRGBEncoding is equal to 3001' );
 		assert.equal( Constants.GammaEncoding, 3007, 'GammaEncoding is equal to 3007' );
 		assert.equal( Constants.GammaEncoding, 3007, 'GammaEncoding is equal to 3007' );
-		assert.equal( Constants.RGBEEncoding, 3002, 'RGBEEncoding is equal to 3002' );
 		assert.equal( Constants.BasicDepthPacking, 3200, 'BasicDepthPacking is equal to 3200' );
 		assert.equal( Constants.BasicDepthPacking, 3200, 'BasicDepthPacking is equal to 3200' );
 		assert.equal( Constants.RGBADepthPacking, 3201, 'RGBADepthPacking is equal to 3201' );
 		assert.equal( Constants.RGBADepthPacking, 3201, 'RGBADepthPacking is equal to 3201' );