Search Unity

Terrain shader performance on mobile?

Discussion in 'Shaders' started by forgodsaken, Aug 30, 2014.

  1. forgodsaken

    forgodsaken

    Joined:
    May 15, 2013
    Posts:
    5
    Hey guys, I was wondering about the performance of a splatmap shader on mobile device?

    When I use a regular mobile diffuse shader I get 60fps but if I use a splat map shader (terrain shader that comes with unity) the fps drops to 32 frames on a Samsung Tab 10.1 v1. Which is a huge drop, is that normal? The splat shader has 3 256x256 seamless textures plus the control map 256x256. No lights on the scene, lit using LM.

    The terrain is a 2k optimized mesh, not using Unity Terrain tool.

    Is there a better lightweight shader out there? Any input or advice to avoid that huge drop in FPS other than not using a splat shader?

    Could use some help with this one, thanks!
     
  2. forgodsaken

    forgodsaken

    Joined:
    May 15, 2013
    Posts:
    5
    Well it seems the terrain shader mask blending is quite expensive for mobile devices like the Samsung GT-P7510. It takes 15ms+ to render the terrain shader with 4 textures; so I'm losing 30 fps; and for what I saw it's tied to the amount of textures that are assigned to the shader. The first texture is "free" but as soon as you start adding textures and it starts blending them, FPS starts to drop almost 10 FPS per extra texture.... I have 4, so I lose 30 FPS because of the 3 extra textures.

    I tested the same terrain but I split the mesh into 4 parts and assigned 4 materials (Diffuse Mobile), assigned each one a 2k texture instead of five 256 textures the FPS dropped a measly 5 to 6 fps on the Samsung GT-P7510...

    Will test this on other devices to see if it's a problem with the hardware of the Samsung GT-P7510 that can't handle the masking properly. Anyone knows if there is a lightweight splat shader out there or by definition these type of shaders are too expensive???
     
    Last edited: Sep 3, 2014
    CDUnityDev likes this.
  3. DEBBAJfarouk

    DEBBAJfarouk

    Joined:
    Jun 21, 2021
    Posts:
    6
    I am experiencing the same problem ... Even though this is an old thread I thought I could get some help.