Created
December 2, 2016 21:30
-
-
Save v3c70r/b548d173a4957c468e2f825a71e86aab to your computer and use it in GitHub Desktop.
Plot f(x) or f(y) on screen.
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
float plotX(vec2 st, float pct){ | |
return smoothstep( pct-0.01, pct, st.y) - | |
smoothstep( pct, pct+0.01, st.y); | |
} | |
float plotY(vec2 st, float pct){ | |
return smoothstep( pct - 0.01, pct, st.x) - | |
smoothstep(pct, pct + 0.01, st.x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment