opensource.google.com

Menu

Announcing Shaderc: tools for compiling graphics shaders

Monday, August 10, 2015

Over the weekend, we released Shaderc: a library and command-line tool for translating graphics shaders from GLSL into SPIR-V.  It is a wrapper around Glslang, the open source reference compiler for GLSL published by the Khronos Group.

Shaderc is designed to be as developer-friendly as possible and encourage the widest adoption of best-in-class open GLSL compiler technology. It offers:

  • A C API that is portable, thread-safe, and easy to use.
  • An idiomatic object-based C++ API.  This is a headers-only wrapper around the C API, to minimize the impact of potential changes in the environment's C++ ABI.
  • glslc, a command-line shader compiler.  Its arguments and file handling are similar to Clang and GCC, for easy integration with standard build systems.

Shaderc works on Linux, and there is an initial port to Windows.

The Shaderc project is released under the Apache License, Version 2.0, and is available immediately on GitHub at http://github.com/google/shaderc. Contributions from the community are welcome.

By David Neto and Dejan Mircevski, Google Engineering
.