summaryrefslogtreecommitdiff
path: root/src/example/04_bloom/preprocess.c
blob: 0956c59abe1a4bde29fc67f901a55222a253e2ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "../../shaders/common/core.h"

/*uniforms*/

/*varyings*/
#define _color reg_v4_00

static void vert( Vertex* in, Vec4* clipcoord) {
	static Vec4 p; p.xyz = in->position; p.w = 1;	 
	color_tocolor32(in->color, _color);
}

/*multi target*/
#define _frag_color    out_color[0]
#define _bright_color  out_color[1]

static bool frag( Color32* color) {
	//_frag_color->r = 1;
	//_frag_color->g = 1;
	//_frag_color->b = 1;
	//_frag_color->a = 1;
	//*_bright_color = *_color;
	*_frag_color = *_color;
	return 1;
}

Program _04_bloom_preprocess = {
	vert, frag,
	VARYING_V4_00
};