#Hit VFX Shader Issue

1 messages · Page 1 of 1 (latest)

noble ether
#

I am just trying out shaders for the first time. for a hit feedback to the players.

I made a Flicker and Noise Shader however upon plugging in the material to my Sprite renderer it completely botched the base sprite... how do I implement it so that the Glitch effect on the Sprite is triggered when players click on the collider on the sprite?

noble ether
#

umm... I seem to be unable to post pictures

river flower
#

It's likely that you aren't using the alpha channel of the sprite texture. Make sure you're using a texture property called _MainTex, into Sample Texture 2D and connect its A output to the Alpha port in the master stack

noble ether
#

This is my nodes setup

noble ether
river flower
#

Like I said, the shader needs to sample the sprite texture by using the _MainTex property and Sample Texture 2D node. Connect RGBA output to Base Color and A output to Alpha - can use Multiply to combine with your current alpha result

noble ether
#

I have MainTex as a Texture2d param

river flower
#

Good, but the graph currently isn't using it

noble ether
#

Woahhhh

#

That ....was a mindfuck

#

Holy shitt thank you sooo muchhh!!!!