diff options
| author | yum <yum.food.vr@gmail.com> | 2025-10-28 16:07:36 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-10-28 17:19:38 -0700 |
| commit | fd370eab7e4959895763514526efc878e53d4886 (patch) | |
| tree | 5ecb9f4d1710f737f96f68a6ab7d7b80e5d6c4d0 /globals.cginc | |
| parent | 0af84f011446496dd85a1cc6b139121ac99b139b (diff) | |
add logical time feature
the idea is that a remote piece of software s.a. TiXL sends in its
logical time every once in a while. udon recovers it, interpolates
and smooths it, and feeds it to the shader. Anything which is periodic
on units of 1.0 "seconds" retains its periodicity under changes to the
rate of passage of time.
Diffstat (limited to 'globals.cginc')
| -rw-r--r-- | globals.cginc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/globals.cginc b/globals.cginc index fd865dc..ed76917 100644 --- a/globals.cginc +++ b/globals.cginc @@ -5,6 +5,8 @@ SamplerState point_repeat_s; SamplerState linear_repeat_s; +SamplerState aniso4_trilinear_repeat_s; +SamplerState aniso8_trilinear_repeat_s; SamplerState aniso16_trilinear_repeat_s; SamplerState bilinear_repeat_s; SamplerState linear_clamp_s; @@ -100,4 +102,16 @@ float4 _Center_Offset_Heightmap_ST; float _Center_Offset_Factor; #endif // _CENTER_OFFSET +#if defined(_LOGICAL_TIME) +float _Logical_Time; +#endif // _LOGICAL_TIME + +float getTime() { +#if defined(_LOGICAL_TIME) + return _Logical_Time; +#else + return _Time[0]; +#endif // _LOGICAL_TIME +} + #endif // __GLOBALS_INC |
