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/plasma-node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plasma-node.h') diff --git a/src/plasma-node.h b/src/plasma-node.h index 8db8664..6094207 100644 --- a/src/plasma-node.h +++ b/src/plasma-node.h @@ -21,6 +21,6 @@ typedef struct m4f_t m4f_t; typedef struct stage_t stage_t; typedef struct stage_conf_t stage_conf_t; -stage_t * plasma_node_new(const stage_conf_t *conf, m4f_t *projection_x, float *gloom, int *maga); +stage_t * plasma_node_new(const stage_conf_t *conf, m4f_t *projection_x, float *gloom, unsigned *maga); #endif -- cgit v1.2.3