Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Offset and Tiling Problem in Parallax

Discussion in 'iOS and tvOS' started by ramp, Oct 16, 2014.

  1. ramp

    ramp

    Joined:
    Nov 6, 2012
    Posts:
    14
    Hi everyone ,
    i am making 2d parallax using Shader offset property of Texture and my code is given below.

    renderer.material.mainTextureOffset = Vector2 (offset, 0);

    it is working fine in unity Game layout after playing,and i am using texture in curve shape.but problem is when i run the build in iPhone the curvy shape of texture is showing in the square shape.I have changed the shader properties to a large extent to resolve the issue but still do not know ,why is it happening so.

    i have attached the screen shot of both Scene.

     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    The offset should remain in the 0.0 - 1.0 range, since the GPU in iOS devices doesn't like it when UVs are too far from the origin.

    --Eric
     
  3. ramp

    ramp

    Joined:
    Nov 6, 2012
    Posts:
    14
    Thanks for the answer,But can you please elaborate this...