Looking for information about SpeedTreeWind.cginc inputs. Haven’t found any information on the net.
Specifically these:
CBUFFER_START(SpeedTreeWind)
float4 _ST_WindVector;
float4 _ST_WindGlobal; // (_Time.y, ?, ?, ?)
float4 _ST_WindBranch; // (_Time.y, ?, ?, ?)
float4 _ST_WindBranchTwitch;
float4 _ST_WindBranchWhip;
float4 _ST_WindBranchAnchor;
float4 _ST_WindBranchAdherences;
float4 _ST_WindTurbulences;
float4 _ST_WindLeaf1Ripple; // (_Time.y, ?, ?, ?)
float4 _ST_WindLeaf1Tumble; // (_Time.z, ?, ?, ?)
float4 _ST_WindLeaf1Twitch; // (?, ?, _Time.y, ?)
float4 _ST_WindLeaf2Ripple; // (_Time.y, ?, ?, ?)
float4 _ST_WindLeaf2Tumble; // (_Time.z, ?, ?, ?)
float4 _ST_WindLeaf2Twitch; // (?, ?, _Time.y, ?)
float4 _ST_WindFrondRipple; // (_Time.y, ?, ?, ?)
float4 _ST_WindAnimation;
CBUFFER_END
Names give some idea, but what is actually packed inside those xyzw?
I do need to find every variable that sets time to modify it via my own variable instead.
EDIT:
Twitch has packed _Time as Z. This is what I was missing.
Replacing those commented values in shader code will stop time, if passed the Time.time with the accordance to the _Time (time / 20, time, time * 2, time *3).
Note that those values are approximate, and I don’t really know what values are used exactly. To my eye it’s pretty close, if not exact.
Leaves are alterations of 2 variants I think? But passing same time value for them seems to be nice solution. Although, if in doubt - pass additional offset for them.