File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,11 +237,20 @@ class TRAANode extends TempNode {
237237
238238 /**
239239 * Sync the post processing stack with the TRAA node.
240+ *
240241 * @private
241242 * @type {boolean }
242243 */
243244 this . _needsPostProcessingSync = false ;
244245
246+ /**
247+ * The node used to render the scene's velocity.
248+ *
249+ * @private
250+ * @type {?VelocityNode }
251+ */
252+ this . _velocityNode = null ;
253+
245254 }
246255
247256 /**
@@ -284,7 +293,7 @@ class TRAANode extends TempNode {
284293 this . camera . updateProjectionMatrix ( ) ;
285294 this . _originalProjectionMatrix . copy ( this . camera . projectionMatrix ) ;
286295
287- velocity . setProjectionMatrix ( this . _originalProjectionMatrix ) ;
296+ this . _velocityNode . setProjectionMatrix ( this . _originalProjectionMatrix ) ;
288297
289298 //
290299
@@ -320,7 +329,7 @@ class TRAANode extends TempNode {
320329
321330 this . camera . clearViewOffset ( ) ;
322331
323- velocity . setProjectionMatrix ( null ) ;
332+ this . _velocityNode . setProjectionMatrix ( null ) ;
324333
325334 // update jitter index
326335
@@ -454,6 +463,16 @@ class TRAANode extends TempNode {
454463
455464 }
456465
466+ if ( builder . context . velocity !== undefined ) {
467+
468+ this . _velocityNode = builder . context . velocity ;
469+
470+ } else {
471+
472+ this . _velocityNode = velocity ;
473+
474+ }
475+
457476 const currentDepthStruct = struct ( {
458477
459478 closestDepth : 'float' ,
You can’t perform that action at this time.
0 commit comments