{"id":13731685,"url":"https://github.com/chaoticbob/tinyrenderers","last_synced_at":"2025-12-29T23:45:11.577Z","repository":{"id":15528330,"uuid":"77811934","full_name":"chaoticbob/tinyrenderers","owner":"chaoticbob","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-13T08:51:24.000Z","size":9297,"stargazers_count":471,"open_issues_count":11,"forks_count":27,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-11-14T22:35:38.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/chaoticbob.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}},"created_at":"2017-01-02T05:02:57.000Z","updated_at":"2024-10-23T05:10:22.000Z","dependencies_parsed_at":"2023-01-11T20:23:33.267Z","dependency_job_id":null,"html_url":"https://github.com/chaoticbob/tinyrenderers","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/chaoticbob%2Ftinyrenderers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaoticbob%2Ftinyrenderers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaoticbob%2Ftinyrenderers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaoticbob%2Ftinyrenderers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaoticbob","download_url":"https://codeload.github.com/chaoticbob/tinyrenderers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253008352,"owners_count":21839635,"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":[],"created_at":"2024-08-03T02:01:35.860Z","updated_at":"2025-12-29T23:45:11.551Z","avatar_url":"https://github.com/chaoticbob.png","language":"C++","readme":"# tinyrenderers\n\n### Single header implemenations of Vulkan and D3D12 renderers\n\n#### Features\n - Single header for Vulkan renderer\n - Single header for D3D12 renderer\n - Texture upload + mipmap generation (better quality resizer coming soon)\n - Simplified API shared between both renderers\n - C style structs\n - Support for Vulkan layers\n - Configurable swapchain multi-sample\n - Configurable swapchain imagecount\n - Configurable swapchain depth/stencil attachment\n - Samples use GLFW\n   - GLFW\n     - Works for both Vulkan and D3D12 - renderer takes over after window handle is obtained\n     - Image loading done via [stb_image](https://github.com/nothings/stb)\n - Includes basic compute samples\n - Uses CMake \n - ...more to come soon\n\n#### Notes\n - Linux and Windows only for the moment\n   - Tested on open source intel driver on Linux\n   - Tested on AMD and NVIDIA drivers on Windows\n   - For best results, use latest drivers\n - Vulkan renderer will work with C/C++\n   - For best results, use latest version of Vulkan SDK\n - D3D12 render requires C++\n - Microsoft's C compiler doesn't support certain C11/C99 features, such as VLAs (so alot of awkward array handling)\n - tinyvk/tinydx is written for experimentation and fun-having - not performance\n - For simplicity, only one descriptor set can be bound at once\n   - In D3D12, this means two descriptor heaps (CBVSRVUAVs and samplers)\n   - For Vulkan shaders the 'set' parameter for 'layout' should always be 0\n   - For D3D12 shaders the 'space' parameter for resource bindings should always be 0\n - Vulkan like idioms are used primarily with some D3D12 wherever it makes sense\n - For Vulkan, host visible means both HOST VISIBLE and HOST COHERENT\n - Bring your own math libraary\n - Development was done on Cinder but renderers are not limited to it\n\n#### Compiling and Linking\nIn one C/C++ file that #includes the renderer's header file, do this:\n```\n#define TINY_RENDERER_IMPLEMENTATION\n#include \"tinyvk.h\"\n```\nor\n```\n#define TINY_RENDERER_IMPLEMENTATION\n#include \"tinydx.h\"\n```\n#### Building on Linux\n```\ngit clone --recursive git@github.com:chaoticbob/tinyrenderers.git\ncd tinyrenderers\nmkdir build\ncd build\ncmake ..\nmake\n```\nUbuntu and variants will require the follow packages\n```\nlibxrandr-dev libxinerama-dev libxcursor-dev libxi-dev\n```\n\n\n#### Building on Windows\n```\ngit clone --recursive git@github.com:chaoticbob/tinyrenderers.git\ncd tinyrenderers\nmkdir build\ncd build\ncmake -G \"Visual Studio 14 2015 Win64\" ..\n```\nOpen ```tinyrenderers.sln``` and go\n\n#### Screenshots\n![](https://github.com/chaoticbob/tinyrenderers/blob/master/screenshots/tr-004.png?raw=true)\n![](https://github.com/chaoticbob/tinyrenderers/blob/master/screenshots/tr-003.png?raw=true)\n![](https://github.com/chaoticbob/tinyrenderers/blob/master/screenshots/tr-001.png?raw=true)\n![](https://github.com/chaoticbob/tinyrenderers/blob/master/screenshots/tr-002.png?raw=true)\n\n\n### Change Log\n[2017/11/12] - Added simple tessellation shader sample. Fixed misc issues with pipeline setup for tessellation.\n[2017/11/10] - Added ChessSet demo. Added geometry shader sample. Fixes to depth stencil handling.\n[2017/11/10] - Added TexturedCube sample. Updated depth attachment handling on swapchain render pass. Switched out lc_image for stb_image. Added DXC shader build script.\n[2017/05/27] - Fixed some annoying buffer state transitions. Added build script for shaders. Updated shader naming convention to be more exact. Added OpaqueArgs and PassingArrays for investigation.\u003cbr\u003e\n[2017/05/20] - Updated Append/Consume sample for Vulkan. Requires latest glslang. ConstantBuffer also works for both platforms.\u003cbr\u003e\n[2017/05/13] - Added Linux support. Moved to project files to cmake. Moved glsl shaders to glsl sub directory - forcing HLSL for now.\u003cbr\u003e\n[2017/04/30] - Clarified shader usage in some sample programs to point out which source they're coming from.\u003cbr\u003e\n[2017/04/27] - Added ConstantBuffer sample (D3D12 only for now). Updated Vulkan samples to use negative viewport height.\u003cbr\u003e\n[2017/04/25] - Updated SimpleCompute and StructuredBuffer to work on Vulkan.\u003cbr\u003e\n[2017/04/24] - Added compute samples (D3D12 only for now). One for simple compute and another for structured buffers.\n","funding_links":[],"categories":["Graphics","Samples"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaoticbob%2Ftinyrenderers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaoticbob%2Ftinyrenderers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaoticbob%2Ftinyrenderers/lists"}