@@ -198,11 +198,11 @@ export class MeshUVSpaceRenderer {
198
198
// Create the diffuse render target texture if it doesn't exist
199
199
if ( ! this . texture && ! this . _options . uvEdgeBlending && ! this . _decalTexture ) {
200
200
this . _updateRTT ( ) ;
201
- } else if ( this . texture && ! this . _userCreatedTextureSetup && ! this . _options . uvEdgeBlending && ! this . _decalTexture ) {
201
+ } else if ( this . texture && ! this . _userCreatedTextureSetup && ! this . _options . uvEdgeBlending && ! this . _decalTexture ) {
202
202
this . _updateRTT ( ) ;
203
- } else if ( this . texture && ! this . _userCreatedTextureSetup && this . _options . uvEdgeBlending && ! this . _decalTexture ) {
203
+ } else if ( this . texture && ! this . _userCreatedTextureSetup && this . _options . uvEdgeBlending && ! this . _decalTexture ) {
204
204
this . _createDecalDiffuseRTT ( ) ;
205
- } else if ( ! this . texture && this . _options . uvEdgeBlending && ! this . _decalTexture ) {
205
+ } else if ( ! this . texture && this . _options . uvEdgeBlending && ! this . _decalTexture ) {
206
206
this . _createDecalDiffuseRTT ( ) ;
207
207
}
208
208
@@ -214,7 +214,6 @@ export class MeshUVSpaceRenderer {
214
214
const projectionMatrix = this . _createProjectionMatrix ( position , normal , size , angle ) ;
215
215
shader . setMatrix ( "projMatrix" , projectionMatrix ) ;
216
216
217
-
218
217
if ( ! this . _options . uvEdgeBlending ) {
219
218
if ( this . texture instanceof RenderTargetTexture ) {
220
219
this . texture . render ( ) ;
@@ -233,7 +232,7 @@ export class MeshUVSpaceRenderer {
233
232
* Creates a texture RTT if one doesn't exist,
234
233
*/
235
234
_updateRTT ( ) {
236
- if ( ! this . texture ) {
235
+ if ( ! this . texture ) {
237
236
this . texture = this . _createRenderTargetTexture ( this . _options . width , this . _options . height ) ;
238
237
} else {
239
238
this . _userCreatedTextureSetup = true ;
@@ -356,12 +355,8 @@ export class MeshUVSpaceRenderer {
356
355
texture . setMaterialForRendering ( this . _mesh , MeshUVSpaceRenderer . _GetShader ( this . _scene ) ) ;
357
356
358
357
this . _decalTexture = texture ;
359
- if ( ! this . texture ) {
360
- this . texture = new RenderTargetTexture (
361
- this . _mesh . name + "_finalUVSpaceTexture" ,
362
- { width : this . _options . width , height : this . _options . height } ,
363
- this . _scene ,
364
- ) ;
358
+ if ( ! this . texture ) {
359
+ this . texture = new RenderTargetTexture ( this . _mesh . name + "_finalUVSpaceTexture" , { width : this . _options . width , height : this . _options . height } , this . _scene ) ;
365
360
this . _textureCreatedInternally = true ;
366
361
}
367
362
}
0 commit comments