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

Feedback Stylized Water Shader (FREE!)

Discussion in 'Assets and Asset Store' started by alexanderameye, Mar 13, 2020.

  1. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    An Update: Stylized Water Shader (alexanderameye.github.io)

    Store Link

    If you like the asset, please write a review. It helps me out a lot!



    For the past few months I have been working very hard on a stylized water shader for the Universal Render Pipeline. The result is a beautiful shader, which is feature rich and easy to customize.

    Manual + Support | Compatibility | Mobile Demo | Discord Support

    Twitter


    The main focus when developing this shader is to create a shader with a lot of room for artistic freedom and customization. The exposed parameters have been carefully chosen and put into an easy to use custom material editor. A lot of different visual styles can be achieved as you'll see in the screenshots.

    Built for URP
    Highly compatible
    100% Shader Graph



    • Depth based color gradients
    • Surface foam
    • Intersection effects
    • Foam shadows
    • Refraction
    • Caustics
    • Basic buoyancy
    • Basic underwater effects
    • Toon lighting options
    • Surface specular reflections
    • Supports fog and point lights
    • Planar reflections
    • Gerstner waves
    • Vertex color support
    • Local or world space UVs
    • Orthographic camera support
    • Custom material inspector
    • Support window
    • Full source code + SG nodes
    • Extensive documentation/manual

    You can check the compatibility page to make sure the shader will work with your project. Also be sure to check this page about performance.



    • Water shader
    • Foam, surface normals and caustics textures
    • Several water prefabs and materials
    • Demo scenes

    I have put a lot of effort and passion into this asset and I'm dedicated to making this shader as good as I can. If you have any questions or feature requests, please let me know.



    You can find an extensive manual here. The best way to contact me would be through discord at https://discord.gg/6QQ5JCc or through email at alexanderameye@gmail.com. You can find additional contact methods under the contact section in the manual.

     
    Last edited: Jun 20, 2021
    awlok, adamgolden, ununion and 3 others like this.
  2. Faizalski

    Faizalski

    Joined:
    Oct 4, 2018
    Posts:
    27
    Looks awesome :) I bet you've put a lot of TLC to that creation of yours.
    I'm interested. Just a question if I may. Is this asset VR friendly?
     
  3. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    It seems that shaders made with shader graph will automatically support VR. I can't test this since I don't own a VR headset, but I think the shader will work with VR out of the box. Some feedback about this from someone who owns a VR headset would be greatly appreciated.
     
    Last edited: Mar 19, 2020
  4. Faizalski

    Faizalski

    Joined:
    Oct 4, 2018
    Posts:
    27
    That would be great if you can look into VR as a supported feature.
    I had been meaning to incorporate a cool and lightweight water shader for my project. VR support would be an extra added bonus.
    I'll buy the asset once it's released in the asset store for my other non-VRprojects. That way I can also sign in as a test subject on VR devices for you if you are interested in allowing external testing to take place.

    Hows the performance like for the asset on mobile and PC? Does it hogs a lot of processing power?
    Being that it's Shader graph-based and all.

    Thank you
     
  5. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    I asked around and updated my previous comment. It seems that shaders made with shader graph should work out of the box with VR. So even though I can't test this personally, I have reason to believe the shader will work with VR but I can not guarantee this for now.

    In order to have good performance on mobile, I have created a mobile variant of the shader that is more lightweight (but with less features). On my own mobile phone I get 60fps with the mobile variant and the lighting option of the shader set to 'basic'. I have updated the mobile demo page so there is a dropbox link where you can download the .apk file.

    https://alexander-ameye.gitbook.io/stylized-water-for-urp/support/mobile-demo

    There is also a page related to performance here https://alexander-ameye.gitbook.io/stylized-water-for-urp/support/performance The page is a work in progress and will be finished before release.

    You can expect future updates from me focusing on performance and optimization. Shader graph itself also has a few performance-related updates in the pipeline so hopefully that should help as well.
     
    Last edited: Mar 25, 2020
  6. ForRiver4Game

    ForRiver4Game

    Joined:
    Nov 22, 2017
    Posts:
    4
    will be available in unity store?
     
  7. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    The package was just submitted for review by the asset store team :)

    Hopefully soon but realistically it will take between 2 weeks and a month to be reviewed. Due to COVID-19 approval times are a bit longer so we will have to be patient.
     
    Last edited: Mar 17, 2020
  8. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
  9. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    hello alex, the link on your webpage to assets store is not work, it transform to home page of assets store, can you rebuild it again or directly post the assets store link on there? thanks!
     
  10. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    ooo i get it ,it be reviewed now.. cannot wait !!!
    very very very beautiful
     
  11. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    come to root for you again,
    a little suggestion, i think the water is more like the jelly or oil.
     
  12. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Very nice shader!

    Do you plan to add an underwater effect for the shader?
     
  13. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    Do you mean the water looks like jelly/oil, or I should add the option to make it look more like jelly/oil? In the material inspector there are a lot of properties you can play around with to achieve various styles of water.

    Thank you ^^

    This is currently marked as in research on the roadmap. I'd like to add it, but I haven't settled on an implementation yet. I'll need to do some research, see what works well, but no promises.
     
    Lars-Steenhoff likes this.
  14. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    no i mean i think the water is like jelly/oil now,and i wonder if there is some settings can make it to be very clean,
     
  15. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
  16. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    I'm pleased to say the asset is now live on the store! Thank you for the support so far. I hope you'll like the asset.

    https://assetstore.unity.com/packages/vfx/shaders/stylized-water-for-urp-162025

    For support you can check out the manual. Especially the troubleshooting section might be of use.

    https://alexander-ameye.gitbook.io/stylized-water-for-urp/

    If you need additional help you can always contact me through the unity forums, email, discord or twitter. You'll find the links in the manual.
     
    Last edited: Apr 2, 2020
    vorokoi and Lars-Steenhoff like this.
  17. Sibylline-Siren

    Sibylline-Siren

    Joined:
    Jul 8, 2012
    Posts:
    22
    Great looking water. Thanks for publishing.
    I seem to have a problem rendering what's labeled as the 'WindWaker' variation in the Demo scene. Is it because it's for mobile and I'm testing on PC?
    https://i.imgur.com/3P4TjdI.jpg
    The other version works great though.
     
    Last edited: Apr 12, 2020
  18. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    Thank you for the support, that means a lot. Your target platform does not matter, the mobile variant shader should be visible as well.

    Does the issue get fixed when you go to Stylized Water For URP > Materials > Mobile and then right click on the Windwaker material and click Reimport? Alternatively you could also try to reimport the mobile variant shader in the same way. It's located under Stylized Water For URP > Shaders.

    I've had this issue before where Unity sometimes doesn't import materials correctly after downloading an asset from the store and I need to reimport them to fix it.
     
  19. Sibylline-Siren

    Sibylline-Siren

    Joined:
    Jul 8, 2012
    Posts:
    22
    Thanks for your answer. Turns out I bothered you for nothing. I think I found out I produced the problem myself.
    The mobile shader seeks for a subgraph under a particular absolute location ('Assets/Stylized Water for URP'/...).
    If the asset is not located where you expected it to be, it won't find the subgraph and appear pink. Everything else works fine. Changing the location to where the asset wants it to be fixes it.
    Maybe it could be interesting to change it to a relative location in the future.

    Again, great looking water, thanks.
     
    Last edited: Apr 3, 2020
    alexanderameye likes this.
  20. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    I've had that issue as well before. Actually, I am not using any absolute location references anywhere in the asset. I'm not looking for subgraphs through code or anything, the whole process happens in the .shadergraph file. The issue is with Shader Graph itself. Custom function nodes just use an object field where I reference the .hlsl file and subgraphs don't have any references or paths for me to set, it's just automatically. Somewhere along the way when moving around nodes, Shader Graph loses the reference and refuses to compile.

    Maybe they already fixed this in the newer versions or maybe they will fix this is the future. I hope this gets improved. For now, I'll mention it in the 'troubleshooting' section in the manual. Thank you for sharing the issue you were having!
     
  21. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    this is the best&&perfect&&wonderful&&amazing water component i have seen after i tried about 5-10 assets and spend about more than 100 dollers to buy them..really great!
    thank you very very very much.!
     
  22. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    Thank you for the compliment, I'm very happy you like it. If you like using the asset, a review would always help me out greatly to get feedback.
     
  23. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    A user just notified me of a bug where planar reflections were not rendered when entering play mode. This will be fixed in version 1.0.1. The update should be live in a few days.
     
    Last edited: Apr 4, 2020
  24. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    hope can improve the performance of reflection in the future. everything is great until now!
     
  25. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    You can read more about the performance of reflections here. https://app.gitbook.com/@alexander-ameye/s/stylized-water-for-urp/support/performance

    Reflections are rendered using a secondary camera and this can be expensive. To improve performance you can do one of 3 things.
    • Disable planar reflections (in v1.0.0 you do this by setting the strength to zero, in v1.0.1 there will be a separate toggle)
    • Reduce the render scale of the planar reflections
    • Limit which objects are reflected using the layer mask
     
  26. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    New release: 1.0.1

    Added
    • Added the option to toggle the visibility of the reflection camera in the hierarchy
    Fixed
    • Fixed a bug where planar reflections sometimes wouldn't render in play-mode
    • Fixed some links in the support window
    • Hidden components are made visible again when removing the water script
    Changed
    • Material inspector sections now keep their expanded state when deselecting and re-selecting the water
    • Reflections can now be toggled on/off in the lighting section
     
  27. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    nice work my friend!
     
  28. fullerfusion

    fullerfusion

    Joined:
    Dec 2, 2018
    Posts:
    22
    Hi, I think I found an issue/bug when setting up the asset. I'm using Version 1.01 of the asset and Unity Version 2019.3.7f1. After downloading the asset the Detect Support Window popped up and I clicked on the Detect button, but it can't get past the URP Version step.
    Screen Shot 2020-04-06 at 3.34.26 PM.png

    However, before I even installed the asset I already had version 7.3.1. So, I looked inside my Package Manager just to be sure I had the correct version and I did. It stated that I already have the correct URP version of 7.3.1 installed in my project.

    Screen Shot 2020-04-06 at 3.35.45 PM.png

    When I pressed the "Install" button just to see what would happen Unity will give me this message in the console.
    Screen Shot 2020-04-06 at 3.49.41 PM.png

    When I opened the Demo scene the asset loaded up fine. I even created a new scene and created a Gameobject with the Water shader and it works perfectly. I don't know why the Support Window isn't detecting the URP Version. Thought I let you know. I love the asset and can't wait for more updates!!!
     
  29. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    Thank you for letting me know, I appreciate it! I published the asset before 7.3+ was out and I thought they were going from 7.2 straight to 8.0 so I never checked for 7.3+ in my scripts. This is now fixed! Since this is a non-critical issue that won't interfere with the actual functionality of the water, I'm not going to push a new update to the store just for this, but I'll put it together with the next one. If you'd like to fix it yourself, you can add the check for 7.3 in the SupportWindow.cs script at line 448. Just add the following code in the statement.

    Code (CSharp):
    1. || version.StartsWith("7.3")
    Thanks again for letting me know and sorry for the confusion. If you like the asset, a review would always be greatly appreciated! Have a great day!
     
  30. HQF

    HQF

    Joined:
    Aug 28, 2015
    Posts:
    40
    does it works in VR? because its really problematic to find simple water (without reflections) that's supports VR and URP at once...
     
  31. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    hi alex, I hope a new asset about waterfall created by you in the future!
     
  32. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    I have tested VR compatibility in the editor through MockHMD for both multi pass and single pass instanced. There don't seem to be any issues.



    In multi pass mode, the right eye didn't seem to be generating the necessary opaque/depth textures. This seems to be an URP-related bug. I fixed this by simply disabling and re-enabling those textures in the pipeline asset. After that the shader rendered correctly.

    Since I do not own a VR headset (and will not own one for the foreseeable future), I am not able to test compatibility on actual VR hardware.

    @Faizalski this might interest you as well.

    You can find all the compatibility information here https://app.gitbook.com/@alexander-ameye/s/stylized-water-for-urp/support/compatibility
     
    Last edited: Apr 7, 2020
  33. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
  34. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    @fullerfusion There was a small bug in 1.0.1 that I had to fix, and so I fixed the 7.3+ SRP check as well. The update should be live on the store, however the version number is unchanged since the update is so minor.
     
    fullerfusion likes this.
  35. Deleted User

    Deleted User

    Guest

    Seems to be a nice asset; can you make a video ? I'd really want to see it moving before purchasing. Thanks !
     
  36. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    I really should make a good video showing off all of the settings! Something I'd like to do soon.

    I just recorded this in my project. It's a video of me playing around with some of the features. My apologies for the recording quality. If you have any questions, please ask! There are many more features I didn't show in the video.

     
  37. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    as my friend said, really a nice asset but destroy by the first index picture...
     
  38. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    What exactly do you mean? Which picture?
     
  39. Deleted User

    Deleted User

    Guest

    Thanks ! Looking pretty good ! I will buy it, and wait for the underwater fx.
    Do you also plan to have a depth mask ? Like a boat on top of the water to 'filter' the bottom of the boat ?
    And possibly surface effects ? like swimming ripples ?
     
  40. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
  41. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    the old picture in this thread with lots of red stones,that make my friend think its not have a good effect,,,but as i see you have change it. the new one is beautiful,
     
    alexanderameye likes this.
  42. volkerror

    volkerror

    Joined:
    Apr 5, 2018
    Posts:
    16
    I really love the asset and am willing to give a fitting review. But there is still one problem, that bugs me. I am not sure if it's me or the asset. After experimenting around with the settings for two hours, I am guessing the latter, but still am not sure.

    There seems to be surface reflection around the outlines of the player character where I shouldn't be. Can this be turned off? Would be a major bummer if not.

    bug.jpg

    Cheers,
    Volkerror
     
  43. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    This is a limitation of the current refraction approach I'm using. Originally I planned to look into this in a few weeks/months when working on the next update. Seen as you're not the only one experiencing this issue, I looked into it just now and managed to improve on the effect.

    Below you see the original effect on the left and the new, improved effect on the right. I made the refraction very strong here so the effect is visible.



    I'll update the asset to 1.0.2 and fix this! If you'd like to fix this now, I could send you the steps on how to fix this. Or if you prefer to wait for the update, that's also possible. I'll push the update this evening. It might take until Monday for the update to be live.

    You can contact me on discord alexanderameye#4172, or email/forum private message is also fine!

    Alex
     
    Last edited: Apr 16, 2020
  44. volkerror

    volkerror

    Joined:
    Apr 5, 2018
    Posts:
    16
    Thank you for the quick answer and great news. And: I'll wait. Monday seems very prompt. :)
    Your asset is one of the few, that I didn't regret buying in any way.
    Cheers,
    Volkerror
     
    alexanderameye likes this.
  45. HQF

    HQF

    Joined:
    Aug 28, 2015
    Posts:
    40
    man update it with this feature please. and also I really need to test it in VR because i need new water in my VR project, but all shaders doesn't works in URP + VR + SinglePass Instanced/Multipass.

    And also does this supports waves / splashes? I mean if i put some object in water is it possible to make some waves from it?

    And is it possible to turn off some features like refractions, caustics, reflections and etc for optimization purposes? Because we planning to port game on mobile

    https://store.steampowered.com/app/1214410/Zooma_VR/ i need it for this project
     
  46. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    As I mentioned in my post here the shader seems to work fine when I test it through MockHMD. In multi pass I got some weird rendering in the right eye, but that seems to be an URP-related bug. You can find all the platform compatibility information here. I am not able to test the shader on real hardware so this is all the information I can give you concerning VR support.

    The shader supports up to 4 Gerstner waves. I will look into adding 'splash' effects in a future update. Buoyancy is not supported.

    You can turn off refraction, caustics and reflections visually. If you want to target mobile, you can use the mobile shader variant which has less features but should perform better. There is a mobile demo here that you can test out.

    The project looks great! Very polished.
     
  47. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    New release: 1.0.2

    Fixed
    • Fixed refraction visual artifacts


    @volkerror I guess Thursday is the new Monday :) Your issue should be resolved, please let me know if this is not the case!
     
    Shodan0101 and volkerror like this.
  48. Deleted User

    Deleted User

    Guest

    Ended up buying it; wow, it's ... delicious .. i want to lick it ! lol Is there a way to 'hack' an underwater effect you think of ... until you build it ? Thanks !
     
  49. volkerror

    volkerror

    Joined:
    Apr 5, 2018
    Posts:
    16
    After the 1.02 update it all works perfectly! Thanks a hundredfold - for the fix and the incredible response time. =)
    Cheers,
    Volkerror
     
    alexanderameye likes this.
  50. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    I wrote a small guide on how to achieve underwater effects. https://alexander-ameye.gitbook.io/stylized-water-for-urp/features/underwater-effects

    It works by making the shader two sided and then adding a post processing box volume right under the water line. Here is how it looks.



    I hope that helps you out!