142#define BJ_SHADER_STANDARD_FLAGS (BJ_SHADER_INVERT_Y | BJ_SHADER_CLAMP_COLOR | BJ_SHADER_NORMALIZE_COORDS | BJ_SHADER_CENTER_COORDS)
General-purpose definitions for Banjo API.
Header file for Bitmap type.
#define BANJO_EXPORT
Definition api.h:155
struct bj_bitmap bj_bitmap
Definition api.h:331
struct bj_vec2: 2D vector of bj_real values.
Definition vec.h:26
struct bj_vec3: 3D vector of bj_real values.
Definition vec.h:38
void bj_shader_bitmap(struct bj_bitmap *bitmap, bj_bitmap_shading_fn shader, void *data, uint8_t flags)
Applies a shader function to every pixel in a bitmap.
bj_shader_flag
Shader input control flags.
Definition shader.h:52
int(* bj_bitmap_shading_fn)(struct bj_vec3 *out_color, const struct bj_vec2 pixel_coord, void *user_data)
Function type for a bitmap shading operation.
Definition shader.h:42
@ BJ_SHADER_CENTER_COORDS
Center pixel coordinates around the origin.
Definition shader.h:128
@ BJ_SHADER_CLAMP_COLOR
Clamp the output color to the range [0.0, 1.0].
Definition shader.h:93
@ BJ_SHADER_INVERT_Y
Invert the Y coordinate of the input pixel.
Definition shader.h:82
@ BJ_SHADER_NORMALIZE_COORDS
Normalize pixel coordinates to the [0.0, 1.0] range.
Definition shader.h:107
@ BJ_SHADER_INVERT_X
Invert the X coordinate of the input pixel.
Definition shader.h:67