MIT License

项目介绍

microsoft/ShaderConductor 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 1.8k 个 Star、187 次 Fork。

仓库全名
microsoft/ShaderConductor
开源许可证
MIT License
Star 数
1.8k
Fork 数
187
未关闭 Issue
16

README 摘要

ShaderConductor ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages. Features Converts HLSL to readable, usable and efficient GLSL Converts HLSL to readable, usable and efficient ESSL Converts HLSL to readable, usable and efficient Metal Shading Language (MSL) Converts HLSL to readable, usable and efficient old shader model HLSL Supports all stages of shaders, vertex, pixel, hull,…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ShaderConductor 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 1.8k 个 Star。

ShaderConductor 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 ShaderConductor 的源码?

可以直接克隆仓库:git clone https://github.com/microsoft/ShaderConductor.git,默认分支为 master;安装与运行步骤见仓库 README。

ShaderConductor 最近还在维护吗?

仓库最近一次更新为 2023年1月13日,当前有 16 个未关闭 Issue;Star 数为 1.8k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
2207
价值分
1154
活跃状态
归档

语言占比

C#
C++
CMake
GLSL
HLSL
Python

Release

README

ShaderConductor

Build Status License

ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages.

Features

  • Converts HLSL to readable, usable and efficient GLSL
  • Converts HLSL to readable, usable and efficient ESSL
  • Converts HLSL to readable, usable and efficient Metal Shading Language (MSL)
  • Converts HLSL to readable, usable and efficient old shader model HLSL
  • Supports all stages of shaders, vertex, pixel, hull, domain, geometry, and compute.

Note that this project is still in an early stage, and it is under active development.

Architecture

ShaderConductor is not a real compiler. Instead, it glues existing open source components to do the cross-compiling.

  1. DirectX Shader Compiler to compile HLSL to DXIL or SPIR-V,
  2. SPIRV-Cross to convert SPIR-V to target shading languages.

Architecture

Prerequisites

  • Git. Put git into the PATH is recommended.
  • Visual Studio 2017. Select the following workloads: Universal Windows Platform Development and Desktop Development with C++.
  • CMake. Version 3.9 or up. It’s highly recommended to choose “Add CMake to the system PATH for all users” during installation.
  • Python. Version 2.7 or up. You need not change your PATH variable during installation.

Building

ShaderConductor has been tested on Windows, Linux, and macOS.

The script way:

  BuildAll.py <BuildSystem> <Compiler> <Architecture> <Configuration>

where,

  • <BuildSystem> can be ninja or vs2017. Default is vs2017.
  • <Compiler> can be vc141 on Windows, gcc or clang on Linux, clang on macOS.
  • <Architecture> must be x64 (for now).
  • <Configuration> can be Debug, Release, RelWithDebInfo, or MinSizeRel. Default is Release.

This script automatically grabs external dependencies to External folder, generates project file in Build/<BuildSystem>-<Compiler>-<Platform>-<Architecture>[-<Configuration>], and builds it.

The manual way:

  mkdir Build
  cd Build
  cmake -G "Visual Studio 15" -T host=x64 -A x64 ../
  cmake --build .

After building, the output file ShaderConductor.dll can be located in <YourCMakeTargetFolder>/Bin/<Configuration>/. It depends on dxcompiler.dll in the same folder.

Artifacts

You can download the prebuilt binaries generated by CI system. Currently, artifacts for Windows, Linux, macOS are published every commit.

License

ShaderConductor is distributed under the terms of MIT License. See LICENSE for details.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

评论

暂无评论