Skip to content

A custom shader for Unity that reveals an object based on a progress value.

License

Notifications You must be signed in to change notification settings

AnhPham/Reveal-By-Progress-Shader-For-Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reveal By Progress Shader for Unity

Reveal By Progress Shader is a custom shader that reveals an object based on a progress value. It features a clear boundary effect with a customizable color, separating the revealed area from the hidden area. Hidden sections can be filled with a specific color, and the effect is determined by the object’s Y-coordinate. Additional properties such as smoothness, metallic appearance, and boundary thickness allow for flexible customization.

Demo

Basic Usage

1. Parameters

  • Hidden Color: Color of the hidden area
  • Boundary Color: Color of the boundary separating the revealed area from the hidden area
  • Boundary Thickness: Thickness of the boundary.

Demo

2. Set Progress

Add the RevealByProgress component to the game object.

Demo

Set the reference

public RevealByProgress reveal;

Set the reveal progress

reveal.progress = 0.5f;

Render pipeline compatibility

✅ Built-in
❌ URP
❌ HDRP

Unity Version

2022.3.30 or higher. In fact this shader can work on most versions of Unity because it is very simple.

License

This software is released under the MIT License.
You are free to use it within the scope of the license.
However, the following copyright and license notices are required for use.

https://github.com/AnhPham/Reveal-By-Progress-Shader-For-Unity?tab=MIT-1-ov-file

About

A custom shader for Unity that reveals an object based on a progress value.

Resources

License

Stars

Watchers

Forks

Packages

No packages published