I (newbie) need help remaking an old ShaderForge vertex offset shader into Shader Graph in Unity

Hello! First of all, thanks for your help in advance, this forum has been an awesome tool to get into VFX.

Im a newbie, i have been following Sirhaian’s tutorials to learn the basics of VFX in Unity, however this tutorials are old, and he uses the now deprecated Shader Forge to create his shaders. Fortunately through struggle and research i had been to re create every shader he made on his tutorials on ShaderGraph, but that only took me this far. In his Aurora tutorial, he creates a super simple shader to create some vertex displacement on a plane to curve it slightly.

This is his result:

This is what he made in ShaderForge

I have tried everything to get this same result with shadergraph but i cant get there, i think my nodes are right, because i managed to curve a sphere and the preview on shadergraph looks alright, but when i use it in my plane nothing happens. I read somewhere it might be because i didnt unwrap my uvs, so i did, but still nothing happens.

This is what my shader looks like, notice it works on the sphere but not on the plane.

This are my nodes

This are the UVs on my plane, idk if there is something wrong with them

I just want that plane to bend. Thanks to anyone that replies :smiley:

Hello paleblood!
It has been a while since I used Unity’s Shader Graph (I am using amplify shaders mostly) so my first thought was: You need to use “Sample Texture 2D LOD” if you want a texture to be used in the vertex stage.

But you show that it works with the sphere. But won’t hurt to try (Sample Texture 2D LOD Node | Shader Graph | 6.9.2)

The next step would be to check the normals of your mesh. If the normals are (0,0,0) for some reason, then you would multiply the offset by 0 and therefore adding 0 to the position.
Checking and altering normals should be possible in every DCC software. In Blender there is even a command to recalculate the normals.

I hope this fixes the issue!

Hi! i tried using the Sample Texture 2D LOD and it didnt work, idk if i did this correctly, it still works on the sphere.

I also tried recalculating normals both inside and outside, still nothing, this is how the normals are displayed in Blender.

Thanks a lot for the reply!

so one remark: you actually shouldn’t need the Object Position in the UV of the Sample Texture, as I guess you want to scroll it (but I do not know the whole setup, so it might make sense).

I sanity checked in Unity (2021.3) myself and for me the set up you show works on a strip. So the only other thing I can think off might be, that the material has either no texture assigned to it or strength is zero on it. At least that happened to me, as I assigned default values on the parameters but the material has it all at zero or null.

Finally got it working!

Your reply pointed me towards the right direction, the orientation of my texture was wrong, such a stupid mistake u.u .

As a side note, i began making models in Blender and importing them to test things in order to see if perhaps there was something wrong with my meshes. I found that for 3d meshes to work with this they have to be exported smooth shaded. It may sound obvious to people reading this but i didnt know that so im posting it so that other newbies know about it :slight_smile: its worth noting that i tested my plane both smooth and flat shaded and it worked the same way with both, but that wasnt the case for a sphere.