Pickable objects shader

By 08/04/2019 May 14th, 2019 Shaders

Pickable Objects shader

Here’s how to create a simple effect to communicate to the players which objects are pickable, interarctive etc.
A lot of games implemented this effect in clever ways; today I’m showing a simple version that relies on the object’s vertices coordinates (like a gradient) and passing of time.

Game in the example: The Last of Us (Naughty Dog, 2013).

Download files

You can download the Unity Package containing files used in this tutorial (with extra samples and explanation) by visiting the Patreon page (you’ll also support my work, yay!).

HLSL Shader

Here’s an example, written in HLSL.
Even if this tutorial example is targeted for Unity the mechanics and logic apply to all other engines as well.

Shader Graph

Here’s the same effect created in Unity Shader Graph. To use it you must enable one Scriptable Render Pipeline in the Package manager, for example the Lightweight RP or the High Definition one.
You can read my tutorials about: How to install Unity Shader Graph, Introduction to Shader Graph.

Amplify Shader Editor

Here’s the same effect created using the plugin Amplify Shader Editor.

That’s it for today! If you found this post useful please consider supporting me on Patreon, so I can keep producing this and more content. Cheers!

Become a Patron!

You can unsubscribe from the newsletter at any time, give it a try!

Support my current and future work ^^ As a thank, you will receive exclusive rewards!

Become a Patron!