Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CharStiles/698d7eebd1c3739f9c566446dcd1c058 to your computer and use it in GitHub Desktop.
Save CharStiles/698d7eebd1c3739f9c566446dcd1c058 to your computer and use it in GitHub Desktop.
float scene(vec3 pos){
float s = length(pos) - 0.4;
return s;
}
void main() {
vec2 uv = uv();
vec3 rayOrigin = vec3(uv, 0.0);
vec4 color = vec4(scene(rayOrigin));
gl_FragColor = color;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment