From 6271f5ce797bf12be64c710b66b1b9e93a239829 Mon Sep 17 00:00:00 2001 From: Chuyan Zhang Date: Thu, 10 Oct 2024 18:51:05 -0700 Subject: move to new resource abstraction --- include/shader.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 include/shader.h (limited to 'include/shader.h') 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 +#include +#include +#include +#include + +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 compiled_binary; + + static Type shader_type_from_string(std::string_view type); + ShaderDesc( + const std::string_view path, + std::vector defines, + std::vector> valued_defines); +}; + +} // namespace iris \ No newline at end of file -- cgit v1.2.3-70-g09d2