{"id":22886909,"url":"https://github.com/michael-0acf4/ray0","last_synced_at":"2026-02-25T10:34:09.407Z","repository":{"id":46880806,"uuid":"502450587","full_name":"michael-0acf4/ray0","owner":"michael-0acf4","description":"A simple GLSL-like renderer on the terminal.","archived":false,"fork":false,"pushed_at":"2025-11-22T15:23:05.000Z","size":441,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-22T17:23:29.878Z","etag":null,"topics":["3d","ascii-graphics","blackhole","console","fragment-shaders","parallel-computing","ray-marching","rendering","sdf"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michael-0acf4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-11T20:33:43.000Z","updated_at":"2025-11-22T15:23:10.000Z","dependencies_parsed_at":"2024-06-16T12:51:13.106Z","dependency_job_id":"84fdda7a-d44b-47e4-abee-81fac5c4687b","html_url":"https://github.com/michael-0acf4/ray0","commit_stats":null,"previous_names":["michael-0acf4/quick-ray-marching","afmika/quick-ray-marching","michael-0acf4/ray0"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michael-0acf4/ray0","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-0acf4%2Fray0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-0acf4%2Fray0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-0acf4%2Fray0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-0acf4%2Fray0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michael-0acf4","download_url":"https://codeload.github.com/michael-0acf4/ray0/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-0acf4%2Fray0/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29817840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","ascii-graphics","blackhole","console","fragment-shaders","parallel-computing","ray-marching","rendering","sdf"],"created_at":"2024-12-13T20:28:41.112Z","updated_at":"2026-02-25T10:34:09.392Z","avatar_url":"https://github.com/michael-0acf4.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ray0\n\nA GLSL-like renderer on the terminal.\n\n![screenshot](screenshots/cover.png)\n\n## Examples\n\n```bash\n# Color gradient test program\nmake gradient\n\n# Simple sphere\nmake sphere\n\n# Raymarch a rotating donut\nmake donut\n\n# Raymarch a rotating 3d object\nmake composition\n\n# Blackhole\nmake blackhole\n```\n\n## Usage\n\nThe shader function works the same as a typical GLSL fragment shader with the\nmain exception of `fragColor`, which is unidimensional instead of being a vec4\n(but still normalized).\n\nThe function will run on each fragment from left to right and top to bottom.\n\nHere is a basic test program\n\n```cpp\n#include \"ray0.hpp\"\n\nconst vec2 iResolution = {25, 25};\n\nvoid shaderUVTest(float \u0026fragColor, const vec2 \u0026fragCoord) {\n  const vec2 uv = (fragCoord - 0.5 * iResolution) / iResolution.y;\n\n  if (sqrt(uv.x * uv.x + uv.y * uv.y) \u003c .4) {\n    float one = 0.25, two = 0.5, three = 0.75, four = 1.;\n    if (fragCoord.x \u003e iResolution.x / 2) {\n      fragColor = fragCoord.y \u003e iResolution.y / 2 ? one : two;\n    } else {\n      fragColor = fragCoord.y \u003e iResolution.y / 2 ? three : four;\n    }\n  }\n}\n\nint main() {\n  Engine engine(iResolution);\n  engine.update(shaderUVTest, 4);\n  engine.render(\"3210 \");\n\n  return 0;\n}\n```\n\n![alt text](screenshots/divided-circle.png)\n\nYou can test the equivalent GLSL code\n[here](https://www.shadertoy.com/view/lc3BWl).\n\n```glsl\nvoid mainImage( out vec4 fragColor, in vec2 fragCoord )\n{\n    vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n    float col = 0.;\n    if (length(uv) \u003c 0.4) {\n        float one = 0.25, two = 0.5, three = 0.75, four = 1.0;\n        if (fragCoord.x \u003e iResolution.x / 2.) {\n            col = fragCoord.y \u003e iResolution.y / 2.0 ? one : two;\n        } else {\n            col = fragCoord.y \u003e iResolution.y / 2.0 ? three : four;\n        }\n    }\n\n    fragColor = vec4(col, col, col, 1.);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael-0acf4%2Fray0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichael-0acf4%2Fray0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael-0acf4%2Fray0/lists"}