From 1563ca95b44ea3e0f7384bc3109f366ed761668f Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 10 Jan 2026 23:20:05 +0100 Subject: Minor renderer for particles --- util/ogl_renderer/c++/shaders/basic.hpp | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 util/ogl_renderer/c++/shaders/basic.hpp (limited to 'util/ogl_renderer/c++/shaders/basic.hpp') diff --git a/util/ogl_renderer/c++/shaders/basic.hpp b/util/ogl_renderer/c++/shaders/basic.hpp new file mode 100644 index 0000000..2b0a65f --- /dev/null +++ b/util/ogl_renderer/c++/shaders/basic.hpp @@ -0,0 +1,36 @@ +#pragma once + +#include + +namespace kel { +namespace lbm { +constexpr std::string_view shader_basic_vertex = R"( +#version 330 core + +layout(location=0) in vec2 vertices; +layout(location=1) in vec2 v_uv; + +out vec2 uv; + +void main(){ + uv = v_uv; + gl_Position = vec4(vertices, 0.0, 1.0); +} +)"; + +constexpr std::string_view shader_basic_fragment = R"( +#version 330 core + +in vec2 uv; +out vec4 color; + +uniform sampler2D tex_sampler; + +void main(){ + color = texture(tex_sampler, uv); + color.r = 0.8; +} +)"; + +} +} -- cgit v1.2.3