Home > Enterprise >  Horizontal gradient over image in Unity?
Horizontal gradient over image in Unity?

Time:01-23

I'm trying to have the sides of an image fade to black, but I can't find a good way to do this manually or in any way other than with a shader graph. I'm looking to apply an effect like this:
enter image description here

to an existing image, but the gradient in the shader graph applies the same color to the whole texture. I'm very new to shaders, so any help would be great. Thanks!

CodePudding user response:

Using Shader Graph you create a gradient example then you add a Texture2D input, use a Texture 2D sampler node and finally combine them with a multiply node.

  • Related