Created
March 29, 2021 07:33
-
-
Save Iainmon/d02b02e2a698876e2d54bfeaebf500e6 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
| #include "lib/runtime.glsl" | |
| float sierpinski(int x, int y) { | |
| return (x & y) == 0 ? 0.0 : 1.0; | |
| } | |
| void program(inout vec3 color) { | |
| vec2 pos = gl_FragCoord; | |
| float pixel = sierpinski(int(pos.x), int(pos.y)); | |
| color = vec3(pixel); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment