Recolor Shader Unity
This project demonstrates an example of how to use the Recolor shader developed in Unity's Universal Render Pipeline to recolor a grey scale image using two different colors dynamically. I have made a video, Custom Color Shader! Dynamic Recoloring Explained, which talks through the examples of this project and how the shader works.
This shader was developed as part of the Falling Parkour Project here - https://github.com/nicholas-maltbie/FallingParkour
This project is developed using Unity LTS Release 2021.1.19f1. Install this version of Unity from Unity Hub using this unity hub link unityhub://2021.1.19f1/d0d1bb862f9d
This is an open source project licensed under a MIT License. Feel free to use a build of the project for your own work. If you see an error in the project or have any suggestions, write an issue or make a pull request, I'll happy include any suggestions or ideas into the project.
Samples
Here is a summary of the various examples in this project. Each link provides a tutorial on how part of the shader works and the final link shows the completed shader in action.
- Hello Shaders - Basic Shader introduction.
- Colored Shaders - Create a solid color shader.
- Recoloring Images - Recoloring a black and white image.
- Combining Images - Combining two images together.
- Final Combination - Recoloring a black and white image two different colors.
After going through these tutorials, you will know how to dynamically recolor grey scale using the shaders and materials in this project!
Development
If you want to help with the project, feel free to make some changes and submit a PR to the repo.