mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
Fix up bgfx NTSC shader, nw
This commit is contained in:
parent
41a489a947
commit
223a955d0b
@ -55,9 +55,9 @@
|
|||||||
// strings (optional): A list of strings to use with the "intenum" type, to select from a list of text options instead of simply numbers.
|
// strings (optional): A list of strings to use with the "intenum" type, to select from a list of text options instead of simply numbers.
|
||||||
// value: An array of 2 or more entries, with one entry per possible slider setting from "min" to "max" inclusive.
|
// value: An array of 2 or more entries, with one entry per possible slider setting from "min" to "max" inclusive.
|
||||||
|
|
||||||
{ "type": "intenum", "name": "adjustments", "text": "Enable Adjustments", "default": 0, "max": 1, "min": 0, "step": 1, "format": "%s", "screen": "any", "strings": [ "Off", "On" ] },
|
{ "type": "intenum", "name": "adjustments", "text": "Enable Adjustments", "default": 1, "max": 1, "min": 0, "step": 1, "format": "%s", "screen": "any", "strings": [ "Off", "On" ] },
|
||||||
|
|
||||||
{ "type": "intenum", "name": "ntsc", "text": "Enable NTSC", "default": 0, "max": 1, "min": 0, "step": 1, "format": "%s", "screen": "any", "strings": [ "Off", "On" ] },
|
{ "type": "intenum", "name": "ntsc", "text": "Enable NTSC", "default": 1, "max": 1, "min": 0, "step": 1, "format": "%s", "screen": "any", "strings": [ "Off", "On" ] },
|
||||||
{ "type": "float", "name": "a_value", "text": "NTSC A Value", "default": 0.50, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "raster" },
|
{ "type": "float", "name": "a_value", "text": "NTSC A Value", "default": 0.50, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "raster" },
|
||||||
{ "type": "float", "name": "b_value", "text": "NTSC B Value", "default": 0.50, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "raster" },
|
{ "type": "float", "name": "b_value", "text": "NTSC B Value", "default": 0.50, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "raster" },
|
||||||
{ "type": "float", "name": "cc_value", "text": "NTSC Color Carrier (Hz)", "default": 3.57954, "max": 3.67954, "min": 3.47954, "step": 0.00001, "format": "%1.5f", "screen": "raster" },
|
{ "type": "float", "name": "cc_value", "text": "NTSC Color Carrier (Hz)", "default": 3.57954, "max": 3.67954, "min": 3.47954, "step": 0.00001, "format": "%1.5f", "screen": "raster" },
|
||||||
@ -84,7 +84,7 @@
|
|||||||
{ "type": "vec2", "name": "radial_converge_green", "text": "Green Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" },
|
{ "type": "vec2", "name": "radial_converge_green", "text": "Green Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" },
|
||||||
{ "type": "vec2", "name": "radial_converge_blue", "text": "Blue Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" },
|
{ "type": "vec2", "name": "radial_converge_blue", "text": "Blue Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" },
|
||||||
|
|
||||||
{ "type": "vec2", "name": "defocus", "text": "Defocus, ", "default": [ 1.5, 1.5 ], "max": [ 10.0, 10.0 ], "min": [ 0.0, 0.0 ], "step": 0.1, "format": "%2.1f", "screen": "crt" },
|
{ "type": "vec2", "name": "defocus", "text": "Defocus, ", "default": [ 0.5, 0.5 ], "max": [ 10.0, 10.0 ], "min": [ 0.0, 0.0 ], "step": 0.1, "format": "%2.1f", "screen": "crt" },
|
||||||
|
|
||||||
{ "type": "color", "name": "phosphor", "text": "Phosphor Persistence, ", "default": [ 0.45, 0.45, 0.45 ], "max": [ 1.00, 1.00, 1.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "color", "name": "phosphor", "text": "Phosphor Persistence, ", "default": [ 0.45, 0.45, 0.45 ], "max": [ 1.00, 1.00, 1.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
|
|
||||||
@ -102,19 +102,19 @@
|
|||||||
{ "type": "vec2", "name": "shadow_uv_size", "text": "Shadow Mask UV Size ", "default": [ 0.500, 0.500 ], "max": [ 1.000, 1.000 ], "min": [ 0.000, 0.000 ], "step": 0.001, "format": "%1.3f", "screen": "crt" },
|
{ "type": "vec2", "name": "shadow_uv_size", "text": "Shadow Mask UV Size ", "default": [ 0.500, 0.500 ], "max": [ 1.000, 1.000 ], "min": [ 0.000, 0.000 ], "step": 0.001, "format": "%1.3f", "screen": "crt" },
|
||||||
{ "type": "vec2", "name": "shadow_uv_offset", "text": "Shadow Mask UV Offset ", "default": [ 0.000, 0.000 ], "max": [ 1.000, 1.000 ], "min": [ 0.000, 0.000 ], "step": 0.001, "format": "%1.3f", "screen": "crt" },
|
{ "type": "vec2", "name": "shadow_uv_offset", "text": "Shadow Mask UV Offset ", "default": [ 0.000, 0.000 ], "max": [ 1.000, 1.000 ], "min": [ 0.000, 0.000 ], "step": 0.001, "format": "%1.3f", "screen": "crt" },
|
||||||
|
|
||||||
{ "type": "float", "name": "humbar_alpha", "text": "Hum Bar Amount", "default": 0.05, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "float", "name": "humbar_alpha", "text": "Hum Bar Amount", "default": 0.0, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
{ "type": "float", "name": "humbar_hertz_rate", "text": "Hum Bar Frequency", "default": 0.001, "max": 1.000, "min": 0.000, "step": 0.00001, "format": "%1.5f", "screen": "crt" },
|
{ "type": "float", "name": "humbar_hertz_rate", "text": "Hum Bar Frequency", "default": 0.001, "max": 1.000, "min": 0.000, "step": 0.00001, "format": "%1.5f", "screen": "crt" },
|
||||||
|
|
||||||
{ "type": "color", "name": "floor", "text": "Signal Floor, ", "default": [ 0.05, 0.05, 0.05 ], "max": [ 1.00, 1.00, 1.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "color", "name": "floor", "text": "Signal Floor, ", "default": [ 0.05, 0.05, 0.05 ], "max": [ 1.00, 1.00, 1.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
{ "type": "color", "name": "power", "text": "Signal Exponent, ", "default": [ 0.80, 0.80, 0.80 ], "max": [ 4.00, 4.00, 4.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "color", "name": "power", "text": "Signal Exponent, ", "default": [ 1.00, 1.00, 1.00 ], "max": [ 4.00, 4.00, 4.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
|
|
||||||
{ "type": "float", "name": "distortion", "text": "Screen Distortion Amount", "default": 0.20, "max": 2.00, "min": -2.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "float", "name": "distortion", "text": "Screen Distortion Amount", "default": 0.10, "max": 2.00, "min": -2.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
{ "type": "float", "name": "cubic_distortion", "text": "Screen Cubic Distortion Amount", "default": 0.00, "max": 2.00, "min": -2.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "float", "name": "cubic_distortion", "text": "Screen Cubic Distortion Amount", "default": 0.00, "max": 2.00, "min": -2.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
{ "type": "float", "name": "distort_corner", "text": "Distorted Corner Amount", "default": 0.20, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "float", "name": "distort_corner", "text": "Distorted Corner Amount", "default": 0.10, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
{ "type": "float", "name": "round_corner", "text": "Rounded Corner Amount", "default": 0.15, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "float", "name": "round_corner", "text": "Rounded Corner Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
{ "type": "float", "name": "smooth_border", "text": "Smooth Border Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "float", "name": "smooth_border", "text": "Smooth Border Amount", "default": 0.03, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
{ "type": "float", "name": "vignetting", "text": "Vignetting Amount", "default": 0.20, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
{ "type": "float", "name": "vignetting", "text": "Vignetting Amount", "default": 0.10, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
|
||||||
{ "type": "float", "name": "reflection", "text": "Reflection Amount", "default": 0.15, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }
|
{ "type": "float", "name": "reflection", "text": "Reflection Amount", "default": 0.05, "max": 2.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" }
|
||||||
],
|
],
|
||||||
|
|
||||||
// parameters (optional): A list of procedurally-generated parameters that can be bound to entry uniforms.
|
// parameters (optional): A list of procedurally-generated parameters that can be bound to entry uniforms.
|
||||||
@ -185,6 +185,17 @@
|
|||||||
|
|
||||||
// passes (required): The list of individual shaders to invoke, and any dynamic input parameters they need.
|
// passes (required): The list of individual shaders to invoke, and any dynamic input parameters they need.
|
||||||
"passes": [
|
"passes": [
|
||||||
|
{ "effect": "misc/blit",
|
||||||
|
"name": "Blit to filterable surface for NTSC",
|
||||||
|
"disablewhen": [
|
||||||
|
{ "type": "slider", "condition": "equal", "combine": "and", "name": "adjustments", "value": 0 },
|
||||||
|
{ "type": "slider", "condition": "equal", "combine": "and", "name": "ntsc", "value": 0 }
|
||||||
|
],
|
||||||
|
"input": [
|
||||||
|
{ "sampler": "s_tex", "texture": "screen" }
|
||||||
|
],
|
||||||
|
"output": "ntsc"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// effect (required): The name of the effect JSON file to load for this pass.
|
// effect (required): The name of the effect JSON file to load for this pass.
|
||||||
// value: Any valid JSON filename included in your shader chain, without the extension.
|
// value: Any valid JSON filename included in your shader chain, without the extension.
|
||||||
@ -284,7 +295,7 @@
|
|||||||
//
|
//
|
||||||
// selection (optional, option and texture only): Determines the name of the selection and alowes to select other textures in the same directory as the specified texture file.
|
// selection (optional, option and texture only): Determines the name of the selection and alowes to select other textures in the same directory as the specified texture file.
|
||||||
// values: Any valid ASCII string.
|
// values: Any valid ASCII string.
|
||||||
{ "sampler": "s_tex", "texture": "screen" }
|
{ "sampler": "s_tex", "target": "ntsc" }
|
||||||
],
|
],
|
||||||
|
|
||||||
// output (required): The target to use as the output for this pass. Can be one of the named targets in "targets", or "output"
|
// output (required): The target to use as the output for this pass. Can be one of the named targets in "targets", or "output"
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
{
|
{
|
||||||
"blend": {
|
"blend": {
|
||||||
"equation": "add",
|
"equation": "add",
|
||||||
"srcColor": "srcalpha",
|
"srcColor": "1",
|
||||||
"dstColor": "1-srcalpha",
|
"dstColor": "0",
|
||||||
"srcAlpha": "srcalpha",
|
"srcAlpha": "1",
|
||||||
"dstAlpha": "1-srcalpha"
|
"dstAlpha": "0"
|
||||||
},
|
},
|
||||||
"depth": {
|
"depth": {
|
||||||
"function": "always"
|
"function": "always"
|
||||||
|
Loading…
Reference in New Issue
Block a user