{"id":20708368,"url":"https://github.com/weakknight/shadercompiler","last_synced_at":"2026-03-07T18:32:32.531Z","repository":{"id":132492358,"uuid":"417860611","full_name":"WeakKnight/ShaderCompiler","owner":"WeakKnight","description":"a Slang Compiler wrapper","archived":false,"fork":false,"pushed_at":"2021-11-11T08:52:10.000Z","size":13263,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T05:30:06.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HLSL","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/WeakKnight.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":"2021-10-16T14:58:43.000Z","updated_at":"2021-11-11T08:52:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"312b7729-35ac-451e-982b-112b90b7c861","html_url":"https://github.com/WeakKnight/ShaderCompiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WeakKnight/ShaderCompiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeakKnight%2FShaderCompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeakKnight%2FShaderCompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeakKnight%2FShaderCompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeakKnight%2FShaderCompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WeakKnight","download_url":"https://codeload.github.com/WeakKnight/ShaderCompiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeakKnight%2FShaderCompiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30226247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T18:12:09.766Z","status":"ssl_error","status_checked_at":"2026-03-07T18:11:58.786Z","response_time":53,"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":[],"created_at":"2024-11-17T01:30:51.460Z","updated_at":"2026-03-07T18:32:32.513Z","avatar_url":"https://github.com/WeakKnight.png","language":"HLSL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShaderCompiler\n\nShaderCompiler is a wrapper of [Slang](https://github.com/shader-slang/slang).\n\n## Features\n* Slang To HLSL\n* Slang To DXIL\n* Reflection API\n\n## Examples\n### Slang\n```\ncbuffer CB\n{\n    int frameIndex;\n    int bufferSize;\n}\n\nStructuredBuffer\u003cfloat\u003e buffer0;\nStructuredBuffer\u003cfloat\u003e buffer1;\nRWStructuredBuffer\u003cfloat\u003e result;\nStructuredBuffer\u003cfloat4\u003e bufferArray[_BUFFER_SIZE];\n\n[numthreads(16,16,1)]\nvoid main(uint3 threadId : SV_DispatchThreadID)\n{\n    uint index = threadId.x;\n    result[index] = buffer0[index] + buffer1[index];\n}\n```\n### C++\n```\nauto compiler = shc::Compiler();\ncompiler.AddSearchPath(\"include/\");\n\nshc::DefineList defines;\ndefines.AddDefine(\"_BUFFER_SIZE\", \"42\");\n\nstd::shared_ptr\u003cshc::Compiler::Result\u003e result = compiler.Compile(\"shader.hlsl\", \"main\", \"cs_6_5\", defines, shc::Compiler::Target::DXIL);\n\n// Reflection Information\nassert(result-\u003evariables[\"bufferArray\"].count == 42);\n\n// Binary\nassert(result-\u003edata != nullptr);\nassert(result-\u003esize \u003e 0);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakknight%2Fshadercompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweakknight%2Fshadercompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakknight%2Fshadercompiler/lists"}