Advertisement
ICEknigh7

lcd-grid gba

May 24th, 2023 (edited)
884
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 3.66 KB | None | 0 0
  1. {
  2.     "name": "lcd-grid gba",
  3.     "author": "cgwg, ICEknight",
  4.     "sliders": [
  5.         { "type": "float",
  6.           "name": "persistence",
  7.           "text": "Persistence",
  8.           "default":  0.0,
  9.           "max"    :  0.99,
  10.           "min"    :  0.0,
  11.           "step"   :  0.01,
  12.           "format": "%1.2f",
  13.           "screen": "lcd" },
  14.         { "type": "float",
  15.           "name": "gain",
  16.           "text": "Gain",
  17.           "default":  1.2,
  18.           "max"    :  2.0,
  19.           "min"    : -1.0,
  20.           "step"   :  0.01,
  21.           "format": "%1.2f",
  22.           "screen": "lcd" },
  23.         { "type": "float",
  24.           "name": "blacklevel",
  25.           "text": "Black level",
  26.           "default":  0.0,
  27.           "max"    :  2.0,
  28.           "min"    : -1.0,
  29.           "step"   :  0.01,
  30.           "format": "%1.2f",
  31.           "screen": "lcd" },
  32.         { "type": "float",
  33.           "name": "ambient",
  34.           "text": "Ambient",
  35.           "default":  0.0,
  36.           "max"    :  2.0,
  37.           "min"    : -1.0,
  38.           "step"   :  0.01,
  39.           "format": "%1.2f",
  40.           "screen": "lcd" },
  41.         { "type": "float",
  42.           "name": "LCDgamma",
  43.           "text": "Gamma of simulated LCD",
  44.           "default":  3.0,
  45.           "max"    :  4.0,
  46.           "min"    :  0.7,
  47.           "step"   :  0.05,
  48.           "format": "%1.2f",
  49.           "screen": "raster" },
  50.         { "type": "float",
  51.           "name": "monitorgamma",
  52.           "text": "Gamma of output display",
  53.           "default":  2.0,
  54.           "max"    :  4.0,
  55.           "min"    :  0.7,
  56.           "step"   :  0.05,
  57.           "format": "%1.2f",
  58.           "screen": "lcd" },
  59.         { "type": "intenum",
  60.           "name": "BGR",
  61.           "text": "Subpixel layout",
  62.           "default": 1,
  63.           "max"    : 1,
  64.           "min"    : 0,
  65.           "step"   : 1,
  66.           "format": "%s",
  67.           "screen": "lcd",
  68.           "strings": [ "RGB", "BGR" ] },
  69.         { "type": "vec2",
  70.           "name": "subpixsize",
  71.           "text": "Subpixel size ",
  72.           "default":  [0.5,0.63],
  73.           "max"    :  [1.0,1.0],
  74.           "min"    :  [0.1,0.1],
  75.           "step"   :  0.01,
  76.           "format": "%1.2f",
  77.           "screen": "lcd" },
  78.         { "type": "color",
  79.           "name": "rsubpix",
  80.           "text": "R subpixel ",
  81.           "default":  [0.75,0.125,0.0],
  82.           "max"    :  [1.0,1.0,1.0],
  83.           "min"    :  [0.0,0.0,0.0],
  84.           "step"   :  0.01,
  85.           "format": "%1.2f",
  86.           "screen": "lcd" },
  87.         { "type": "color",
  88.           "name": "gsubpix",
  89.           "text": "G subpixel ",
  90.           "default":  [0.125,0.75,0.125],
  91.           "max"    :  [1.0,1.0,1.0],
  92.           "min"    :  [0.0,0.0,0.0],
  93.           "step"   :  0.01,
  94.           "format": "%1.2f",
  95.           "screen": "lcd" },
  96.         { "type": "color",
  97.           "name": "bsubpix",
  98.           "text": "B subpixel ",
  99.           "default":  [0.0,0.125,0.75],
  100.           "max"    :  [1.0,1.0,1.0],
  101.           "min"    :  [0.0,0.0,0.0],
  102.           "step"   :  0.01,
  103.           "format": "%1.2f",
  104.           "screen": "lcd" }
  105.     ],
  106.     "targets": [
  107.         {   "name": "motionblur",
  108.             "mode": "guest"
  109.         }
  110.     ],
  111.     "passes": [
  112.         {
  113.             "effect": "lcd-grid/persistence",
  114.             "name": "LCD persistence",
  115.             "uniforms": [
  116.                 { "uniform": "u_persistence", "slider": "persistence" }
  117.             ],
  118.             "input": [
  119.                 { "sampler": "s_screen",   "target": "screen" },
  120.                 { "sampler": "s_motionblur","target": "motionblur" }
  121.             ],
  122.             "output": "motionblur"
  123.         },
  124.         {
  125.             "effect": "lcd-grid/lcd-grid",
  126.             "name": "LCD",
  127.             "uniforms": [
  128.                 { "uniform": "u_rsubpix",   "slider": "rsubpix" },
  129.                 { "uniform": "u_gsubpix",   "slider": "gsubpix" },
  130.                 { "uniform": "u_bsubpix",   "slider": "bsubpix" },
  131.                 { "uniform": "u_gain",      "slider": "gain" },
  132.                 { "uniform": "u_blacklevel","slider": "blacklevel" },
  133.                 { "uniform": "u_ambient",   "slider": "ambient" },
  134.                 { "uniform": "u_LCDgamma",  "slider": "LCDgamma" },
  135.                 { "uniform": "u_monitorgamma","slider": "monitorgamma" },
  136.                 { "uniform": "u_subpixsize","slider": "subpixsize" },
  137.                 { "uniform": "u_BGR",       "slider": "BGR" }
  138.             ],
  139.  
  140.             "input": [
  141.                 { "sampler": "s_tex", "target": "motionblur" }
  142.             ],
  143.  
  144.             "output": "output"
  145.         }
  146.     ]
  147. }
  148.  
Advertisement
Comments
  • ICEknigh7
    295 days
    # text 0.19 KB | 0 0
    1. Save as a .json file to the bgfx\chains folder, then make these changes in mame.ini:
    2. video bgfx
    3. bgfx_backend opengl
    4. bgfx_screen_chains "lcd-grid gba"
  • ICEknigh7
    291 days
    # text 0.07 KB | 0 0
    1. Recommended screen settings for this shader:
    2. -Brightness: 1.0
    3. -Gamma: 1.0
Add Comment
Please, Sign In to add comment
Advertisement