CVR Material Updater
Writes _CVR_Velocity and _CVR_Angular_Velocity shader properties as vectors on the attached renderer’s material. Shaders can read these to produce velocity-reactive effects. The component needs a Renderer on the same GameObject.
Properties
Section titled “Properties”Update Type
Section titled “Update Type”- Update Runs every frame; velocity is normalized against
Time.deltaTime. - FixedUpdate Runs on the physics tick; velocity is normalized against
Time.fixedDeltaTime.
Behaviour
Section titled “Behaviour”Each tick the component computes:
_CVR_Velocity=(lastPos - transform.position) / deltaTime— the inverted frame delta divided by the active timestep. Note this writes position delta in meters per second along the previous-to-current direction._CVR_Angular_Velocity=rotation.eulerAngles - lastRot— raw per-frame euler difference (not scaled bydeltaTime).
Both values are written to the renderer’s instanced material via Renderer.material.SetVector.
Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRMaterialUpdater.cs