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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Terrain texture filtering problem

Discussion in 'iOS and tvOS' started by elektro, May 4, 2012.

  1. elektro

    elektro

    Joined:
    Sep 3, 2010
    Posts:
    12
    When I create a simple terrain and try it on my iPad there are some serious issues with the ground texture (it looks like the bilinear filtering is not applied). The effect causes heavy flickering and is very annoying.
    Is this a known issue with Unity 3.5.1 or is it supposed to look like this on mobile hardware?
    It looks fine in the editor (see comparison shots below).

    - just a simple terrain (from a height map) with a ground texture (compressed,best)
    - bilinear filtering for the texture files is "on"
    - did not change any other options
    - target: iOS 5.1, ARM7

     
  2. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    Not to me. Looks more like you don't have enough precision in your texture coordinates to me.
     
  3. elektro

    elektro

    Joined:
    Sep 3, 2010
    Posts:
    12
    Thanks for your quick reply.

    There are no overlapping textures in the pictured example. It is just one texture evenly applied to the terrain when you assign the first splat texture.

    The effect appears on the whole terrain and on every splat texture used.
     
  4. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    That doesn't address what I said. Was it intended to? What precision are you using for the coordinates?
     
  5. elektro

    elektro

    Joined:
    Sep 3, 2010
    Posts:
    12
    There might be a misunderstanding on my side (english is not my mother tongue).
    Do you mean the RenderTexture depth? This is a Unity Pro only option (I use indie - should have written this in the first post).

    To track down the problem I created a simple terrain scene (all standard values) and the problem is still there. The effect does not appear on non terrain objects using the same texture.
     
  6. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    That's interesting, because you type better English than most, around here! :D

    No. OpenGL ES 2.0's shading language offers three precision levels for floats/ints. I looked at the compiled code for "Hidden/TerrainEngine/Splatmap/Lightmap-FirstPass", and don't think I saw anything less than high precision, where it mattered, but the auto-converted GLSL is unreadable garbage, and I'm not willing to rewrite it to check this. You should probably file a bug.
     
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    How's it look without compressed textures, out of curiosity?
     
  8. elektro

    elektro

    Joined:
    Sep 3, 2010
    Posts:
    12
    @Jessy
    Thanks for your effort. I will file a bug after some more testing.
    It would be interesting to know if anyone besides me encountered a similar problem (Terrain/iOS).

    @hippocoder
    It still looks the same (truecolor)
     
    Last edited: May 6, 2012
  9. Artial

    Artial

    Joined:
    Dec 27, 2008
    Posts:
    22
    I have exactly the same rendering issue on iOS.
     
  10. Basurman

    Basurman

    Joined:
    Sep 1, 2010
    Posts:
    10
    I also have exactly the same problem on Unity 4.0.1. Terrain texture is rendered with flickering on different mobile devices (both iOS and Android). In editor at the same time everything is great. Any ideas why this issue occurs?