From 4cde73239ee3a7cfa4a83a3f9d8a20effdb115ed Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 29 Dec 2022 17:14:38 -0800 Subject: plasma-node,shader-node: break out maga plasma shader Performing the maga branch in the shader slows things down considerably. This commit gets rid of the in-shader branch by splitting the plasma fragment shader into maga and non-maga variants. This required adding shader vector support to shader-node so multiple shaders could be supplied, with a selector index pointer used to pick which is used by the render function. --- src/game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game.c') diff --git a/src/game.c b/src/game.c index f4216ab..65b8d62 100644 --- a/src/game.c +++ b/src/game.c @@ -227,7 +227,7 @@ typedef struct game_t { mask_t *mask; teepee_t *teepee; entity_t *new_infections; - int is_maga; + unsigned is_maga; float infections_rate, infections_rate_smoothed; /* 0-1 for none-max */ virus_t *viruses[GAME_NUM_VIRUSES]; m4f_t score_digits_x[10]; -- cgit v1.2.3