Distortion Shader in Unity 2019 with Shader Graph! (Tutorial)

preview_player
Показать описание
In this video, we are creating a Distortion Shader using Shader Graph in Unity 2019!

Shader Graph in Unity 2019 lets you easily create shaders by building them visually and see the results in real time. You create and connect nodes in a network graph instead of having to write code.

You can do things like:

- Procedurally alter your surface appearance
- Warp and animate UVs
- Modify the look of your objects using familiar image adjustment operations
- Change your object’s surface based on information about it, such as its world location, normals, distance from camera, etc.
- Quickly tweak a shader’s visuals in the context of a scene using the Material Inspector.
- Share node networks between multiple graphs and users by creating subgraphs
Рекомендации по теме
Комментарии
Автор

SOLUTIONS: In Unity 2019.2.0f1, I could not get transparency to work.
Go into your LWRP pipeline asset, and enable Opaque Texture near the top of the list.
Then go into the shader graph's PBR Master node, click the cog on it, and set Surface to Transparent.
Do NOT connect anything to the Alpha Channel.
If you set the distortion texture's Sample Texture 2D node to Normal, it makes the distortion a bit more pronounced and looks good.
This made it work perfectly for me.


OTHER WEIRD EFFECTS:
set the Surface to Opaque AND
set the Sample Texture 2D node for the Distortion Texture to Default,
to see a really weird scratchy damaged monitor effect across the sphere. Terrible looking here, but might be useful for something...

Also try turning on 2-Sided, to see a weird white square room inside the object. Hmm...

westingtyler
Автор

If you're having trouble in URP 2019.3 then enable "Opaque Texture" in your Universal Render Pipeline Asset

JelloJordan
Автор

Could you do something like this but go through each possible node and explain things in even more detail? Want something like this but just slightly simpler.

StefanLopuszanski
Автор

would be nicer if you build it up node by node

DavidZobristGames
Автор

is there a way to apply same concept for 2D games ? i tried that but failed.

ramezal-tabbaa
Автор

Ah I was just waiting for the "as you can see" catchphrase

JaredBrandjes
Автор

bout time we get to see how distortion is done in shadergraph. I've been dying for this info since hdrp was released!
It use to be so simple before. Just a normal map. But I'll take what I can get at this point. Hopefully there's a way we can use the fresnel effect to dim the edges of the object we're displacing from, because hard edges kinda suck in cases like fire.

XcutAngel
Автор

The project download link no longer works.

falconerodland
Автор

Hi, thanks for the tutorial and demo scene!
Unfortunately, it didn't work for me on any scene other than the demo, the object doesn't get "transparent", it seems the problem is on the Distortion part, since the Cloud works fine

LSTyph
Автор

nice. but blocking your own scene with end screens is a bad idea.

Roundbeargames
Автор

Great Tutorial! The only problem I'm having is the sphere will distort objects that are in front of it as well as behind. The actual object in the scene looks fine but the sphere behind it will show it's distortions. Is there a way to clip the influence of objects in front of the sphere so they don't cast there influence onto it?

juliansestanovich
Автор

I'm trying to do the distortion portion in unity 2019.3.3 with hdrp version 7.2.1 and it just doesn't work. When i move the camera around it just changes position.

Firenaught
Автор

My Scene Color node doesn't seem to be pulling it's colors or view from my camera, it seems like it's pulling it from the preview windows in my scene or inspector. I have no idea how to fix this

brandongarman
Автор

Interesting video for some shader graph features (Color Mode, Grouping, Precision), but I wouldn't call it a tutorial. A handful of steps were skipped in the making of the distortion shader that you may only "link" through by observing the rather hard to read details on the graph. It's a bit of "Initiate" level presentation of new Shader graph features. Also, I'm working with 2020.1.16f1 (ShaderGraph 8.31) and it seems to have few more options that their default value may not have same result (My sphere isn't see-through). This need an update.

Kalahee
Автор

This reminds me of the Rockwell Automations Retro Encabulator video 😂

Ryan-wwun
Автор

What does it mean to multiply two textures together? Do we take the cross-product of the RGB value of every pixel in the same positions of both textures and use this cross product as the output pixel? Or do we form some kind of coordinate-wise multiplication? Or do we not use RGB at all, instead do we use HSV pixel encoding?

gregoryfenn
Автор

Please tell whoever's speaking here that I love their voice

smonkk
Автор

I'm working in 2022.3.5, and I got this tutorial to work when I enabled "opaque textures" in the renderer asset, but for some reason the quality settings render asset did not match the graphics render asset, and that caused issues, when I made sure it all matched, (also making sure the shader graph is set to transparent, and nothing messing with the alpha) it all worked correctly.

hallmarkwastaken
Автор

If I were to use this effect to be in front of the camera all the time (for, say, like an underwater scene to from time to time add a little blurry wave all over the whole image) how would I go about doing this? :3 Is there a tutorial for this specific effect? I haven't found one yet :(

angiemon
Автор

Where can I find the project?.
The link is broken.
Thanks.

pnvgordinho