Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Shader with gradient to transparent effect.

Discussion in 'Shaders' started by coxy17, Dec 31, 2015.

  1. coxy17

    coxy17

    Joined:
    Sep 27, 2013
    Posts:
    126
    Hi

    I trying to create a similar effect to the attached screenshot of a rectangle object with a semi transparent going to a transparent (at the furthest point) like a gradient but with a slight glow to the actual base object separate. I cant explain very well so the image attached might help. What type of shader do i need?

    Its for a android game so need to work well for mobile.

    Cheers

    Nick
     

    Attached Files:

  2. StevenGerrard

    StevenGerrard

    Joined:
    Jun 1, 2015
    Posts:
    97
    I have made a similar effect in my package Volumetric Spot Light.
    Here is some suggestion:
    => First you need a cube mesh with transparent material.
    => Then I think "Blend One One" maybe ok for your demand since you need "a slight glow".
    => The key is, find a way to gradient alpha value of your cube. As your picture more far away from the plane will have a less alpha value.