-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'thirdparty/slang-shaders/' changes from 693c632bdd..ec1b855638
ec1b855638 Add RF-nes presets to crt-royale-fast folder (#640) a8e35920c5 Update crt-geom.slang (#639) 901441a496 Update crt-royale-fast and several presets (#638) 33876b3578 ensure testPattern() always has a return condition 5ab3c76109 update patchy-ntsc shaders and presets (#637) edd2dd3f77 fix some errors identified by librashader scan (#636) 630fe655fe fix mudlord-pal-vhs 49c77cab02 remove another conflicting pass from preset e1f7c6cc0e remove broken/unused pass from preset 0e29397870 add small, colored border shader (#635) 4ef678cab0 fix bad path bd0ea94fc8 fix/update glow-trails shaders and presets (#634) 0dd9204791 Update crt-royale-fast and its presets (#633) 24f9468e2e Add crt-royale-pvm-shmup preset (#632) 0a305b879e Update crt-royale-fast and add new presets (#631) 1b2ad364b7 Add edgeNpixels shader (#630) b9e012f25c Patchy NTSC - Bunch of last minute improvements (#629) 4cf85d3147 New NTSC shader by PlainOldPants (#627) ef68606c0e Add edge1pixel shader (#628) 0cededfa7f ntsc-simple update to glsl version (#626) 811bb31cdb port tiny_ntsc (#625) ef702029d8 Fix color clipping in crt-hyllian (#624) b6b55c3995 Update crt-hyllian (#623) 26e9882eb2 Update crt-hyllian (#622) b3d795acb9 Add crt-royale-ntsc-composite-fast preset (#620) 111fcedc3b Add crt-royale-fast shaders (#619) b327343b77 Fix a 7-year old bug in crt-royale-bloom-approx.h (#618) 679a3321c1 Update crt-geom-mini.slang (#617) f65a4bce69 Sync to koko-aio 1.9.30 (#616) 7d6751a07c update crt-guest to latest (#614) 05a41341be Fix input TF bug & large refactoring; Add box filter AA (#613) 5e702cfdc6 Added flat trinitron TV filters (#611) 1c6f2cd834 Add zfast_crt_geo shader (#612) 46b96cbd39 update crt-geom-mini to glsl version (#610) 959de2bb2e Reverted texture optimizations as they are breaking rendering. (#609) 23f90e3b27 crt-geom-mini update from glsl, crt-pocket fix clamp error (#607) 3796d44482 Update geom.slang (#606) 89dfd9bbd0 Add Geom shader (#605) git-subtree-dir: thirdparty/slang-shaders git-subtree-split: ec1b8556388317258376467c1561ecb91a06a466
- Loading branch information
Showing
330 changed files
with
24,221 additions
and
2,264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
#version 450 | ||
|
||
/* | ||
Annotated Passthru slang shader | ||
by hunterk | ||
license: public domain | ||
*/ | ||
|
||
/* This is a good spot for license blocks and other misc information */ | ||
|
||
/*-------------------- Pass Characteristics --------------------*/ | ||
/* | ||
Most of the pass characteristics/metadata is controlled by shader presets, but we can set a few things directly here via pragmas. | ||
The 'format' pragma sets the output format for the framebuffer. These are the most common. 8-bit UNORM is the default | ||
but integer and float formats can be useful for calculating values in one pass and then using the results in another | ||
*/ | ||
#pragma format R8G8B8A8_UNORM | ||
/* | ||
8-bit | ||
R8G8B8A8_UNORM | ||
R8G8B8A8_UINT | ||
R8G8B8A8_SINT | ||
R8G8B8A8_SRGB | ||
10-bit | ||
A2B10G10R10_UNORM_PACK32 | ||
A2B10G10R10_UINT_PACK32 | ||
16-bit | ||
R16G16B16A16_UINT | ||
R16G16B16A16_SINT | ||
R16G16B16A16_SFLOAT | ||
32-bit | ||
R32G32B32A32_UINT | ||
R32G32B32A32_SINT | ||
R32G32B32A32_SFLOAT | ||
*/ | ||
/* See the spec document for any additional, more esoteric formats. */ | ||
|
||
/* We can use the 'name' pragma to declare a name (called an 'alias' in the presets) for the pass, which can make it easier for other shaders to reference it. | ||
The alias/name can be used to refer to this pass specifically in other passes--FooSize, texture(Foo, coord), etc.--regardless of position/order. */ | ||
#pragma name Foo | ||
|
||
/*------------- Parameters and Variable Structs --------------*/ | ||
/* | ||
This "push_constant" struct contains fast-access uniform data, which may provide better performance vs regular UBOs. | ||
It has a max capacity of 192 bytes, which equates to 48 single-component vectors of float. | ||
We usually use them for runtime parameters, hence the struct name, but you can change that if you like. | ||
*/ | ||
layout(push_constant) uniform Push | ||
{ | ||
float runtime_parameter, user_toggle_parameter, red, green, blue; | ||
} params; | ||
|
||
/* | ||
We can use a pragma to call out "parameters", which are exposed in RetroArch's shader menu for users to modify values on-the-fly without touching code directly. | ||
These parameters are adjustable at runtime. The values are: default, minimum, maximum and step. | ||
*/ | ||
#pragma parameter runtime_parameter "Human-readable Parameter Name" 0.0 -10.0 10.0 0.01 | ||
/* Some authors like to macro the struct name for easier code compatibility with other shader formats (i.e., so you don't need to prepend the struct name on each use): */ | ||
#define runtime_parameter params.runtime_parameter | ||
|
||
/* Sometimes a basic float isn't what your code calls for, so you may want to cast parameters like this: */ | ||
#pragma parameter user_toggle_parameter "A Simple Toggle" 0.0 0.0 1.0 1.0 | ||
bool user_toggle = bool(params.user_toggle_parameter); | ||
|
||
/* or combine parameters like this into a multi-parameter vector of float: */ | ||
#pragma parameter red "Red Channel Intensity" 1.0 0.0 2.0 0.01 | ||
#pragma parameter green "Green Channel Intensity" 1.0 0.0 2.0 0.01 | ||
#pragma parameter blue "Blue Channel Intensity" 1.0 0.0 2.0 0.01 | ||
vec3 colorChannels = vec3(params.red, params.green, params.blue); | ||
|
||
/*-------------------- Include Statements --------------------*/ | ||
/* | ||
You can use include statements, which will copy the contents of the included file directly into this one at compile time. | ||
If there's a possibility of recursive include statements, it's a good idea to wrap that code in an 'ifndef/define' block. | ||
*/ | ||
//#include "shared_parameters.inc" | ||
|
||
/*-------------------- Built-in Uniforms --------------------*/ | ||
/* This "global" struct has no size limit, so if you run out of space in the push_constants struct, you can move things here. We also typically store our built-in uniforms here. */ | ||
layout(std140, set = 0, binding = 0) uniform UBO | ||
{ | ||
mat4 MVP; | ||
/* | ||
A NOTE ABOUT 'FooSize': | ||
The size of a built-in or aliased texture (e.g., Source, Original or, in this | ||
case, Foo) can be accessed as a 4-parameter vector of float that includes the | ||
width, height and the reciprocal of the width and height. Ideally, you can also | ||
access the size of a LUT texture that has an alias set in the preset file, but | ||
not all video drivers in RetroArch play nicely with this, so it's safer--but | ||
slower--to use TextureSize() for that. | ||
*/ | ||
/* The size of the input framebuffer as presented to this stage in the shader pipeline */ | ||
vec4 SourceSize; | ||
/* The size of the raw input framebuffer as presented to the shader pipeline */ | ||
vec4 OriginalSize; | ||
/* The size of the outgoing framebuffer of the current pass */ | ||
vec4 OutputSize; | ||
/* The size of the outgoing framebuffer of the final shader pass, which should always be the size of the user's viewport. */ | ||
vec4 FinalViewportSize; | ||
/* The number of frames generated by the core. Used for animated effects. */ | ||
uint FrameCount; | ||
/* Which way the FrameCount is currently going. A negative value means the content is being "rewound". This is usually used for VCR or "Braid"-like effects. */ | ||
uint FrameDirection; | ||
/* If RetroArch's "subframe" feature is enabled, this ticks up on each subframe and resets on the next full frame. FrameCount is not affected by subframes. */ | ||
uint CurrentSubFrame; | ||
/* The total number of subframes. This number should stay consistent. The ratio of CurrentSubFrame / TotalSubFrames is frequently used. */ | ||
uint TotalSubFrames; | ||
/* The rotation status of the framebuffer. This is used to determine whether content is currently being rotated by the frontend for "TATE" mode (e.g., many arcade games, especially shmups) */ | ||
uint Rotation; | ||
} global; | ||
|
||
/* This is a good spot for common functions that may be used by both the vertex and fragment, since it is accessible in both stages. */ | ||
|
||
/*------------------------- Vertex Shader -------------------------*/ | ||
/* We use pragmas to separate the stages of the shader into vertex and fragment in the same file: */ | ||
#pragma stage vertex | ||
/*--------------------- Vertex Inputs/Outputs ---------------------*/ | ||
layout(location = 0) in vec4 Position; | ||
layout(location = 1) in vec2 TexCoord; | ||
layout(location = 0) out vec2 vTexCoord; | ||
layout(location = 1) out float calc_val; | ||
|
||
/* This is a good spot for vertex-specific functions. */ | ||
|
||
void main() | ||
{ | ||
gl_Position = global.MVP * Position; | ||
vTexCoord = TexCoord; | ||
/* | ||
It's usually best to conduct expensive calculations in the vertex stage, where it's only performed once per vertex vs per-pixel in the fragment stage, | ||
and then pass that value to the fragment, though this isn't possible with all calculations: | ||
*/ | ||
calc_val = (user_toggle) ? min(colorChannels.x, min(colorChannels.y, colorChannels.z)) : max(colorChannels.x, max(colorChannels.y, colorChannels.z)); | ||
} | ||
|
||
/*--------------------- Fragment/Pixel Shader ---------------------*/ | ||
#pragma stage fragment | ||
/*-------------------- Fragment Inputs/Outputs --------------------*/ | ||
layout(location = 0) in vec2 vTexCoord; | ||
layout(location = 1) in float calc_val; | ||
layout(location = 0) out vec4 FragColor; | ||
/*------------------------ Texture Binding ------------------------*/ | ||
/* Source is a built-in alias for the input framebuffer as presented to this stage in the shader pipeline. */ | ||
layout(set = 0, binding = 2) uniform sampler2D Source; | ||
/* PassFeedback* is a built-in alias for the shaded output of the selected pass; used for FIR effects. This can also be aliased, e.g., FooFeedback */ | ||
layout(set = 0, binding = 3) uniform sampler2D PassFeedback0; | ||
/* Original is a built-in alias for the raw input framebuffer as presented to the shader pipeline. */ | ||
layout(set = 0, binding = 4) uniform sampler2D Original; | ||
/* OriginalHistory* is a built-in alias for the input framebuffer from previous frames, working backward. */ | ||
layout(set = 0, binding = 5) uniform sampler2D OriginalHistory1; | ||
|
||
/* This is a good spot for fragment-specific functions. */ | ||
|
||
void main() | ||
{ | ||
vec3 img = texture(Source, vTexCoord).rgb; | ||
img *= colorChannels; | ||
FragColor = vec4(img, 1.0); | ||
} |
4 changes: 2 additions & 2 deletions
4
bezel/Mega_Bezel/Presets/Variations/FBNEO-Vertical__STD.slangp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#reference "../../../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" | ||
#reference "../Base_CRT_Presets/MBZ__3__STD__GDV.slangp" | ||
|
||
HSM_ROTATE_CORE_IMAGE = 1 | ||
HSM_ASPECT_RATIO_MODE = 2 | ||
HSM_ASPECT_RATIO_MODE = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,4 @@ DO_GLOBAL_SHZO = "1.000000" | |
GLOBAL_ZOOM = "1.000000" | ||
|
||
|
||
S_POWER = "0.05" | ||
S_POWER = "0.056" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,4 @@ DO_HALO = "1.000000" | |
HALO_GAMMA_OUT = "1.300000" | ||
HALO_VS_SCAN = "1.000000" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
bezel/koko-aio/Presets-ng/Monitor-VGA-DoubleScan-Amber.slangp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#reference "Monitor-VGA-DoubleScan-Green.slangp" | ||
COLOR_MONO_HUE1 = "0.110000" | ||
COLOR_MONO_HUE2 = "0.110000" | ||
|
44 changes: 44 additions & 0 deletions
44
bezel/koko-aio/Presets-ng/Monitor-VGA-DoubleScan-Green.slangp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#reference "Monitor-VGA-DoubleScan-ShadowMask.slangp" | ||
|
||
IN_GLOW_POWER = "1.000000" | ||
LUMINANCE = "0.000000" | ||
CONTRAST = "-0.020000" | ||
TEMPERATURE = "6500.000000" | ||
IN_GLOW_GAMMA = "2.200000" | ||
GAMMA_OUT = "0.450000" | ||
|
||
COLOR_MONO_COLORIZE = "1.000000" | ||
COLOR_MONO_HUE1 = "0.410000" | ||
COLOR_MONO_HUE2 = "0.410000" | ||
COLOR_MONO_HUE_BIAS = "0.010000" | ||
|
||
DO_PPERSISTENCE = "1.000000" | ||
PPERSISTENCE_START = "0.900000" | ||
PPERSISTENCE_END = "0.500000" | ||
|
||
DO_SHIFT_RGB = "0.000000" | ||
|
||
DO_IN_GLOW = "1.000000" | ||
IN_GLOW_W = "7.000000" | ||
IN_GLOW_WARPSHARP_X = "0.75" | ||
IN_GLOW_WARPSHARP_Y = "0.75" | ||
|
||
DO_PIXELGRID_H = "0.400000" | ||
PIXELGRID_MAX_H = "1.000000" | ||
PIXELGRID_GAMMA_H = "2.20000" | ||
DO_PIXELGRID_W = "0.000000" | ||
PIXELGRID_DO_SHADOWMASK = "0.000000" | ||
|
||
DO_HALO = "0.000000" | ||
|
||
BLOOM_MIX = "0.110000" | ||
BLOOM_SIZE = "2.000000" | ||
BLOOM_GAMMA = "2.000000" | ||
BLOOM_GAMMA_OUT = "0.500000" | ||
BLOOM_POWER = "1.300000" | ||
BLOOM_EYE_ADPT_SRT = "0.000000" | ||
BLOOM_EYE_INERTIA = "10.000000" | ||
BLOOM_OVER_WHITE = "0.500000" | ||
|
||
S_SIZE = "1.000000" | ||
S_POWER = "0.097000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
#reference "Base.slangp" | ||
BEZEL_R = "0.090000" | ||
BEZEL_G = "0.060000" | ||
BEZEL_B = "0.025000" | ||
BEZEL_CON = "3.0" | ||
BEZEL_REFL_STRENGTH = "0.700000" | ||
BEZEL_ROUGHNESS = "3.000002" | ||
BEZEL_DIFFUSION_STR = "0.100000" | ||
BEZEL_SPCL_STRENGTH = "0.100000" | ||
|
||
DO_IN_GLOW = "0.000000" | ||
PIXELGRID_INTR_DISABLE_Y = "2.000000" | ||
PIXELGRID_INTR_FLICK_MODE = "0.000000" | ||
PIXELGRID_DOUBLESCAN = "1.000000" | ||
PIXELGRID_COREY_FAKE_SCAN = "1.000000" | ||
PIXELGRID_COREY_FAKE_SCAN = "-1.000000" | ||
PIXELGRID_H_PRST = "1.000000" | ||
DO_PIXELGRID_H = "0.600000" | ||
|
||
GEOM_CORNER_SIZE = "0.005000" | ||
GEOM_CORNER_SMOOTH = "200.000000" | ||
|
||
AMBI_OVER_BEZEL = "0.000000" | ||
AMBI_OVER_BEZEL_SIZE = "0.000000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.