From fd370eab7e4959895763514526efc878e53d4886 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 28 Oct 2025 16:07:36 -0700 Subject: 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. --- globals.cginc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'globals.cginc') 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 -- cgit v1.2.3