Skip to content

Commit 09e6b8f

Browse files
authored
WebGLRenderer: Clean up. (#23717)
1 parent 3e5d141 commit 09e6b8f

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/renderers/WebGLCubeRenderTarget.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BackSide, LinearFilter, LinearMipmapLinearFilter, NoBlending, RGBAFormat } from '../constants.js';
1+
import { BackSide, LinearFilter, LinearMipmapLinearFilter, NoBlending } from '../constants.js';
22
import { Mesh } from '../objects/Mesh.js';
33
import { BoxGeometry } from '../geometries/BoxGeometry.js';
44
import { ShaderMaterial } from '../materials/ShaderMaterial.js';
@@ -36,7 +36,6 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
3636
fromEquirectangularTexture( renderer, texture ) {
3737

3838
this.texture.type = texture.type;
39-
this.texture.format = RGBAFormat; // see #18859
4039
this.texture.encoding = texture.encoding;
4140

4241
this.texture.generateMipmaps = texture.generateMipmaps;

src/renderers/webgl/WebGLMorphtargets.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FloatType, RGBAFormat } from '../../constants.js';
1+
import { FloatType } from '../../constants.js';
22
import { DataArrayTexture } from '../../textures/DataArrayTexture.js';
33
import { Vector4 } from '../../math/Vector4.js';
44
import { Vector2 } from '../../math/Vector2.js';
@@ -89,7 +89,6 @@ function WebGLMorphtargets( gl, capabilities, textures ) {
8989
const buffer = new Float32Array( width * height * 4 * morphTargetsCount );
9090

9191
const texture = new DataArrayTexture( buffer, width, height, morphTargetsCount );
92-
texture.format = RGBAFormat; // using RGBA since RGB might be emulated (and is thus slower)
9392
texture.type = FloatType;
9493
texture.needsUpdate = true;
9594

src/renderers/webgl/WebGLShadowMap.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FrontSide, BackSide, DoubleSide, RGBAFormat, NearestFilter, LinearFilter, PCFShadowMap, VSMShadowMap, RGBADepthPacking, NoBlending } from '../../constants.js';
1+
import { FrontSide, BackSide, DoubleSide, RGBAFormat, NearestFilter, PCFShadowMap, VSMShadowMap, RGBADepthPacking, NoBlending } from '../../constants.js';
22
import { WebGLRenderTarget } from '../WebGLRenderTarget.js';
33
import { MeshDepthMaterial } from '../../materials/MeshDepthMaterial.js';
44
import { MeshDistanceMaterial } from '../../materials/MeshDistanceMaterial.js';
@@ -133,12 +133,10 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
133133

134134
if ( shadow.map === null && ! shadow.isPointLightShadow && this.type === VSMShadowMap ) {
135135

136-
const pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };
137-
138-
shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
136+
shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y );
139137
shadow.map.texture.name = light.name + '.shadowMap';
140138

141-
shadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
139+
shadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y );
142140

143141
shadow.camera.updateProjectionMatrix();
144142

0 commit comments

Comments
 (0)