Shader Graph Sparkly Shiny Shader

Hey all,

Here is the Shader Graph conversion of the new Sparkly Shiny shader 

Graph is attached, but I'll be going over the steps :)

Fresnel and Gradient

We start with a classic Fresnel effect, using the Normals and the View Direction

Of course, Shader Graph has the handy Fresnel node for this

Gradient Texture

Then project a Gradient Texture over the fresnel


Blending Normals

For more interesting result, blend the normals with a noisy texture before the first Fresnel

Create a Lerp between the noisy normals and the original world normals to control the strength.


Speckles

We're going to do another fresnel, but this time we project a texture normally, and add it to the WorldNormals, this will give a better result for speckles than the BlendNormals way.

The Fresnel result, we are doing it manually this time, because the Fresnel node does things in the wrong order for what we want.

Start with a Dot Product of the specks and the view direction.
Then control the strength of the fresnel with a Power node.

Speck Gradient

Project another Gradient Texture over this fresnel

The stretch float is there to control how often the gradient repeats (if you texture settings are set to repeat)

Cut off the result with a step of the speckFresnel + a standard fresnel, the standard fresnel gets added otherwise we lose a bunch of color from the SpeckGradient.

Multiply this with the Specks Gradient result

Fake Specular

Start with a dot product of the View Direction and the Light Direction added together

For the Light Direction, we need to make a Custom Function node!

Here is the custom node code:

#ifdef SHADERGRAPH_PREVIEW
lightDir = float3(0.5,0.5,0.5);
#else
Light light = GetMainLight();
ightDir = light.direction;
#endif

You have to add a Vector3 Output for this to work, make sure that the name of this vector is the same as is used in the code.

half d = dot(o.Normal, normalize(IN.lightDir + IN.viewDir));

Cutoff

Then Step through it for a nice hard edge

Masking


Finally you can add an optional mask, so you can control where the Main Gradient, Speckles, and Specular appear.

I've set it up so that the Red channel is Main Gradient, Green channel is Speckles, and Blue channel is Specular

A bit messy, but here are the Mask, and the channel multiplications

Then add in a main texture at the end


Full Image of Graph 

Example, Lizard Mat Settings:


Get more from Minions Art

168
Unlock 168 exclusive posts
Be part of the community
Connect via private message

Minions Art

creating Game Art Tips and Astro Kat, a Catventure game!

Minions Art

creating Game Art Tips and Astro Kat, a Catventure game!

Tiers
Proto Star
€0.86 per month
Reward
Thank you so much for your support!

  • Email Updates on tutorials, tips and devlogs
  • Discord supporter role
Includes Discord benefits
Neutron Star
€4.30 per month
Reward
All of the Proto Star rewards, plus:

  • Suggest themes for future tutorials
  • Collection of Astro Kat concept art, gifs, and screenshots (will release more as game progresses)
Includes Discord benefits
Bright Giant Star
€8.60 per month
Reward
All of the Neutron Star rewards, plus:

  • Access to the files used in the tutorials
  • Some extra samples or explanation with the tutorials
Includes Discord benefits
Supergiant Star
€25.80 per month
Reward
All of the Bright Giant Star rewards, plus:

  • Special thanks in the credits of Astro Kat
  • I will send you a package of smaller merchandise (stickers, pins, cards, mugs) of Astro Kat if you've been a Supergiant Star for at least a month
Includes Discord benefits
Recent Posts