summaryrefslogtreecommitdiff
path: root/types/fx/shadow_data.c
blob: 0c2d1d2040780a1b04cd270f5c574034953720c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "types/fx/shadow_data.h"
#include "wlr/util/log.h"

struct shadow_data shadow_data_get_default(void) {
	static float default_shadow_color[] = {0.0f, 0.0f, 0.0f, 0.5f};
	return (struct shadow_data) {
		.blur_sigma = 20,
		.color = default_shadow_color,
		.enabled = false,
	};
}

bool scene_buffer_has_shadow(struct shadow_data *data) {
	return data->enabled && data->blur_sigma > 0 && data->color[3] > 0.0;
}