Shader Graph Camera Movement Speed

How could you implement camera movement speed in shader graph URP?


I don’t want the camera position, I want the speed, so using Position node set to view-space doesn’t help.


My goal is that I want the my vertex displacement shader to get faster when the camera moves on.
Any idea could help, thanks.

If you need a single global value then Shader.SetGlobalFloat can help here.

194634-screenshot-2022-04-06-212843.jpg

void Update ()
{
    Shader.SetGlobalFloat( "_my_value" , CalculateCameraMovementSpeed() );
}