Files
MapLibreParticleLab/include/mln/shaders/gl/retained_underlay_composite.hpp

30 lines
745 B
C++

// Generated code, do not modify this file!
#pragma once
#include <mln/shaders/shader_source.hpp>
namespace mln {
namespace shaders {
template <>
struct ShaderSource<BuiltIn::RetainedUnderlayCompositeShader, gfx::Backend::Type::OpenGL> {
static constexpr const char* name = "RetainedUnderlayCompositeShader";
static constexpr const char* vertex = R"(layout (location = 0) in vec2 a_pos;
out vec2 v_uv;
void main() {
gl_Position = vec4(a_pos.x * 2.0 - 1.0, 1.0 - a_pos.y * 2.0, 0.0, 1.0);
v_uv = vec2(a_pos.x, 1.0 - a_pos.y);
}
)";
static constexpr const char* fragment = R"(in vec2 v_uv;
uniform sampler2D u_image;
void main() {
fragColor = texture(u_image, v_uv);
}
)";
};
} // namespace shaders
} // namespace mln