Це відео не доступне.
Перепрошуємо.

Unity Water Shader Part 2 - Wrong Refraction Fixes, Foam and Waves

Поділитися
Вставка
  • Опубліковано 7 сер 2024
  • There may be some grammatical mistakes because my English skills are not very good. :p
    Unity Version :
    2020.3.26f1
    Previous Video:
    • Unity Water Shader Par...
    Next Video:
    • Unity - Water Surface ...
    Music :
    Italy by Aylex
    Energetic Rock Background Music For Sports Workout Videos
    Brazilian Jazz - Chill Bossa Nova Relaxing Instrumental Music
    0:00 Wrong Refraction Fixes
    3:45 Foam
    6:00 Wave
    8:00 Result

КОМЕНТАРІ • 40

  • @anikdey2100
    @anikdey2100 Рік тому +3

    Man! You just taught me how to fix every refractive shader I made so far! I tried to fix those using custom render pass and what not, and this solution is so simple and makes so much sense. You are a genius.

  • @Random_Guy420
    @Random_Guy420 Рік тому +1

    Appreciate the short explaination! it was really helpful and cool that you put in extra efforts for explaining

  • @nathanbarraud4349
    @nathanbarraud4349 6 місяців тому +1

    Man ! Thank you for your amazingly high quality work, it is simple, funny and very very well explained ! Well done !

  • @munyunu
    @munyunu Рік тому +1

    cackling with the intense action music during the explanation bit

  • @dencesar8602
    @dencesar8602 Рік тому +1

    Best recent tutorial on water! Million thanks mate!

  • @draudeky4508
    @draudeky4508 Рік тому +1

    so far the best tutorial if seen, thank you for this kind of stuff, keep it going 😊

  • @JuniorDjjrMixMods
    @JuniorDjjrMixMods 11 місяців тому +1

    I used this refraction fix for a car headlight lens shader, looks perfect!

  • @godtierslayer3046
    @godtierslayer3046 10 місяців тому +1

    Another 10/10 Video, Fantastic!

  • @logiis6
    @logiis6 Рік тому +1

    You. Are. Genius! Thanks!

  • @ronan5946
    @ronan5946 Рік тому +1

    Dude! You are the best! THank you!

  • @munyunu
    @munyunu Рік тому +1

    thank you!

  • @terobi8992
    @terobi8992 Рік тому +1

    thank you!

  • @TheRealHashaam
    @TheRealHashaam 5 місяців тому +1

    Really nice tutorial you explained it really well also how would you turn this into an ocean with waves

    • @paro456
      @paro456  5 місяців тому +1

      To create ocean waves, you need to use tessellation technology. I am currently researching it.

  • @Random_Guy420
    @Random_Guy420 Рік тому +1

    Hey, I seems to be getting error when I use a camera overlay. Do you have any Ideas why? it's an overlay for weapons so that the guns don't clip into walls. A multisampled texture being bound to a non-multisampled sampler. Disabling in order to avoid undefined behavior. Please use Texture2DMS in the shader.

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

      Nvm, this seems to be caused by the Kmirrors package

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

      You can replace kmirror with another package as long as it can achieve the same effect.

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

      @@paro456 Actually, it's all good! I found a fix for it.
      A quick fix: In Mirror.cs after line 207 add:
      var camData = camera.GetUniversalAdditionalCameraData();
      if (camData.renderType == CameraRenderType.Overlay)
      return;
      for anyone who struggling with problem

  • @vinni_animates7381
    @vinni_animates7381 Рік тому +1

    idk why but in the wave part i check the graph thrice but it had no error an the wave was going to the z pos instead of y pos, anyone please help

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

      In 6:55, you can connect the Sine node to either Z or X.

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

      @@paro456 thanks now it is fixed

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

    I have the same issue in the shader created using Amplify shader editor, can you able to point out the issue?

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

      imgur.com/a/vxthX36
      Connecting the nodes like this might solve the problem.

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

      @@paro456 Let me try

  • @LostAngel175
    @LostAngel175 10 днів тому

    哥,又來偷師了 :)
    醜陋的 Refraction 解決了

    • @paro456
      @paro456  10 днів тому

      完成時放你頻道讓我看看成品吧XD

    • @LostAngel175
      @LostAngel175 8 днів тому

      @@paro456 獻醜了
      ua-cam.com/video/Pswi5PmIlQY/v-deo.html

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

    After i did the refraction fix i still have some line but annoying outlines around all objects above the water. Double checked and rebuild the tut three time. I have no idea to get rid of it. Anyone has the same issue? R2021.3.

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

      catlikecoding.com/unity/tutorials/flow/looking-through-water/
      I found a post on the Internet that discusses the problem you describe, but I don't quite understand its content, maybe you should take a look.

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

      did you change the screen position node at 2:56 to say 'raw'?

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

      I have the same issue, I haven't solved it myself yet but I found a very quick way to largely reduce it : switch "Opaque downsampling" to "None" in your URP pipeline properties (Edit > Project Settings > Graphics > Right click on "URP-HighFidelity" > Properties > Opaque downsampling > None
      Edit : this + deactivating the antialiasing completely removed the issue for me, but at the price of having no anti-aliasing

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

    I did it, but while the transparency of the water is selected in the scene mode, the transparency disappears when I enter the game panel (underwater is not visible). what is the reason, thanks.

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

      Maybe you forgot to check the opaque texture option

    • @cosmicnarwhalgaming
      @cosmicnarwhalgaming 11 місяців тому

      ​@@paro456 I had the same issue where underwater effects are not visible, but opaque and depth textures are checked, and the camera opaque and depth are set to "use URP settings"

    • @paro456
      @paro456  11 місяців тому

      @@cosmicnarwhalgaming If you want a plane to display both sides, you need to set Two Sided or Cull Off in the shader.

    • @cosmicnarwhalgaming
      @cosmicnarwhalgaming 11 місяців тому

      ​@@paro456I cannot find this two sided/cull off setting. Could you tell me where this setting is? thanks​.
      I had another issue in which the foam appears very transparent and not visible enough for my liking. I have made sure the foam color is exact white, and the alpha of it is 100. I am also using the same texture you are. However, even without this texture, the foam still appears to be slightly transparent. I have rewatched the foam section in the video and cannot find any mistakes. I was originally using the kmirrors assets, but the reflection seemed too bright and made most of the surface of the water bright white, even with 0 smoothness. So I replaced this for a reflection probe, but the probe seems to just cast light on the water, not give reflections of the actual environment.

    • @paro456
      @paro456  10 місяців тому

      @@cosmicnarwhalgaming You can contact me through Discord, so I can better help you resolve your issues. paro456d

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

    You still did better than me. I can't get anything to work at all when it comes to this or Unity looses files. Its why I absolutely hate its URP and HDRP and been trying to figure out how do this kind of thing without either. (And not using the annoying shader scripting either).

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

    i still cant do the refraction fix.
    i try to do it in built in render pipeline though. IN.screenPos.w gives me nothing