{"id":41425921,"url":"https://github.com/zeozeozeo/rafx","last_synced_at":"2026-01-23T14:16:15.554Z","repository":{"id":331617941,"uuid":"1125907404","full_name":"zeozeozeo/rafx","owner":"zeozeozeo","description":"Rafx is a C/C++ graphics abstraction library designed around modern graphics workflows.","archived":false,"fork":false,"pushed_at":"2026-01-10T11:14:55.000Z","size":1519,"stargazers_count":3,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T03:35:16.891Z","etag":null,"topics":["abstraction","c-api","d3d12","gpu","graphics","graphics-abstraction","graphics-api","graphics-programming","render-interface","rhi","vulkan"],"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/zeozeozeo.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-31T16:06:49.000Z","updated_at":"2026-01-10T11:14:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zeozeozeo/rafx","commit_stats":null,"previous_names":["zeozeozeo/rafx"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zeozeozeo/rafx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frafx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frafx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frafx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frafx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeozeozeo","download_url":"https://codeload.github.com/zeozeozeo/rafx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Frafx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28693754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["abstraction","c-api","d3d12","gpu","graphics","graphics-abstraction","graphics-api","graphics-programming","render-interface","rhi","vulkan"],"created_at":"2026-01-23T14:16:13.389Z","updated_at":"2026-01-23T14:16:15.543Z","avatar_url":"https://github.com/zeozeozeo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rafx\n\nRafx is a C graphics abstraction library designed around modern graphics workflows.\n\nIt is based on the [NVIDIA Render Interface (NRI)](https://github.com/NVIDIA-RTX/NRI).\n\n## Features\n\n- Fully bindless rendering approach (no CPU bindgroups, descriptor sets, ...)\n- Automatic tracking of resource states, barrier placement and transitions\n- Full parity between Vulkan, D3D12 and Metal (through MoltenVK/KosmicKrisp)\n- Support for [Enhanced Barriers](https://microsoft.github.io/DirectX-Specs/d3d/D3D12EnhancedBarriers.html) on DirectX 12 Ultimate\n- Built-in windowing (using [RGFW](http://github.com/ColleagueRiley/RGFW), GLFW or SDL3), fully cross-platform\n- Built-in support for [NRD](https://github.com/NVIDIA-RTX/NRD) denoisers (ReBLUR, ReLAX, Sigma) `rfxCmdDenoise`\n- Native integration with the [Slang](https://shader-slang.org/) shader language\n- Graphics, compute, raytracing and mesh shaders\n- Support for hardware RT and opacity micromaps\n- Support for common upscalers (NVIDIA DLSS, AMD FSR, Intel XeSS, NVIDIA DLSS Ray Reconstruction, NIS)\n- `printf` inside shaders, toggleable hot-reloading `rfxWatchShader`\n- Suitable for tile-based rendering architectures\n- Tight integration with AMD's Virtual Memory Allocator (VMA) for Vulkan and D3D12 for optimal memory reuse\n- Async compute (parallel execution of graphics and compute workloads)\n- Variable rate shading (VRS) support\n- MSAA, anisotropic filtering, mipmapping and BCn texture compression with a simple toggle\n- Multidraw\n- Occlusion queries\n- Low latency support (aka NVIDIA Reflex)\n- GPU profiler, timeline annotations (GAPI, Nsight, PIX), resource naming\n- ImGui extension `rfxCmdDrawImGui`\n- Shader cache / precompilation\n- Honored user-provided memory allocator\n- Lots of [examples](./examples) to get you started\n\n## Examples\n\n| \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/async_compute_d68YXxjvO3.png\" width=\"1280\" height=\"720\" alt=\"async compute\"\u003e       | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/bloom_fr433htUlT.png\" width=\"1280\" height=\"720\" alt=\"bloom\"\u003e                     | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/compute_boids_IWEF7MMLaN.png\" width=\"1280\" height=\"720\" alt=\"compute boids\"\u003e |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [async compute](./examples/async_compute.cc)                                                                                                                                                | [bloom](./examples/bloom.cc)                                                                                                                                                              | [compute boids](./examples/compute_boids.cc)                                                                                                                                          |\n| \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/compute_triangle_w6ryKPRoxT.png\" width=\"1280\" height=\"720\" alt=\"compute triangle\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/compute_voronoi_HdWdvFuSgU.png\" width=\"1280\" height=\"720\" alt=\"compute voronoi\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/cube_gEw25ZCHEE.png\" width=\"1280\" height=\"720\" alt=\"cube\"\u003e                   |\n| [compute triangle](./examples/compute_triangle.cc)                                                                                                                                          | [compute voronoi](./examples/compute_voronoi.cc)                                                                                                                                          | [cube](./examples/cube.cc)                                                                                                                                                            |\n| \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/denoise_dG7tVi9DQC.png\" width=\"1280\" height=\"720\" alt=\"denoise\"\u003e                   | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/hot_reloading_JU4rDmpI1z.png\" width=\"1280\" height=\"720\" alt=\"hot reloading\"\u003e     | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/low_latency_eMI8kwVvFq.png\" width=\"1280\" height=\"720\" alt=\"low latency\"\u003e     |\n| [denoise](./examples/denoise.cc)                                                                                                                                                            | [hot reloading](./examples/hot_reloading.cc)                                                                                                                                              | [low latency](./examples/low_latency.cc)                                                                                                                                              |\n| \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/mesh_triangle_LfwStysBtQ.png\" width=\"1280\" height=\"720\" alt=\"mesh triangle\"\u003e       | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/rt_boxes_FwuUFARfv0.png\" width=\"1280\" height=\"720\" alt=\"rt boxes\"\u003e               | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/rt_triangle_2m6QuGMHF5.png\" width=\"1280\" height=\"720\" alt=\"rt triangle\"\u003e     |\n| [mesh triangle](./examples/mesh_triangle.cc)                                                                                                                                                | [rt boxes](./examples/rt_boxes.cc)                                                                                                                                                        | [rt triangle](./examples/rt_triangle.cc)                                                                                                                                              |\n| \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/shadow_mapping_wNZoIGlDXu.png\" width=\"1280\" height=\"720\" alt=\"shadow mapping\"\u003e     | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/texcube_icehFTknYv.png\" width=\"1280\" height=\"720\" alt=\"texcube\"\u003e                 | \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/triangle_2DgAXnLSTO.png\" width=\"1280\" height=\"720\" alt=\"triangle\"\u003e           |\n| [shadow mapping](./examples/shadow_mapping.cc)                                                                                                                                              | [texcube](./examples/texcube.cc)                                                                                                                                                          | [triangle](./examples/triangle.cc)                                                                                                                                                    |\n| \u003cimg src=\"https://raw.githubusercontent.com/zeozeozeo/media/f2a484a84b4bfa33d195455f7a8ad72f49fc0dea/opt/upscaler_msJQEipQIS.png\" width=\"1280\" height=\"720\" alt=\"upscaler\"\u003e                 |                                                                                                                                                                                           |                                                                                                                                                                                       |\n| [upscaler](./examples/upscaler.cc)                                                                                                                                                          |                                                                                                                                                                                           |                                                                                                                                                                                       |\n\nA triangle:\n\n```c\n#include \u003crafx.h\u003e\n\n// minified for readme sake\nconst char* src = \"struct V { float3 p:POSITION; float4 c:COLOR; }; \"\n                  \"struct O { float4 p:SV_Position; float4 c:COLOR; }; \"\n                  \"[shader(\\\"vertex\\\")] O vs(V i) { O o; o.p=float4(i.p,1); o.c=i.c; return o; } \"\n                  \"[shader(\\\"fragment\\\")] float4 ps(O i):SV_Target { return i.c; }\";\n\nstruct Vertex {\n    float x, y, z, r, g, b, a;\n};\n\nint main() {\n    rfxOpenWindow(\"Rafx\", 1280, 720);\n\n    struct Vertex data[] = { { 0, .5, 0, 1, 0, 0, 1 }, { .5, -.5, 0, 0, 1, 0, 1 }, { -.5, -.5, 0, 0, 0, 1, 1 } };\n    RfxBuffer vb = rfxCreateBuffer(sizeof(data), sizeof(data[0]), RFX_USAGE_VERTEX_BUFFER, RFX_MEM_GPU_ONLY, data);\n    RfxShader s = rfxCompileShaderMem(src, NULL, 0, NULL, 0);\n\n    RfxVertexLayoutElement layout[] = { { 0, RFX_FORMAT_RGB32_FLOAT, 0, \"POSITION\" }, { 1, RFX_FORMAT_RGBA32_FLOAT, 12, \"COLOR\" } };\n    RfxPipeline pip = rfxCreatePipeline(\u0026(RfxPipelineDesc){\n        .shader = s,\n        .vertexLayout = layout,\n        .vertexLayoutCount = 2,\n        .colorFormat = rfxGetSwapChainFormat(),\n        .vertexStride = sizeof(struct Vertex),\n    });\n\n    while (!rfxWindowShouldClose()) {\n        rfxBeginFrame();\n        RfxCommandList cmd = rfxGetCommandList();\n\n        rfxCmdBeginSwapchainRenderPass(cmd, RFX_FORMAT_UNKNOWN, RFX_COLOR(20, 20, 20, 255));\n        rfxCmdBindPipeline(cmd, pip);\n        rfxCmdBindVertexBuffer(cmd, vb);\n        rfxCmdDraw(cmd, 3, 1);\n        rfxCmdEndRenderPass(cmd);\n\n        rfxEndFrame();\n    }\n\n    rfxDestroyPipeline(pip);\n    rfxDestroyShader(s);\n    rfxDestroyBuffer(vb);\n\n    return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeozeozeo%2Frafx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeozeozeo%2Frafx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeozeozeo%2Frafx/lists"}