Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Depreciated] Underwater Shaders v1.5

Discussion in 'Assets and Asset Store' started by Sermolux, Jun 10, 2016.

  1. Berserker44

    Berserker44

    Joined:
    Sep 1, 2013
    Posts:
    29
    I am using your shader in my project, but I am having some major issue with stretching on flat and vertical models. For some reason when the shader get to a certain threshold, The caustic will stretch very noticeably. You can see it in you preview images too. Currently I can not use the shader because of the stretching, which is a huge disappointment. Is there any way around this?

     

    Attached Files:

  2. Titanmods

    Titanmods

    Joined:
    Sep 12, 2018
    Posts:
    7
  3. Sermolux

    Sermolux

    Joined:
    Jun 2, 2016
    Posts:
    28
    Hi, Thanks for the purchase and I apologize for the late reply. I'm not too sure how the fog could change to fit with the style of the toon pack, but you could certainly modify or provide a new caustic texture that would fit with the style.
     
  4. Sermolux

    Sermolux

    Joined:
    Jun 2, 2016
    Posts:
    28
    This is very cool. I'm always happy to see how my shaders are used in other projects. Fun game too! Thanks for sharing!
     
  5. Sermolux

    Sermolux

    Joined:
    Jun 2, 2016
    Posts:
    28
    Thanks for the interest. Currently the shaders don't support LWRP. I'm looking in to writing a new set for when it comes out of preview.
     
  6. Sermolux

    Sermolux

    Joined:
    Jun 2, 2016
    Posts:
    28
    I'm sorry to hear you're having issues. The caustics are projected down the vertical axis of the world. Mesh faces that are perpendicular, or nearly perpendicular to the vertical axis will exhibit the stretching you've highlighted in the screenshot. I will investigate what options there are to minimize the stretching.
     
  7. Sermolux

    Sermolux

    Joined:
    Jun 2, 2016
    Posts:
    28
    I watched his video and looked at the documentation. I believe the fog effect would work just fine. The caustics are set up to display in editor mode, but weather or not they would work properly is dependent on how the sprite maker plays back and captures animation. I can't guarantee that the caustics would be captured accurately.
     
  8. Sermolux

    Sermolux

    Joined:
    Jun 2, 2016
    Posts:
    28
    Hi, thanks for the feedback and screenshots. I'd like to get some additional information from you so I can reproduce and investigate the issue. What version of unity are you using? Are the plants part of the terrain (trees or details), or are they separate objects?
     
  9. GS796

    GS796

    Joined:
    Dec 16, 2016
    Posts:
    24
    @Sermolux
    Hi,
    I have run into the same issue that another user reported- on mobile the materials look fine for a while. But after a couple of minutes playing on a common Android device (galaxy tab) the caustics scrolling slows down and starts updating only every few frames. It is really bad and gives an impression the game is running at a slow frame rate- even though the game is running fine. I am using the "manager" script to update all the materials.

    This thread seems to have the answer- and I am trying to implement it. But any help would be appreciated.
    https://answers.unity.com/questions/479412/mobile-shader-stepping-and-pixellation-with-time-i.html

    quote:

    Answer by LyveIG · Jul 08, 2016 at 02:21 PM

    The problem is related to the internal precision of mobile GPUs. Many mobile chips don't offer full 32 bits floating point values but only 16 bits or even less.

    A solution to increase precision is to add a vertex modifier, do the calculation there, then clamp to the 0-1 range and after that, add the result to the existing UV. Then in the fragment shader, read the modified UVs. This also saves you some clock cycles in the fragment shader.

    The reason to do it in the vertex shader is that the precision is higher in the vertex shader than in the fragment shader.


    Thanks,
     
  10. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Just purchased Underwater Shaders and have read the instructions and have one question.

    How the heck do you get it to work? I mean, I don't get it, what did I just buy? I thought I was buying underwater to add to my existing water surface?

    I have a multi tile terrain setup with thousands of underwater objects spawned procedurally and so wont be adding all of those materials to get the underwater to work...

    All I really want to do is add underwater to my existing water and have no clue how to get it working.

    Sorry for being blunt but its been my experience with this asset.

    A refund or help get it working would be appreciated, thanks.

    Also, I am using CTS so cant add a water shader to my terrain.
     
  11. Sermolux

    Sermolux

    Joined:
    Jun 2, 2016
    Posts:
    28
    Hi Hawk0077,

    I'm sorry to hear you're having trouble with the shaders. These are surface shaders, which means that they need to be applied to each object that you want to appear to be underwater. As the Complete Terrain Shader asset also uses surface shaders, you would have to use either their shaders or Underwater Shaders. If Underwater Shaders won't work for your needs, I will be happy to refund your purchase. Please email me directly with the invoice number for your purchase at owen@owenawilson.com.

    - Owen