diff options
author | Chuyan Zhang <chuyan@ucsb.edu> | 2024-10-10 18:51:05 -0700 |
---|---|---|
committer | Chuyan Zhang <chuyan@ucsb.edu> | 2024-10-10 18:51:05 -0700 |
commit | 6271f5ce797bf12be64c710b66b1b9e93a239829 (patch) | |
tree | 44cc6a5ab5a20f7e55829f18b68a9f1191dac81d /include/shader.h | |
parent | ba27f3c22e79b91a2573b7efd00c5a3bbdb96dbc (diff) | |
download | iris-main.tar.gz iris-main.zip |
Diffstat (limited to 'include/shader.h')
-rw-r--r-- | include/shader.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/shader.h b/include/shader.h new file mode 100644 index 0000000..b34fd92 --- /dev/null +++ b/include/shader.h @@ -0,0 +1,39 @@ +#pragma once +#include <cstdint> +#include <cstdlib> +#include <string> +#include <string_view> +#include <vector> + +namespace iris { + +struct ShaderDesc { + // Name of the shader, filename if loaded from file + std::string name; + // Source code of the shader + std::string source; + // Entry name of the shader + std::string entry_point; + + // Shader type + enum struct Type { + eRayGen, + eMiss, + eClosestHit, + eAnyHit, + eIntersection, + eCallable, + eCompute, + } type; + + // Compiled binary + std::vector<uint32_t> compiled_binary; + + static Type shader_type_from_string(std::string_view type); + ShaderDesc( + const std::string_view path, + std::vector<std::string> defines, + std::vector<std::pair<std::string, std::string>> valued_defines); +}; + +} // namespace iris
\ No newline at end of file |