flamacore / UnityHDRPSimpleWater

Simple water shader prepared with ShaderGraph in Unity 2018.3.6
MIT License
302 stars 38 forks source link

[SOLVED]It doesn't work in Unity 2018.3.11f #1

Closed I-forgot-the-semicolon closed 5 years ago

I-forgot-the-semicolon commented 5 years ago

The shader shows nothing. 1 2

flamacore commented 5 years ago

Are you using HDRP? (Seems like so but just to be safe :) )

flamacore commented 5 years ago

Also, do you have ShaderGraph installed from the Package Manager?

I-forgot-the-semicolon commented 5 years ago

Yeah x2, hehehe, HDRP and ShaderGraph latest version ^^

flamacore commented 5 years ago

Allright, could you please also increase heights of other waves as well? They might be causing some flunky business behind. And can you please try on a cube rather than a plane instead? Backface culling might be at work here although it should render double-sided

I-forgot-the-semicolon commented 5 years ago

Omw mate, anyway I tried in a cube as well ^^

I-forgot-the-semicolon commented 5 years ago

3

flamacore commented 5 years ago

Hmm allright. Do not have the exact workspace right here right now but I can suggest removing HDRP and Shadergraph and then installing the version 4.9.0 as this shader was made on that.

I-forgot-the-semicolon commented 5 years ago

Think I found the problem, when the shader graph is imported, You have to drag n drop the sub-shader graph, seems a bug from unity. 4 5

flamacore commented 5 years ago

Oh ok that's definitely strange! :) I assume you tried re-importing?

I-forgot-the-semicolon commented 5 years ago

I just looked for what was missing hehe, i'll try to connect it and see if it works!

flamacore commented 5 years ago

once we have a solution, I'll pin this for sure since it's probably related to Unity Editor itself.

I-forgot-the-semicolon commented 5 years ago

It looks slightly different from yours... xD 6 Can u attach ur waves values to debug it?

flamacore commented 5 years ago

Can you try reducing tiling to 25x25 or even less? Seems like it's tiling issue :) Also, one polygon per-face so there will be no waving :)

I-forgot-the-semicolon commented 5 years ago

Same result with < 25x25, the corners go up and down, nothing changes ^^

flamacore commented 5 years ago

Allright so here's my idea. Since it started to render something, you can even go lower than 1 for tiling. To 0.1 or even 0.01 just to try it out. Does it show the normal maps when you reduce the tiling so low? For objects with low polygons, the waves will not work as they move vertexes and this cube has only 8 vertexes thus only the corners move :)

I guess we can achieve something by trying to see the tiling first. At least we have to be able to see the normal maps moving with those settings.

I-forgot-the-semicolon commented 5 years ago

It works fine, I just have to tweak it a bit ^^ 10 You are using Gerstner waves, true? The cube has only 8 vertices and the waves works with vertices displacement, are u using a high poly mesh in your video? Thanks so much for ur time!

flamacore commented 5 years ago

Might come to your surprise but I have no idea what a Gerstner wave is :) So probably no, just came up with simple sine wave and tweaked it with values like -1 and absolution, thus the result.

Long answer; Well I am using a huge poly mesh with a gigantic size reaching over the entire terrain so to answer your question; Generally around 5k polygons are visible to the camera when looking at the mesh in any angle from anywhere.

Short answer; yes, a bit high poly mesh :) At least not 8 vertices :D

I'm counting this one as closed. Thanks for pointing out.