Shader works correctly in shader graph preview window but not in editor

Hello, I’m trying to create a simple low poly water shader but for some reason it just doesn’t work. It works fine in the shader graph window but in the editor it’s totally still even when playing.

How are you offsetting the vertex positions? What scale is the object you’re using the shader on?

The preview sphere is a 1 unit radius sphere centered at 0,0,0 in “world space”. If your in game sphere is much larger, it’s possible it’s not moving enough to be visible.

The sphere has the scale of 1,1,1. I set wave height to an insane amount: 1000000 but it still doesn’t work. Shader:

Does your mesh have UVs ? The noise node is using UV as source, if you don’t have those, it will result in an uniform value.

1 Like

That is probably the problem. I tried fixing it by adding a texture as an input but now everything is purple!

Bump

Well … that should definitively not happen.

but it did… I am using the lwrp

Random guess :

  • check that the LWRPAsset is properly assigned in the graphic settings.
  • Update to newer version of package is available.

I have the same problem the preview is ok but the material is not how did you solve yours?

1 Like

Guys the answer is if you have a noise component and your mesh has no UV it comes out flat color. remove the noise.