Просмотр исходного кода

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 10 месяцев назад
Родитель
Сommit
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号