Currently, I am working on writing a shader to create the motionBlur effect in WebGL using the three.js framework. I am trying to adjust this particular tutorial for implementing WebGL: and extracting the velocity value with GPUComputeRenderer.
However, I am facing an issue with the following line:
Position = uModelViewProjectionMat * gl_Vertex;
vPrevPosition = uPrevModelViewProjectionMat * gl_Vertex;
I am unsure of how to obtain or compute the PrevModelViewProjectionMat. I understand that it involves projectionMatrix * modelViewMatrix * vec4(position, 1.0), but I am uncertain about acquiring the previous projMatrix or previous modelViewMatrix. Can anyone provide assistance?