{"id":17216982,"url":"https://github.com/jsyrjala/zraytrace","last_synced_at":"2025-03-25T13:44:29.852Z","repository":{"id":66515358,"uuid":"300828902","full_name":"jsyrjala/zraytrace","owner":"jsyrjala","description":"Raytracing implemented in Zig language","archived":false,"fork":false,"pushed_at":"2021-10-03T19:08:45.000Z","size":3930,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T12:46:48.626Z","etag":null,"topics":["raytracing","raytracing-in-one-weekend","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsyrjala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-10-03T08:05:34.000Z","updated_at":"2022-02-21T01:11:20.000Z","dependencies_parsed_at":"2023-02-20T23:45:16.040Z","dependency_job_id":null,"html_url":"https://github.com/jsyrjala/zraytrace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsyrjala%2Fzraytrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsyrjala%2Fzraytrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsyrjala%2Fzraytrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsyrjala%2Fzraytrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsyrjala","download_url":"https://codeload.github.com/jsyrjala/zraytrace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245474889,"owners_count":20621495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["raytracing","raytracing-in-one-weekend","zig"],"created_at":"2024-10-15T03:42:57.491Z","updated_at":"2025-03-25T13:44:29.817Z","avatar_url":"https://github.com/jsyrjala.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zraytrace\n\nRay tracing implemented in [Zig](https://ziglang.org/).\n\n## Inspiration\n\nCode follows mostly [Ray Tracing in One Weekend](https://raytracing.github.io/) and [Physically Based Rendering](http://www.pbr-book.org/). \n\n## Features\n\nSingle threaded, uses only on CPU.\n\nMaterials:\n- diffuse (matte)\n- metal (fully reflective)\n- dielectric (glass like objects)\n\nShapes\n- sphere\n- triangle\n\nTextures:\n- constant color\n- image textures\n\nAlgorithms\n- Bounded volume hierarchy\n\nFile formats:\n- PNG images, read and write\n- OBJ 3d models, read\n\n# Examples\n\n## Spheres\n\nThis doesn't use bounded volume hierarchy because its overhead is too big for scene with 7 spheres.\n\n![7 spheres with various materials and textures](https://github.com/jsyrjala/zraytrace/raw/master/showcase/7-spheres.png)\n\nFrom the left:\n- reflective texture mapped sphere (earth)\n- hollow dielectric sphere (glass)\n- diffuse texture mapped sphere (Nitor logo)\n- filled dielectric sphere (glass)\n- reflective sphere with silver color (mirror ball)\n- diffuse green sphere (ground level)\n\nSome statistics\n- Surfaces:                 7\n- Pixels:                   1000x1000\n- Samples per pixel:        1000\n- Max recursion depth:      30\n- Total reflections:     1144753226\n- Total background hits: 999892115\n- Total pixels:          1000000\n- Total samples:         1000000000\n- Total rays:            2144645362\n- Total reflections:     1144753226\n- Pixels per second:     1619.68 pixels/s\n- Total runtime:         617.41 seconds\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsyrjala%2Fzraytrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsyrjala%2Fzraytrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsyrjala%2Fzraytrace/lists"}