码迷,mamicode.com
首页 > 编程语言 > 详细

Unity Shader _Time

时间:2016-11-12 19:03:01      阅读:357      评论:0      收藏:0      [点我收藏+]

标签:base   unity3d   time   targe   doc   知识   ati   and   href   

_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;

Time float4 Time (t/20, t, t*2, t*3), use to animate things inside the shaders.
_SinTime float4 Sine of time: (t/8, t/4, t/2, t).
_CosTime float4 Cosine of time: (t/8, t/4, t/2, t).
unity_DeltaTime float4 Delta time: (dt, 1/dt, smoothDt, 1/smoothDt).
_ProjectionParams float4 x 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.
_ScreenParams float4 x 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

Unity Shader _Time

标签:base   unity3d   time   targe   doc   知识   ati   and   href   

原文地址:http://www.cnblogs.com/beeasy/p/6057119.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!