{"id":25352738,"url":"https://github.com/jsoulier/2.5d_lighting","last_synced_at":"2025-07-20T02:37:15.058Z","repository":{"id":268192475,"uuid":"899365908","full_name":"jsoulier/2.5d_lighting","owner":"jsoulier","description":"2.5D lighting model prototype","archived":false,"fork":false,"pushed_at":"2025-02-15T22:38:56.000Z","size":4551,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T12:42:09.898Z","etag":null,"topics":["c","glsl","lighting","obj","sdl","sdl3","shaders"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsoulier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-12-06T05:50:37.000Z","updated_at":"2025-04-05T04:53:17.000Z","dependencies_parsed_at":"2025-01-11T21:30:31.254Z","dependency_job_id":"a105eeec-4149-4baa-9f19-01811dfdddd5","html_url":"https://github.com/jsoulier/2.5d_lighting","commit_stats":null,"previous_names":["jsoulier/2d_lighting_prototype","jsoulier/2.5d_lighting_prototype","jsoulier/2.5d_lighting"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jsoulier/2.5d_lighting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoulier%2F2.5d_lighting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoulier%2F2.5d_lighting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoulier%2F2.5d_lighting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoulier%2F2.5d_lighting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsoulier","download_url":"https://codeload.github.com/jsoulier/2.5d_lighting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsoulier%2F2.5d_lighting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266058481,"owners_count":23870157,"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":["c","glsl","lighting","obj","sdl","sdl3","shaders"],"created_at":"2025-02-14T18:59:22.452Z","updated_at":"2025-07-20T02:37:15.027Z","avatar_url":"https://github.com/jsoulier.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2.5D Lighting\n\n2.5D lighting model prototype.\nCombines a 2.5D and top-down orthographic view to support a large number of point lights with shadows.\nRelies on raycasting instead of rendering from each light source to reduce the number of renders and textures.\n\n![](image.png)\n*Around 20 point lights running at VSync (74 Hz) on integrated AMD Ryzen 7 4700U Graphics*\n\nSteps:\n1. Render the scene from the player view\n2. Render the same scene from a topdown orthographic view using back face culling\n3. Render the same scene from a topdown orthographic view using front face culling\n4. Sample the world space position (ray origin) for each fragment\n5. Walk each ray to each light and cull if between the front and back face\n6. (optional) Add attenuation, blending, SSAO, etc\n\nSee the shader implementation [here](shaders/light.frag)\n\n### Building\n\n#### Windows\n\nInstall the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) for glslc\n\n```bash\ngit clone https://github.com/jsoulier/2.5d_lighting --recurse-submodules\ncd 2.5d_lighting\nmkdir build\ncd build\ncmake ..\ncmake --build . --parallel 8 --config Release\ncd bin\n./2.5d_lighting.exe\n```\n\n#### Linux\n\n```bash\nsudo apt install glslc\n```\n\n```bash\ngit clone https://github.com/jsoulier/2.5d_lighting --recurse-submodules\ncd 2.5d_lighting\nmkdir build\ncd build\ncmake .. -DCMAKE_BUILD_TYPE=Release\ncmake --build . --parallel 8\ncd bin\n./2.5d_lighting\n```\n\n### Bugs\n\n- The screen will be entirely black if there's no lights in the scene","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsoulier%2F2.5d_lighting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsoulier%2F2.5d_lighting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsoulier%2F2.5d_lighting/lists"}