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

Add warning about missing velocityNode

Marco Fugaro пре 1 месец
родитељ
комит
e37bd9767a
1 измењених фајлова са 7 додато и 0 уклоњено
  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.
 		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.name = 'GTAO.Accumulation';
 			renderer.setRenderTarget( this._accumulationRenderTarget );

粤ICP备19079148号