File tree 1 file changed +2
-19
lines changed
1 file changed +2
-19
lines changed Original file line number Diff line number Diff line change 11
11
* by this class.
12
12
*/
13
13
14
- THREE . PMREMGenerator = function ( sourceTexture ) {
15
- if ( sourceTexture instanceof THREE . CubeTexture ) {
14
+ THREE . PMREMGenerator = function ( sourceTexture ) {
16
15
17
- if ( sourceTexture . images [ 0 ] === undefined )
18
- console . error ( "sourceTexture Not Initialized" ) ;
19
- if ( sourceTexture . images [ 0 ] instanceof THREE . DataTexture ) {
20
- this . resolution = sourceTexture . images [ 0 ] . image . width ;
21
- }
22
- else {
23
- this . resolution = sourceTexture . images [ 0 ] . width ;
24
- }
25
-
26
- }
27
- else if ( sourceTexture instanceof THREE . WebGLRenderTargetCube ) {
28
- if ( sourceTexture === undefined ) console . error ( "Render Target Not Initialized" ) ;
29
- this . resolution = sourceTexture . width ;
30
- }
31
- else {
32
- console . error ( "Wrong Input to PMREMGenerator" ) ;
33
- }
34
16
this . sourceTexture = sourceTexture ;
17
+ this . resolution = 256 ; // NODE: 256 is currently hard coded in the glsl code for performance reasons
35
18
36
19
var monotonicEncoding = ( sourceTexture . encoding === THREE . LinearEncoding ) ||
37
20
( sourceTexture . encoding === THREE . GammaEncoding ) || ( sourceTexture . encoding === THREE . sRGBEncoding ) ;
You can’t perform that action at this time.
0 commit comments