当前位置:   article > 正文

Unity Shader _Time

unity shader _time

_Time是个4维向量,跟Unity3D中的deltaTime(这是个一维的,数值)不同。

float4 _Time : Time (t/20, t, t*2, t*3), use to animate things inside the shaders。

fixed x= Speed * _Time;  等价于 fixed x= Speed * _Time.x;

Timefloat4Time (t/20, t, t*2, t*3), use to animate things inside the shaders.
_SinTimefloat4Sine of time: (t/8, t/4, t/2, t).
_CosTimefloat4Cosine of time: (t/8, t/4, t/2, t).
unity_DeltaTimefloat4Delta time: (dt, 1/dt, smoothDt, 1/smoothDt).
_ProjectionParamsfloat4x is 1.0 (or –1.0 if currently rendering with a flipped projection matrix), y is the camera’s near plane, z is the camera’s far plane and w is 1/FarPlane.
_ScreenParamsfloat4x is the current render target width in pixels, y is the current render target height in pixels, z is 1.0 + 1.0/width and w is 1.0 + 1.0/height.

 

 

参考: https://docs.unity3d.com/462/Documentation/Manual/SL-BuiltinValues.html

转载于:https://www.cnblogs.com/beeasy/p/6057119.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/108286?site
推荐阅读
相关标签
  

闽ICP备14008679号