diff options
Diffstat (limited to 'src/shader.h')
-rw-r--r-- | src/shader.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/shader.h b/src/shader.h new file mode 100644 index 0000000..b1be8a8 --- /dev/null +++ b/src/shader.h @@ -0,0 +1,33 @@ +#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; + + // Shader type + enum struct Type { + eRayGen, + eMiss, + eClosestHit, + eAnyHit, + eIntersection, + 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); +}; + +} // namespace iris
\ No newline at end of file |