{"id":20698415,"url":"https://github.com/ngynkvn/wasm-raytracer","last_synced_at":"2026-04-24T23:32:24.454Z","repository":{"id":112427110,"uuid":"219400999","full_name":"ngynkvn/wasm-raytracer","owner":"ngynkvn","description":"Simple ray tracer based off an online guide. Built with WebAssembly. [Demo inside]","archived":false,"fork":false,"pushed_at":"2021-07-15T18:55:23.000Z","size":47,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-13T12:48:35.524Z","etag":null,"topics":["beginner","cpp","emscripten","graphics","raytracer","rendering","wasm","webassembly"],"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/ngynkvn.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}},"created_at":"2019-11-04T02:28:45.000Z","updated_at":"2022-02-21T15:37:56.000Z","dependencies_parsed_at":"2023-05-14T19:45:26.413Z","dependency_job_id":null,"html_url":"https://github.com/ngynkvn/wasm-raytracer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ngynkvn/wasm-raytracer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngynkvn%2Fwasm-raytracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngynkvn%2Fwasm-raytracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngynkvn%2Fwasm-raytracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngynkvn%2Fwasm-raytracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngynkvn","download_url":"https://codeload.github.com/ngynkvn/wasm-raytracer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngynkvn%2Fwasm-raytracer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32245118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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":["beginner","cpp","emscripten","graphics","raytracer","rendering","wasm","webassembly"],"created_at":"2024-11-17T00:24:36.130Z","updated_at":"2026-04-24T23:32:24.439Z","avatar_url":"https://github.com/ngynkvn.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raytracer 🔴\n\nBased off https://www.gabrielgambetta.com/computer-graphics-from-scratch/introduction.html\n\nPlay with at https://unhealthy-vacation.surge.sh\n\n\u003cimg src=https://user-images.githubusercontent.com/20323081/68098609-9974f900-fe8b-11e9-9ee7-ed1291d64993.png alt=\"Sample render\" width=300px/\u003e\n\nRequires LibPNG and png++ to run.\n\nUsed _Emscripten / WASM_ and _Vue.js_ for web rendering\n\nUsed _C++_ and _LibPNG / png++_ for image rendering\n\nRaytracing is implemented C++ and compiled with the Emscripten toolchain to permit running on web.\n\n## To run\n```\nmkdir -p build\n\ncd build\n\ncmake ../\n\nmake\n```\nOutputs a binary named raytracer.\n\nRun with `./raytracer \u003c test.scene`\n\n## Web assembly\nHave the Emscripten SDK tools available to use from your terminal and simply run the two commands below: \n```\nmake\nmake run\n```\nShould be viewable at [localhost:8080](localhost:8080)\n\n### Technical details\n\nThis is kind of a hodgepodge of a lot of things that I was interested in playing with including but not limited to:\n\n- Raytracing and computer graphics\n- Javascript Canvas API's \n- VueJS\n- Communication and messaging between different programming environments / processes.\n- Parsing data into usable data structures.\n\n## Todo\n- 🚧 Add parameterization (both from command line and JS environment).\n- ✔️ Make a DSL for specifying the scene to render. \n- 🤔 Encoding + Decoding schemes\n- 🤔 Comparing different ways of wasm - native communications and performance benchmarking.\n  - Compare speeds between native + wasm as rendering complexity increases (will need to enable flags for rendering techniques to use)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngynkvn%2Fwasm-raytracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngynkvn%2Fwasm-raytracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngynkvn%2Fwasm-raytracer/lists"}