Energy Shield Hologram in Unity Shader Graph

preview_player
Показать описание
All the best futuristic games have glowing holographic stuff in them! In this tutorial, I'll show you how to create a shield, complete with glowing edges and intersections with other objects, two kinds of scanlines, an emissive texture, and a ripple effect when the shield is hit, complete with a bonus VFX in the GitHub repository!
------------
------------
------------
------------
00:00 Introduction
00:42 Breakdown
02:55 Base Outputs
04:09 Edge Glow
07:12 Intersection Glow
08:45 Collision Ripples
10:41 Glowing Surface
11:33 Hexagon Texture
12:05 Hexagon Heightmap
12:35 Big Scanline
14:04 Smaller Scanlines
14:31 Putting It Together

#gamedev #shaders #madewithunity
Рекомендации по теме
Комментарии
Автор

Somebody will ask in the comments, so: the intersection depth calculations - How It Works If You Don't Want To Just Trust Me Bro:

The Screen Position node gives you the screen position of a pixel on the object currently being rendered (in our case, the shield mesh). When you use a Screen Position node in Raw mode, you get a position value from partway through the graphics pipeline, just before objects are projected onto the screen. In this format, the w component (the fourth component of the vector) is equal to the distance (in Unity units, a.k.a. meters) of the object from the camera. That's convenient, because it happens to be exactly the value we want. This value is sometimes called the "eye space depth", where "eye space" refers to what the world looks like from the camera's perspective.

When you divide this Raw-mode vector by its own w component (a process called the "perspective divide"), you end up with x- and y- values that are normalized between 0 and 1, which I think is equivalent to what Default mode does.

The reason this works is because the Scene Depth node, in Eye mode, gives you the eye space depth of whatever object was previously rendered at the same pixel. If the difference is small, then that part of the shield is really close to something - it's at an intersection. ✨

danielilett
Автор

How can we do the desolve effect with the camera distance. Can you make a video about it?

Omer-nnyh
Автор

I have another game shader thing you could do the malice and gaurdian eye from breath of the wild

kaygetheragegaming
Автор

Can this handle multiple impacts at once or does it only work if you hit it, wait for the animation to finish, and hit it again?

operationfrogurt
Автор

Nobody ever explains the script that they do for the raycast.

namesurname
Автор

with this method you by able to make a crt monitor shedder

watercat