summaryrefslogtreecommitdiffstatshomepage
path: root/bgfx/chains/test.json
blob: bc5603a18f289fc3dcf789fd59149177f7bc66c7 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{	"name": "Test Shader Chain",
	"author": "Ryan Holtz",
	"sliders": [
		{ "type": "bool",  "name": "adjustments", "text": "Enable Adjustments", "default": false },
		{ "type": "float", "name": "ratio_amount", "text": "Ratio Amount", "default": 0, "max": 1, "min": 0 },

		{ "type": "color", "name": "red_ratios", "text": "Red Amount",   "default": [ 1, 0, 0 ], "max": [ 1, 1, 1 ], "min": [ 0, 0, 0 ] },
		{ "type": "color", "name": "grn_ratios", "text": "Green Amount", "default": [ 0, 1, 0 ], "max": [ 1, 1, 1 ], "min": [ 0, 0, 0 ] },
		{ "type": "color", "name": "blu_ratios", "text": "Blue Amount",  "default": [ 0, 0, 1 ], "max": [ 1, 1, 1 ], "min": [ 0, 0, 0 ] },
		{ "type": "color", "name": "tint", "text": "Tint", "default": [ 1, 1, 1 ], "max": [ 1, 1, 1 ], "min": [ 0, 0, 0 ] },
		{ "type": "color", "name": "phosphor", "text": "Phosphor Amount",  "default": [ 0, 0, 0 ], "max": [ 1, 1, 1 ], "min": [ 0, 0, 0 ] },
		{ "type": "vec2",  "name": "shift", "text": "Frame Shift", "default": [ 0, 0 ], "max": [ 25, 25 ], "min": [ -25, -25 ] }
	],
	"parameters": [
		{ "name": "alternating", "type": "frame_mask", "period": 2 }
	],
	"targets": [
		{	"name": "native",
			"screen": true
		},
		{	"name": "previous",
			"screen": true,
			"prescale": true
		}
	],
	"passes": [
		{	"effect": "ratios",
			"name": "Matrix Pass",
			"disable_conditions": [
				{ "type": "slider", "name": "adjustments", "value": false },
				{ "type": "slider", "name": "ratio_amount", "value": 0 }
			],
			"uniforms": [
				{ "name": "u_ratio_amount", "slider": "ratio_amount" },
				{ "name": "u_red_ratios", "slider": "red_ratios" },
				{ "name": "u_grn_ratios", "slider": "grn_ratios" },
				{ "name": "u_blu_ratios", "slider": "blu_ratios" }
			],
			"input": [
				{ "sampler": "s_tex", "texture": "screen" }
			],
			"output": "native"
		},
		{	"effect": "tint",
			"name": "Tint Pass",
			"disable_conditions": [
				{ "type": "slider", "name": "adjustments", "value": false }
			],
			"uniforms": [
				{ "name": "u_tint", "slider": "tint" },
				{ "name": "u_shift", "slider": "shift" }
			],
			"input": [
				{ "sampler": "s_tex", "texture": "native" }
			],
			"output": "native"
		},
		{	"effect": "phosphor",
			"name": "Phosphor Decay",
			"disable_conditions": [
				{ "type": "slider", "name": "adjustments", "value": false },
				{ "type": "slider", "name": "phosphor", "value": [ 0, 0, 0 ] }
			],
			"uniforms": [
				{ "name": "u_passthrough", "value": [ 0 ] },
				{ "name": "u_phosphor", "slider": "phosphor" }
			],
			"input": [
				{ "sampler": "s_tex", "texture": "native" },
				{ "sampler": "s_prev", "texture": "previous" }
			],
			"output": "native"
		},
		{	"effect": "phosphor",
			"name": "Phosphor Store",
			"disable_conditions": [
				{ "type": "slider", "name": "adjustments", "value": false },
				{ "type": "slider", "name": "phosphor", "value": [ 0, 0, 0 ] }
			],
			"uniforms": [
				{ "name": "u_passthrough", "value": [ 1 ] },
				{ "name": "u_phosphor", "slider": "phosphor" }
			],
			"input": [
				{ "sampler": "s_tex", "texture": "native" },
				{ "sampler": "s_prev", "texture": "native" }
			],
			"output": "previous"
		},
		{	"effect": "blit",
			"name": "Final Blit",
			"input": [
				{ "sampler": "s_tex", "texture": "native" }
			],
			"output": "backbuffer"
		}
	]
}