Unity Toon Water Shader - Tutorial in Description

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • ► Tutorial: roystan.net/ar...
    ► Source: github.com/Iro...
    ► / roystan
    Toon water shader in Unity. Uses noise and distortion maps to generate waves, and the depth and normals buffers to create the foam and coloring.

КОМЕНТАРІ • 38

  • @codedino
    @codedino 20 днів тому

    Thannkkssss

  • @Zihenroy
    @Zihenroy 2 роки тому +2

    I know its old, but any way to make it work in orthographic mode?

  • @m1-
    @m1- Рік тому

    does not work

  • @BlockyLeon
    @BlockyLeon 4 роки тому +2

    Free to use?
    Looks so good in my proyect !
    And also thanks !!!!

  • @Hugop_arts
    @Hugop_arts 5 років тому +5

    Does this work with the HDRP pipeline?

  • @D3RHiRO
    @D3RHiRO 4 роки тому +4

    Hey hey,
    of all the solutions out there, I really love this one most. I only can´t get the foam to work. If I use the default min,max settings for it, the whole "water plane" just turns white. I have to set on of the values to be negative for the water to be seen anyway but then there is no foam. Could anybody help me on this?

    • @robinmontgomery9160
      @robinmontgomery9160 4 роки тому

      Sorry, old af but did it look odd in the game view too or just the scene view? It's normal for it to look weird in the scene view since the foam relies on the scripts on the cameras

    • @D3RHiRO
      @D3RHiRO 4 роки тому

      It’s just white in both the scene and game view :(

    • @robinmontgomery9160
      @robinmontgomery9160 4 роки тому

      @@D3RHiRO hm, you could download their completed code from github and see if theirs works. If so, you can replace yours with theirs chunk by chunk to find the bug

    • @D3RHiRO
      @D3RHiRO 4 роки тому

      Good idea. Thanks 🙏🏻

  • @vishnu2737
    @vishnu2737 3 роки тому +1

    Thanks for this good shared , but its not working in orthographic camera, only see white color instead of ocean color

  • @DannyMakesStuff
    @DannyMakesStuff 5 років тому +2

    Thank you for the tutorial.
    Everything is working finde, but on mobile (android) the whole water is just colored like the foam color.
    Is there a problem with the normals or something? Can you help me fix this? :(

    • @roystan7272
      @roystan7272  5 років тому +3

      The depth texture was not being correctly initialized in CameraDepthTextureMode; this has been resolved.

    • @venkateshmuskam1210
      @venkateshmuskam1210 4 роки тому

      Hi. I am having this issue. Not able to solve. please help me.

    • @Psyducckk
      @Psyducckk 4 роки тому +3

      @@venkateshmuskam1210 You gotta add script "CameraDepthTextureMode" to the main camera and in the component set "Depth Texture Mode" to something .

    • @liujanis636
      @liujanis636 3 роки тому +1

      @@Psyducckk Thank you! That solved it :)

  • @ITPCH
    @ITPCH 5 років тому +2

    seem it stop looping after 15-20 sec

  • @noizygamesstudio5313
    @noizygamesstudio5313 3 роки тому

    I can't get it to work on android build. Does it support mobile platform?

  • @spaceygamedev5786
    @spaceygamedev5786 4 роки тому

    while using the Universal Render Pipeline the shader renders well in the editer view, but in the game view it is solid white. How do I fix this?

    • @SionFletcher
      @SionFletcher 4 роки тому

      Make sure you switch on both Opaque Texture and Depth Texture under Rendering on your camera - or in your pipeline settings

  • @SUBZERO8K
    @SUBZERO8K Рік тому

    Thank you for sharing this tutorial, Mr. Roys Tan. I look forward to your future endeavors.

  • @tillfreitag4446
    @tillfreitag4446 5 років тому +1

    well done!

  • @gavenhollenbeck4630
    @gavenhollenbeck4630 4 роки тому

    It’s not working, it says “missing pre fab

  • @davidvanrijn
    @davidvanrijn 5 років тому +1

    Where can i get it

    • @roystan7272
      @roystan7272  5 років тому

      There's a link in the description.

  • @SamPyrtuh
    @SamPyrtuh 3 роки тому

    Thank you so much for all of this shader

  • @davitsedrakyan
    @davitsedrakyan 4 роки тому

    Hello, everything is good except white edges on objects that are above water, do you have any solution for that?

    • @SaifullohFadli
      @SaifullohFadli 4 роки тому

      Same here

    • @davitsedrakyan
      @davitsedrakyan 4 роки тому

      @@SaifullohFadli I managed to fix it, but don't remember how, just check properties and fix it

    • @maciejmikos8338
      @maciejmikos8338 4 роки тому

      @@SaifullohFadli Hi mate, did you fixed it?

    • @maciejmikos8338
      @maciejmikos8338 4 роки тому

      Disabling Anti Aliasing in URP settings fixed it for me.

  • @Gabriel22021997
    @Gabriel22021997 4 роки тому

    Thank you very much. You are amazing.

  • @rp5821
    @rp5821 4 роки тому

    This is a fantastic filter! I did have one question though. When you are calculating the lake bottom (existingDepthLinear), how does your code know that you want the depth of the lake bottom and not return the distance from the lake surface. Is it always assumed by the shader compiler that the object on which you are applying the shader is ignored in the distance calculations?
    Thanks again and awesome work both on the shader and the tutorial

    • @roystan7272
      @roystan7272  4 роки тому +2

      The water surface does not write to the Zbuffer, so it is not part of the greyscale depth map that is being sampled.

  • @Ben-kd6lk
    @Ben-kd6lk 5 років тому +1

    is there a way to make semi transparent?

    • @Ben-kd6lk
      @Ben-kd6lk 5 років тому

      and if there is will it work on mobile :D