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.

Question Fill Shader

Discussion in 'Shader Graph' started by stroibot, Aug 1, 2021.

  1. stroibot

    stroibot

    Joined:
    Feb 15, 2017
    Posts:
    63
    Hi, I'm trying to recreate shader that behaves like Fill Image in UI.

    Here's URP Unlit shader:


    Basically, I'm almost successful considering that I'm not good at shaders.

    But there's a problem. I want to limit my output to alpha to be only either 0 or 1, because the result is grayscale which produces unwanted looks. So, Floor it is! No? Step? No? Look what it produces, that strange pink epilepsy.

    Can somebody help me so this doesn't happen?

    Thanks!
     
  2. stroibot

    stroibot

    Joined:
    Feb 15, 2017
    Posts:
    63
    Ok, I've managed to create radial fill shader
     
unityunity