#I SUSPECT without looking admittedly so
1 messages · Page 1 of 1 (latest)
It turns out in ShaderVariables.hlsl, there's a per-object cbuffer block for the Unity Velocity Pass that contains the previous model matrices
and in UnityInput.hlsl there's a UnityPerDraw Cbuffer block...
and there are also references to UNITY_PREV_MATRIX_M in SpaceTransforms.hlsl
and many, many references to UNITY_PREV_MATRIX_M
so I think that this matrix is probably set at some point just before rendering the depth/motion vector passes
but its value is cleared afterwards and I just can't seem to get a hold of it.
It's frustrating to be so close yet so far
there's zero documentation anywhere covering these matrices and functions
zero useful search results anywhere
nope, I'm done.
Wow. And IDK then when/what those previous matrices are applicable to. Is it anything/everything when motion vectors are used? Or what? You mentioned before that you only had it working for skinned mesh renderers exclusively.
Yeah, better docs needed. Sorry I can't be of more help. I had hopes that backtracking the motion vector would be enough for your use case, but having the previous positions and transforms makes much more sense.