Blinue / Magpie

An all-purpose window upscaler for Windows 10/11.
GNU General Public License v3.0
9.57k stars 493 forks source link

CRT emulation shader #160

Closed 0x4E69676874466F78 closed 2 years ago

0x4E69676874466F78 commented 3 years ago

Thanks for the good app. Many old games are scary on LCD. I would like to run any old games with CRT shader. For example: https://github.com/mamedev/mame/tree/master/hlsl (MAME HLSL CRT shader) https://github.com/Matsilagi/RSRetroArch (CRT and etc shader collection, ported for ReShade and ShaderToy)

Blinue commented 3 years ago

I'll port them after v0.7 is released.

0x4E69676874466F78 commented 3 years ago

@Blinue

I'll port them after v0.7 is released.

Thank you very much!

Blinue commented 2 years ago

I've ported some CRT shaders, including CRT-Easymode, CRT-Geom, CRT-Hyllian, CRT-Lottes and GTU, I think this is enough for most people

crt-royale is a nice shader too, but it doesn't fit magpie

0x4E69676874466F78 commented 2 years ago

@Blinue thanks a lot! Soon I will try a new shaders.

crt-royale is a nice shader too, but it doesn't fit magpie

What's wrong there?

Blinue commented 2 years ago

crt-royale has high requirements on the size of the input image. It is more suitable to be integrated in a simulator than as a general-purpose post-processing stage.

0x4E69676874466F78 commented 2 years ago

Thanks for the answer.

0x4E69676874466F78 commented 2 years ago

Visually more correct settings:

  {
    "name": "CRT-Geom",
    "effects": [
      {
        "effect": "CRT_Geom",
        "scale": [ -1, -1 ],
        "curvature": 0,
        "CRTGamma": 1.5,
        "monitorGamma": 2.2,
        "cornerSize": 0.001,
      }
    ]
  },

I don't know why need to reduce CRTGamma.

Lanczos magpie-lanczos

CRT-Geom before: magpie-crtgeom-before

CRT-Geom after: magpie-crtgeom-after

0x4E69676874466F78 commented 2 years ago

Also need to include in settings all CRT Shaders. CRT_Hyllian and CRT_Lottes are good. For this game I liked more CRT_Lottes. But I will try to make a hybrid with FXAA antialiasing.

  {
    "name": "CRT-Lottes",
    "effects": [
      {
        "effect": "CRT_Lottes",
        "scale": [ -1, -1 ]
      }
    ]
  },
  {
    "name": "CRT-Hyllian",
    "effects": [
      {
        "effect": "CRT_Hyllian",
        "scale": [ -1, -1 ]
      }
    ]
  },
  {
    "name": "CRT-Easymode",
    "effects": [
      {
        "effect": "CRT_Easymode",
        "scale": [ -1, -1 ]
      }
    ]
  },
Blinue commented 2 years ago

Thanks for the test, here is a sample config: https://gist.github.com/hooke007/818ecc88f18e229bca743b7ae48947ad#file-scalemodels-json-L240

Gist
[Magpie profile] https://github.com/Blinue/Magpie 示例缩放配置
[Magpie profile] https://github.com/Blinue/Magpie 示例缩放配置 - ScaleModels.json
0x4E69676874466F78 commented 2 years ago

Very nice:

  {"name":"CRT_Lottes+SMAA_High","effects":[
    {"effect":"SMAA_High"},
    {"effect":"CRT_Lottes","scale":[-1,-1],
     "hardScan":-8,"hardPix":-3,"warpX":0.0,"warpY":0.0,
     "maskDark":0.5,"maskLight":1.5,"scaleInLinearGamma":1,"shadowMask":3,"brightBoost":1,
     "hardBloomPix":-1.5,"hardBloomScan":-2,"bloomAmount":0.15,"shape":2},
  ]},

изображение

Thanks again for porting these shaders to Magpie!