-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the HLSV wiki!
This wiki serves as the central documentation repository for the HLSV project. It contains information on not only how to write and use HLSV programs, but also how to understand the code base so you can develop your own features and extensions to the language and tools.
HLSV (High-Level SPIR-V) is a C-like GPU shader language very similar to GLSL and HLSL, mainly derived from GLSL for Vulkan. It is designed to be easy to pick up if you know either GLSL or HLSL, and even more so if you are familiar with the GLSL extensions for Vulkan. The language is cross-compiled into Vulkan-style GLSL, which is then compiled into SPIR-V bytecode programs using the existing tools in the Vulkan SDK.
HLSV was created over frustration with some of the limitations of GLSL, its extreme verbosity and error-prone syntax when extended to support Vulkan features, and near-complete lack of program reflection. It is mostly a personal project, and is not meant to support all of the nuanced features of full GLSL. The goal is for it to support all of the common shader functions, and to eventually become a viable alternative to GLSL for most common use cases.
An (incomplete) feature matrix:
HLSV Feature | Replaces/Improves from GLSL |
---|---|
Single source file |
|
Significantly lower verbosity |
|
Syntactic Sugar |
|
Detailed multi-format reflection | GLSL and the Vulkan SDK currently have terrible and incomplete reflection support (good luck trying to tell the difference between types of samplers and textures) that outputs only in a human readable format. The HLSV compiler generates fully-featured and detailed reflection information about shader programs and their interfaces, in both human-readable and binary machine-consumable formats. |
Note that this wiki will not teach you what a shader program is, how to write them, or how to use them in a Vulkan application. It will only provide an overview on the HLSV language and toolset for those who are already familiar with shaders. You should already know GLSL or HLSL, how they apply and are used in Vulkan, at how to use SPIR-V modules. There are plenty of resources online to learn the above.
- Quick Guide
- Language Overview