EmulatorJS / EmulatorJS

The official home of the EmulatorJS project
https://emulatorjs.org
GNU General Public License v3.0
1.29k stars 440 forks source link

Extended shader configuration format and custom shaders #802

Closed n-at closed 1 month ago

n-at commented 2 months ago

Added extended shader configuration format. It allows to define shaders consisting of multiple files. Previous format also works.

Added EJS_shader configuration for custom shaders:

window.EJS_shaders = {
    //https://github.com/libretro/glsl-shaders/blob/master/anti-aliasing/fxaa.glslp
    "fxaa": {
        "shader": {
            "type": "text",
            "value": "shaders = 1\n\nshader0 = fxaa.glsl\nfilter_linear0 = true\n",
        },
        "resources": [
            {
                "name": "fxaa.glsl",
                "type": "base64",
                "value": "...BASE64 string...",
            },
        ],
    },
};

Added SABR and CRT beam shaders.

ethanaobrien commented 2 months ago

Just a note: I won’t be able to review for about a week

ethanaobrien commented 1 month ago

Finally got around to reviewing - thank you!