Kaynağa Gözat

Add warning about missing velocityNode

Marco Fugaro 1 ay önce
ebeveyn
işleme
e37bd9767a
1 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. 7 0
      examples/jsm/tsl/display/GTAONode.js

+ 7 - 0
examples/jsm/tsl/display/GTAONode.js

@@ -393,6 +393,13 @@ class GTAONode extends TempNode {
 		// next frame.
 		// next frame.
 		if ( this.temporalAccumulation ) {
 		if ( this.temporalAccumulation ) {
 
 
+			if ( this._velocityNode === null && ! this._warnedNoVelocity ) {
+
+				console.warn( 'GTAONode: temporalAccumulation requires a velocityNode passed to the constructor.' );
+				this._warnedNoVelocity = true;
+
+			}
+
 			_quadMesh.material = this._accumulationMaterial;
 			_quadMesh.material = this._accumulationMaterial;
 			_quadMesh.name = 'GTAO.Accumulation';
 			_quadMesh.name = 'GTAO.Accumulation';
 			renderer.setRenderTarget( this._accumulationRenderTarget );
 			renderer.setRenderTarget( this._accumulationRenderTarget );

粤ICP备19079148号