Created
December 19, 2018 18:36
-
-
Save AndrewRayCode/d285ad9392133280507aa650fb144945 to your computer and use it in GitHub Desktop.
This file contains 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
# ----- Given this shader | |
vec4 some_noise_fn() { | |
return vec4(1.0, 2.0, 3.0, 4.0); | |
} | |
void main() { | |
return some_noise_fn(); | |
} | |
# ---- I want to replace some_noise_fn() with another function, so my shader author can | |
experiment generating different types of visual noise. Let's say it's: | |
vec4 other_noise_fn() { | |
return vec4(5.0, 5.0, 5.0, 5.0); | |
} | |
# ---- Here's what the final progam looks like with the function replaced (the hole filled) | |
vec4 some_noise_fn() { | |
return vec4(5.0, 5.0, 5.0, 5.0); | |
} | |
void main() { | |
return some_noise_fn(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment