casmortgage.blogg.se

How to keep elements in firealpaca animation
How to keep elements in firealpaca animation








how to keep elements in firealpaca animation how to keep elements in firealpaca animation

Shader "Custom/SinShader"įloat dist = distance(v.vertex.xyz, float3(0, 0, 0)) Its principle is to use sine function, Modify the height of the plane at different distances over time, To achieve the effect of sinusoidal fluctuation. Stay Unity Create a new Plane, Attach a map to it, Then we'll write Shader. 1: float4 It's a built-in vector (x, y, z, w) float4 a Visit individual members a.x, a.y, a.z, a.w Ģ: fixed4 It's a built-in vector (r, g, b, a) fixed4 c color.r, color.g, color.b, color.a ģ: float3 It's a built-in vector (x, y, z) Ĥ: fixed3 It's a built-in vector (r, g, b) Ħ: _Time: Time elapsed since the scene was loaded t,4 The two components are (t/20, t, t 2, t3) ħ: _SinTime: t It's the sine of time ,4 The two components are (t/8, t/4, t/2, t) Ĩ: _CosTime: t Is the cosine of time ,4 The two components are (t/8, t/4, t/2, t) ĩ: unity_DeltaTime: dt It's a time increment ,4 The value of a component (dt, 1/dt, smoothDt, 1/smoothDt), Smoothing time, Prevent the time interval from fluctuating too much Vertex animation










How to keep elements in firealpaca animation