Преглед изворни кода

Fix a small bug in RenderTarget.js. I corrected the usage of depthTexture assignment in the RenderTarget constructor. Now using the setter function again like in r174 and before to ensure renderTarget is properly linked to the texture (#30921)

Co-authored-by: Attila Schroeder <attila-schroeder.79@gmail.com>
Spiri0 пре 1 година
родитељ
комит
8a812ee228
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/core/RenderTarget.js

+ 2 - 1
src/core/RenderTarget.js

@@ -177,7 +177,8 @@ class RenderTarget extends EventDispatcher {
 		 */
 		this.resolveStencilBuffer = options.resolveStencilBuffer;
 
-		this._depthTexture = options.depthTexture;
+		this._depthTexture = null;
+		this.depthTexture = options.depthTexture;
 
 		/**
 		 * The number of MSAA samples.

粤ICP备19079148号