mame/bgfx/chains/test.json
2016-03-13 15:51:16 +01:00

99 lines
No EOL
4.2 KiB
JSON

{ "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": [ 0, 0, 0 ], "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": [ 0, 0, 0 ], "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": [ 0, 0, 0 ], "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,
"doublebuffer": true
},
{ "name": "previous",
"mode": "native",
"prescale": 1
}
],
"passes": [
{ "effect": "ratios",
"name": "Matrix Pass",
"disable_conditions": [
{ "type": "slider", "name": "adjustments", "value": 0 },
{ "type": "slider", "name": "ratio_amount", "value": 0.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": 0 }
],
"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"
}
]
}