Commit: 1f2db6c97d7316f2af84c7755cd6d885695ef43c
Parent: 0ca8f70944743bbaca2d670517c25117fa7b1607
Author: Randy Palamar
Date: Tue, 14 Jan 2025 06:00:58 -0700
ui: use CLAMP_TO_BORDER on view output texture
This was what I intended. A black border is probably the least
egregious thing to use for 1 frame (though transparent also works).
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/beamformer.c b/beamformer.c
@@ -99,8 +99,12 @@ alloc_output_image(BeamformerCtx *ctx, uv4 output_dim)
SetTextureFilter(ctx->fsctx.output.texture, TEXTURE_FILTER_BILINEAR);
/* NOTE(rnp): work around raylib's janky texture sampling */
- glTextureParameteri(ctx->fsctx.output.texture.id, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTextureParameteri(ctx->fsctx.output.texture.id, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ i32 id = ctx->fsctx.output.texture.id;
+ glTextureParameteri(id, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
+ glTextureParameteri(id, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
+
+ f32 border_color[] = {0, 0, 0, 1};
+ glTextureParameterfv(id, GL_TEXTURE_BORDER_COLOR, border_color);
}
}