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

Stylized Water Shader - Desktop/Mobile/VR [Built-in RP]

Discussion in 'Assets and Asset Store' started by StaggartCreations, Sep 8, 2016.

  1. Psychotoke

    Psychotoke

    Joined:
    Oct 11, 2022
    Posts:
    2
    I'm getting an error. Material doesn't have a texture property "_MainTex". All I did was apply the shader to a plane. It looks fine in the scene view, but keeps blinking in and out of existence. I get the error at runtime.
     
  2. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,102
    There has to be a script attached to the plane object that calls something like Material.mainTexture or Material.SetTexture("_MainTex", Texture2D).

    The water shader doesn't contain a parameter called "_MainTex", hence the error is thrown.
     
  3. takashi-kunn

    takashi-kunn

    Joined:
    Jul 10, 2020
    Posts:
    4
    I got black water on lower end iOS devices (6+ for example), can you help me out?

    Here is screenshot
    upload_2023-6-3_20-13-15.png
     

    Attached Files:

  4. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,102
    A black material is usually the graphics hardware's way of saying some part of the shading calculations failed. Unfortunately, without being specific to what.

    It could be a wide range of things I'm afraid, and would require debugging on the device. The shader was last tested on an iPhone 6s, where it rendered correctly. You'd have to make sure OpenGLES 2.0 is not being used, since its too old for the shader to render with.
     
  5. takashi-kunn

    takashi-kunn

    Joined:
    Jul 10, 2020
    Posts:
    4
    Since I knew the shader using ASE to create, can I change some properties to correct the problem?
     
  6. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    207
    if i tick the check box that turns on "tile reduction" on the "normals" module, and then save the file, it reverts back to NOT having tile reduction. why isn't it saving my settings? im on the latest update. i was on 2.1.6 and it wasnt working there either.
     
  7. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    207

    Any ideas?