Created
February 7, 2020 04:39
-
-
Save Taremin/1695472b5dafe7fb373f741adbd1cfd0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shader hue_shift ( | |
| float Hue = 0.0, | |
| float Scale = 1.0, | |
| output float Highlight = 0.0, | |
| output float Shadow = 0.0 | |
| ) { | |
| float tmp = Hue * 3; | |
| Shadow = ((round(tmp) - tmp) * Scale + tmp) / 3.0; | |
| Highlight = ((floor(tmp) + 0.5 - tmp) * Scale + tmp) / 3.0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment