Euphoria
shader.source.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace eu::render
6{
7
8// todo(Gustav): Should this be merged with the RenderSettings
12{
13 bool only_depth = false;
14 bool use_blinn_phong = true;
15 bool use_texture = false;
16 bool use_lights = false;
17
21
22 bool transparent_cutoff = false;
24
25 bool use_instancing = false;
26 [[nodiscard]] ShaderOptions with_instanced_mat4() const;
27};
28
37
38// vertex and fragment shader source.
41{
42 std::string vertex;
43 std::string fragment;
44};
45
47enum class BlurType
48{
51};
52
54enum class IsGauss
55{
58};
59
68
69std::string generate_blur(std::string_view src, const BlurOptions& options);
70
71ShaderSource_withLayout load_shader_source(const ShaderSource& source, const ShaderOptions& options, const std::string& uniform_buffer_source);
72
73ShaderSource load_skybox_source(const ShaderSource& source, const std::string& uniform_buffer_source);
74
75} // namespace eu::render
std::vector< VertexElementDescription > ShaderVertexAttributes
Describes all vertex inputs a shader requires like [vec3 position, vec3 normal, vec2 uv].
Definition ui.h:4
ShaderSource load_skybox_source(const ShaderSource &source, const std::string &uniform_buffer_source)
std::string generate_blur(std::string_view src, const BlurOptions &options)
ShaderSource_withLayout load_shader_source(const ShaderSource &source, const ShaderOptions &options, const std::string &uniform_buffer_source)
Options for generating a blur shader source.
Shader compilation options.
ShaderOptions with_instanced_mat4() const
ShaderOptions with_transparent_cutoff() const
Shader source with the layout that is expected.
core::ShaderVertexAttributes layout