{"id":13731895,"url":"https://github.com/Unity-Technologies/HLSLcc","last_synced_at":"2025-05-08T05:31:51.150Z","repository":{"id":37742903,"uuid":"73893213","full_name":"Unity-Technologies/HLSLcc","owner":"Unity-Technologies","description":"DirectX shader bytecode cross compiler","archived":false,"fork":false,"pushed_at":"2024-07-16T06:51:44.000Z","size":692,"stargazers_count":878,"open_issues_count":29,"forks_count":126,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-04-09T06:08:26.095Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Unity-Technologies.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":"2016-11-16T07:01:58.000Z","updated_at":"2025-04-07T15:19:28.000Z","dependencies_parsed_at":"2024-09-22T10:01:13.091Z","dependency_job_id":"34fbb99b-082f-4014-9c05-647fa46eb39a","html_url":"https://github.com/Unity-Technologies/HLSLcc","commit_stats":{"total_commits":25,"total_committers":9,"mean_commits":"2.7777777777777777","dds":0.64,"last_synced_commit":"3ea1fcd6bd0ac445bc078de0bf32f0950188577b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unity-Technologies%2FHLSLcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unity-Technologies%2FHLSLcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unity-Technologies%2FHLSLcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unity-Technologies%2FHLSLcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Unity-Technologies","download_url":"https://codeload.github.com/Unity-Technologies/HLSLcc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253008804,"owners_count":21839700,"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:40.914Z","updated_at":"2025-05-08T05:31:46.647Z","avatar_url":"https://github.com/Unity-Technologies.png","language":"C++","readme":"# HLSLcc\nDirectX shader bytecode cross compiler.\n\nOriginally based on https://github.com/James-Jones/HLSLCrossCompiler.\n\nThis library takes DirectX bytecode as input, and translates it into the following languages:\n- GLSL (OpenGL 3.2 and later)\n- GLSL ES (OpenGL ES 2.0 and later)\n- GLSL for Vulkan consumption (as input for Glslang to generate SPIR-V)\n- Metal Shading Language\n\nThis library is used to generate all shaders in Unity for OpenGL, OpenGL ES 3.0+, Metal and Vulkan.\n\nChanges from original HLSLCrossCompiler:\n- Codebase changed to C++11, with major code reorganizations.\n- Support for multiple language output backends (currently ToGLSL and ToMetal)\n- Metal language output support\n- Temp register type analysis: In DX bytecode the registers are typeless 32-bit 4-vectors. We do code analysis to infer the actual data types (to prevent the need for tons of bitcasts).\n- Loop transformation: Detect constructs that look like for-loops and transform them back to their original form\n- Support for partial precision variables in HLSL (min16float etc). Do extra analysis pass to infer the intended precision of samplers.\n- Reflection interface to retrieve the shader inputs and their types.\n- Lots of workarounds for various driver/shader compiler bugs.\n- Lots of minor fixes and improvements for correctness\n- Lots of Unity-specific tweaks to allow extending HLSL without having to change the D3D compiler itself.\n\n## Note\n\nThis project is originally integrated into the Unity build systems. However, building this library should be fairly straightforward: just compile `src/*.cpp` (in C++11 mode!) and `src/cbstring/*.c` with the following include paths:\n\n- include\n- src/internal_includes\n- src/cbstrinc\n- src \n\nAlternatively, a CMakeLists.txt is provided to build the project using cmake.\n\nThe main entry point is TranslateHLSLFromMem() function in HLSLcc.cpp (taking DX bytecode as input).\n\n\n## Contributors\n- Mikko Strandborg\n- Juho Oravainen\n- David Rogers\n- Marton Ekler\n- Antti Tapaninen\n- Florian Penzkofer\n- Alexey Orlov\n- Povilas Kanapickas\n- Aleksandr Kirillov\n- Kay Chang\n\n## License\n\nMIT license for HLSLcc itself, BSD license for the bstring library. See license.txt.\n","funding_links":[],"categories":["Graphics"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUnity-Technologies%2FHLSLcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUnity-Technologies%2FHLSLcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUnity-Technologies%2FHLSLcc/lists"}