Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions examples/jsm/tsl/display/TRAANode.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ class TRAANode extends TempNode {
*/
this.camera = camera;

/**
* The velocity node used as the source for `velocityNode`, which requires
* the original projection matrix to be updated before the jitter is applied.
*
* @type {Node}
*/
this.velocityNodeSource = velocity;

/**
* The jitter index selects the current camera offset value.
*
Expand Down Expand Up @@ -232,7 +240,7 @@ class TRAANode extends TempNode {
this.camera.updateProjectionMatrix();
this._originalProjectionMatrix.copy( this.camera.projectionMatrix );

velocity.setProjectionMatrix( this._originalProjectionMatrix );
this.velocityNodeSource.setProjectionMatrix( this._originalProjectionMatrix );

//

Expand Down Expand Up @@ -268,7 +276,7 @@ class TRAANode extends TempNode {

this.camera.clearViewOffset();

velocity.setProjectionMatrix( null );
this.velocityNodeSource.setProjectionMatrix( null );

// update jitter index

Expand Down