blob: 73a5d51dbd26472f9bc8c088f800bc6f38f758a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "shaders.hh"
static float u_quad[2] = { 256.0f, 2.0f };
static void ui()
{
ImGui::SliderFloat("quad width", &u_quad[0], 1.0f, 512.0f);
ImGui::SliderFloat("quad height", &u_quad[1], 1.0f, 512.0f);
}
static void uniforms(Shader* shader)
{
GL(glUniform2fv(shader->get_required_uniform("u_quad"), 1, u_quad));
}
static Shader subpixel = {
.path = "subpixel.glsl",
.model = MODEL_QUAD,
.ui_fn = ui,
.uf_fn = uniforms,
};
ENABLE_SHADER(subpixel);
|