Created
August 22, 2015 18:22
-
-
Save unitycoder/f0b0074ed3679caf6717 to your computer and use it in GitHub Desktop.
Threshold color values in Shader
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
// https://github.com/genekogan/Processing-Shader-Examples/blob/master/TextureShaders/data/threshold.glsl | |
float bright = 0.33333 * (color.r + color.g + color.b); | |
float b = lerp(0.0, 1.0, step(0.1, bright)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment