Search Unity

_Time shader code not working on Mali 400

Discussion in 'Shaders' started by van_ustwo, Feb 9, 2015.

  1. van_ustwo

    van_ustwo

    Joined:
    Jul 10, 2012
    Posts:
    82
    I'm using _Time in my shader to animated UV.
    Running the code for more than 5minutes, the value in _Time.x will remain constant.
    This happens on any devices with Mali 400. i.e Samsung S3 and Tab 8

    i'm using Unity 4.6.2f1

    float4texA = tex2D(_MainTex, i.uv0 + float2(0, _SpeedA*_Time.x) );
     
  2. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    Might be a precision issue. You could use a script to manually increase a local time value that wraps back to 0 when it reaches 1.0 / _SpeedA.