summaryrefslogtreecommitdiffstatshomepage
path: root/bgfx/chains/test.json
blob: 34ddc00fc5c4851276326b0a3b6dcd560eb871a0 (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": "int_enum", "name": "adjustments",  "text": "Enable Adjustments",        "default": 0,                 "max": 1,                 "min": 0,                    "step": 1, "scale": 1.0,   "format": "%s",    "screen": "any", "strings": [ "On", "Off" ] },
		{ "type": "float",    "name": "ratio_amount", "text": "Ratio Amount",              "default": 0,                 "max": 100,               "min": 0,                    "step": 1, "scale": 0.01,  "format": "%1.2f", "screen": "any" },
		{ "type": "color",    "name": "red_ratios",   "text": "Color Matrix, Red from ",   "default": [ 200,   0,   0 ], "max": [ 400, 400, 400 ], "min": [ -400, -400, -400 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
		{ "type": "color",    "name": "grn_ratios",   "text": "Color Matrix, Green from ", "default": [   0, 200,   0 ], "max": [ 400, 400, 400 ], "min": [ -400, -400, -400 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
		{ "type": "color",    "name": "blu_ratios",   "text": "Color Matrix, Blue from ",  "default": [   0,   0, 200 ], "max": [ 400, 400, 400 ], "min": [ -400, -400, -400 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
		{ "type": "color",    "name": "tint",         "text": "Tint ",                     "default": [ 100, 100, 100 ], "max": [ 100, 100, 100 ], "min": [    0,    0,    0 ], "step": 1, "scale": 0.01,  "format": "%1.2f", "screen": "any" },
		{ "type": "color",    "name": "phosphor",     "text": "Phosphor Life, ",           "default": [   0,   0,   0 ], "max": [ 100, 100, 100 ], "min": [    0,    0,    0 ], "step": 1, "scale": 0.01,  "format": "%1.2f", "screen": "any" },
		{ "type": "vec2",     "name": "shift",        "text": "Frame Shift ",              "default": [   0,   0 ],      "max": [ 25, 25 ],        "min": [ -25, -25 ],         "step": 1, "scale": 1.0,   "format": "%2.f",  "screen": "raster" }
	],
	"parameters": [
		{ "name": "alternating", "type": "frame_mask", "period": 2 }
	],
	"targets": [
		{	"name": "native",
			"mode": "native",
			"prescale": 1
		},
		{	"name": "previous",
			"mode": "native",
			"prescale": 1
		}
	],
	"passes": [
		{	"effect": "ratios",
			"name": "Matrix Pass",
			"disable_conditions": [
				{ "type": "slider", "name": "adjustments", "value": false },
				{ "type": "slider", "name": "ratio_amount", "value": 0 }
			],
			"uniforms": [
				{ "uniform": "u_ratio_amount", "slider": "ratio_amount" },
				{ "uniform": "u_red_ratios", "slider": "red_ratios" },
				{ "uniform": "u_grn_ratios", "slider": "grn_ratios" },
				{ "uniform": "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": [
				{ "uniform": "u_tint", "slider": "tint" },
				{ "uniform": "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": [
				{ "uniform": "u_passthrough", "value": [ 0 ] },
				{ "uniform": "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": [
				{ "uniform": "u_passthrough", "value": [ 1 ] },
				{ "uniform": "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"
		}
	]
}