colourpicker

Simple Colour Picker written in C
git clone anongit@rnpnr.xyz:colourpicker.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: 33df2a5a73a1737418c56b35907380b6e1c5bb46
Parent: 37cf77f62a86befe627ae44a9cc84a5d75a76f6d
Author: Randy Palamar
Date:   Sun, 11 Aug 2024 08:38:41 -0600

drop unused parameter from shader

Diffstat:
Mcolourpicker.c | 4+---
Mslider_lerp.glsl | 1-
Mutil.c | 3+--
3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/colourpicker.c b/colourpicker.c @@ -763,10 +763,9 @@ do_slider_shader(ColourPickerCtx *ctx, Rect r, i32 colour_mode, f32 *regions, f3 rlSetUniform(ctx->radius_id, &radius, RL_SHADER_UNIFORM_FLOAT, 1); rlSetUniform(ctx->border_thick_id, &border_thick, RL_SHADER_UNIFORM_FLOAT, 1); rlSetUniform(ctx->colour_mode_id, &colour_mode, RL_SHADER_UNIFORM_INT, 1); - rlSetUniform(ctx->size_id, r.size.E, RL_SHADER_UNIFORM_VEC2, 1); rlSetUniform(ctx->colours_id, colours, RL_SHADER_UNIFORM_VEC4, 3); rlSetUniform(ctx->regions_id, regions, RL_SHADER_UNIFORM_VEC4, 4); - DrawRectangleRec(r.rr, BLACK); + DrawRectanglePro(r.rr, (Vector2){0}, 0, BLACK); EndShaderMode(); } @@ -1053,7 +1052,6 @@ do_colour_picker(ColourPickerCtx *ctx, f32 dt, Vector2 window_pos, Vector2 mouse ctx->colour_mode_id = GetShaderLocation(ctx->picker_shader, "u_colour_mode"); ctx->colours_id = GetShaderLocation(ctx->picker_shader, "u_colours"); ctx->regions_id = GetShaderLocation(ctx->picker_shader, "u_regions"); - ctx->size_id = GetShaderLocation(ctx->picker_shader, "u_size"); ctx->radius_id = GetShaderLocation(ctx->picker_shader, "u_radius"); ctx->border_thick_id = GetShaderLocation(ctx->picker_shader, "u_border_thick"); } diff --git a/slider_lerp.glsl b/slider_lerp.glsl @@ -20,7 +20,6 @@ uniform float u_radius; uniform float u_border_thick; uniform vec4 u_colours[3]; uniform vec4 u_regions[4]; -uniform vec2 u_size; /* input: h [0,360] | s,v [0, 1] * * output: rgb [0,1] */ diff --git a/util.c b/util.c @@ -221,8 +221,7 @@ typedef struct { RenderTexture picker_texture; i32 mode_id, colour_mode_id, colours_id; - i32 regions_id, size_id; - i32 radius_id, border_thick_id; + i32 regions_id, radius_id, border_thick_id; u32 flags; enum colour_mode colour_mode;