diff options
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 |