Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::DefaultShader Class Reference

#include <Shader.h>

Static Public Member Functions

static constexpr std::string_view GetVertexShader ()
 
static constexpr std::string_view GetFragmentShader ()
 
static constexpr std::string_view GetErrorShader ()
 

Detailed Description

Definition at line 130 of file Shader.h.

Member Function Documentation

◆ GetErrorShader()

static constexpr std::string_view Elevate::DefaultShader::GetErrorShader ( )
inlinestaticconstexpr

Definition at line 158 of file Shader.h.

158 {
159 return R"(
160layout(location = 0) out vec4 FragColor;
161uniform float time;
162
163void main()
164{
165 vec2 uv = gl_FragCoord.xy / 100.0;
166 float pattern = sin(uv.x * 10.0 + time) * cos(uv.y * 10.0 + time);
167 FragColor = vec4(1.0, 0.0, 1.0, 1.0);
168 if(pattern > 0.0) FragColor = vec4(0.0, 0.0, 0.0, 1.0);
169}
170)";
171 }

◆ GetFragmentShader()

static constexpr std::string_view Elevate::DefaultShader::GetFragmentShader ( )
inlinestaticconstexpr

Definition at line 147 of file Shader.h.

147 {
148 return R"(
149layout(location = 0) out vec4 FragColor;
150
151void main()
152{
153 FragColor = vec4(1.0);
154}
155)";
156 }

◆ GetVertexShader()

static constexpr std::string_view Elevate::DefaultShader::GetVertexShader ( )
inlinestaticconstexpr

Definition at line 133 of file Shader.h.

133 {
134 return R"(
135layout(location = 0) in vec3 a_Position;
136
137uniform mat4 viewProj;
138uniform mat4 model;
139
140void main()
141{
142 gl_Position = viewProj * model * vec4(a_Position, 1.0);
143}
144)";
145 }

The documentation for this class was generated from the following file: