Skip to content

Commit

Permalink
RGBELoader: Simplify texture configuration. (mrdoob#24032)
Browse files Browse the repository at this point in the history
* fix mrdoob#24017 : clean RGBELoader code

* [misc]: RGBELoader code clean

Co-authored-by: ouyanghaozhu <[email protected]>
  • Loading branch information
2 people authored and abernier committed Sep 16, 2022
1 parent 528b4b9 commit 5ea37fd
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions examples/jsm/loaders/RGBELoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class RGBELoader extends DataTextureLoader {

if ( RGBE_RETURN_FAILURE !== image_rgba_data ) {

let data, format, type;
let data, type;
let numElements;

switch ( this.type ) {
Expand Down Expand Up @@ -418,7 +418,6 @@ class RGBELoader extends DataTextureLoader {
header: rgbe_header_info.string,
gamma: rgbe_header_info.gamma,
exposure: rgbe_header_info.exposure,
format: format,
type: type
};

Expand All @@ -444,21 +443,14 @@ class RGBELoader extends DataTextureLoader {
switch ( texture.type ) {

case FloatType:

texture.encoding = LinearEncoding;
texture.minFilter = LinearFilter;
texture.magFilter = LinearFilter;
texture.generateMipmaps = false;
texture.flipY = true;
break;

case HalfFloatType:

texture.encoding = LinearEncoding;
texture.minFilter = LinearFilter;
texture.magFilter = LinearFilter;
texture.generateMipmaps = false;
texture.flipY = true;

break;

}
Expand Down

0 comments on commit 5ea37fd

Please sign in to comment.