Shaderc Shader Compiler Collection

Shaderc Shader Compiler Collection

google.github.io

2

About this website

Shaderc is a collection of shader compiler tools built on top of Glslang and SPIRV-Tools, providing a unified interface for compiling GLSL and HLSL shaders to SPIR-V for use with Vulkan and OpenGL. Developed and maintained by Google as part of the Shaderc project, it provides a convenient command-line and library interface for shader compilation. Key features: unified command-line tool (glslc) that accepts GLSL and HLSL shader files and compiles them to SPIR-V binary or assembly, with a GCC-like command-line interface familiar to C and C++ developers. HLSL support via the glslang HLSL frontend, enabling cross-compilation of HLSL shaders (originally for DirectX) to SPIR-V for Vulkan. Stage specification via file extension (.vert, .frag, .comp, .geom, .tesc, .tese, .rtgen, .rtmiss, etc.) or explicit flags (-fshader-stage). Shader optimization levels (-O0 through -Os) controlling optimization passes applied by SPIRV-Tools. SPIR-V target environment selection (-fvk-* flags) for Vulkan 1.0, 1.1, 1.2, 1.3, OpenGL 4.5 compatibility, and OpenGL ES. Include file processing with -I and -Iheader flags for managing shader includes and dependencies. Preprocessor-only mode (-E) for outputting preprocessed shader source without compilation. Dependency file generation (-MF) for build system integration with Make and Ninja. Macro definition (-D) and undefinition (-U) for compile-time configuration. Error and warning format compatible with common build tools. Thread-safe library API (libshaderc) for embedding shader compilation in applications, game engines, and build systems. Preprocessor, assembler, and validator integrated from Glslang and SPIRV-Tools. Performance optimized with memoization of compilation results. Used in Android GPU Inspector, Google Skia, Flutter rendering engine, and various Vulkan and OpenGL applications.

Tags & Categories

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!