Previous position/velocity in material (no bp)

I’m hoping someone knows a way to either store and retrieve next frame a value in a custom node or if there’s any HLSL code to get the last position. I want to avoid BP setting parameter as I could have hundreds at any time needing access to it every frame. Velocity would work too as it’s the end goal.

Thanks

there is a previous frame switch in the material editor.

Does the previews frame node output last frame world position? All they information of the node says it only can be used for WPO animation

No it doesn’t, but you can sample the velocity buffer in some materials, which combined with the current world position can be used to find the previous world position.