Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
shader_compiler.hpp
1
4
5
#pragma once
6
7
#include "
shader_reflection.hpp
"
8
9
#include <cstddef>
10
#include <cstdint>
11
#include <string>
12
#include <string_view>
13
#include <
toast/uid.hpp
>
14
#include <vector>
15
16
namespace
renderer {
17
18
struct
CompiledShaderCode
{
19
std::vector<std::byte> spirv;
20
ShaderReflection
reflection;
21
std::vector<std::string> dependencies;
22
};
23
24
class
ShaderCompiler
{
25
public
:
27
static
auto
compile
(
toast::UID
uid, std::string_view source, std::string_view source_uri) ->
CompiledShaderCode
;
28
30
static
void
setRayQueryAvailable
(
bool
available);
31
32
[[nodiscard]]
33
static
auto
isRayQueryAvailable() -> bool;
34
35
[[nodiscard]]
36
static
auto
featureHash() -> uint64_t;
37
};
38
39
}
renderer::ShaderCompiler
Definition
shader_compiler.hpp:24
renderer::ShaderCompiler::setRayQueryAvailable
static void setRayQueryAvailable(bool available)
Definition
shader_compiler.cpp:96
renderer::ShaderCompiler::compile
static auto compile(toast::UID uid, std::string_view source, std::string_view source_uri) -> CompiledShaderCode
Thread safe.
Definition
shader_compiler.cpp:293
shader_reflection.hpp
renderer::CompiledShaderCode
Definition
shader_compiler.hpp:18
renderer::ShaderReflection
Definition
shader_reflection.hpp:87
toast::UID
Definition
uid.hpp:20
uid.hpp
Unique identifier for everything that exists in our engine.
engine
src
toast
renderer
shader_compiler.hpp
Generated by
1.17.0