update guest's crt shaders to include some last-minute changes (#365)

This commit is contained in:
hunterk 2023-02-05 12:17:01 -06:00 committed by GitHub
parent 2b63603462
commit 356678ec53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 50 additions and 23 deletions

View file

@ -195,7 +195,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
#pragma parameter smoothmask " Smooth Masks in bright scanlines" 0.0 0.0 1.0 1.0
#define smoothmask global.smoothmask
#pragma parameter gamma_out "Gamma out" 1.95 1.0 5.0 0.05
#pragma parameter gamma_out " Gamma out" 1.95 1.0 5.0 0.05
#define gamma_out global.gamma_out // output gamma
@ -461,7 +461,7 @@ float SlotMask(vec2 pos, float m)
if ((slotmask + slotmask1) == 0.0) return 1.0;
else
{
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + 1.0;
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + slotms;
pos = floor(pos/slotms);
float mlen = slotwidth*2.0;
float px = fract(pos.x/mlen);
@ -667,7 +667,7 @@ if ((abs(global.deconrr) + abs(global.deconrry) + abs(global.deconrg) + abs(glob
float smask = SlotMask(maskcoord, mx);
cmask*= Mask(maskcoord, mx, mb);
if (mask_layout > 0.5) cmask = cmask.bgr;
if (mask_layout > 0.5) cmask = cmask.rbg;
cmask*=smask;
vec3 cmask1 = cmask;

View file

@ -198,7 +198,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
#pragma parameter smoothmask " Smooth Masks in bright scanlines" 0.0 0.0 1.0 1.0
#define smoothmask global.smoothmask
#pragma parameter gamma_out "Gamma out" 2.4 1.0 5.0 0.05
#pragma parameter gamma_out " Gamma out" 2.4 1.0 5.0 0.05
#define gamma_out global.gamma_out // output gamma
@ -464,7 +464,7 @@ float SlotMask(vec2 pos, float m)
if ((slotmask + slotmask1) == 0.0) return 1.0;
else
{
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + 1.0;
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + slotms;
pos = floor(pos/slotms);
float mlen = slotwidth*2.0;
float px = fract(pos.x/mlen);
@ -672,7 +672,7 @@ if ((abs(global.deconrr) + abs(global.deconrry) + abs(global.deconrg) + abs(glob
float smask = SlotMask(maskcoord, mx);
cmask*= Mask(maskcoord, mx, mb);
if (mask_layout > 0.5) cmask = cmask.bgr;
if (mask_layout > 0.5) cmask = cmask.rbg;
cmask*=smask;
vec3 cmask1 = cmask;

View file

@ -33,7 +33,8 @@ layout(push_constant) uniform Push
float intres;
float iscans;
float downsample_levelx;
float downsample_levely;
float downsample_levely;
float gamma_out;
} params;
@ -43,10 +44,14 @@ layout(std140, set = 0, binding = 0) uniform UBO
mat4 MVP;
} global;
#pragma parameter bogus_gamma "[ GAMMA OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter GAMMA_INPUT "Gamma Input" 2.0 1.0 5.0 0.05
#pragma parameter GAMMA_INPUT " Gamma Input" 2.0 1.0 5.0 0.05
#define GAMMA_INPUT params.GAMMA_INPUT
#pragma parameter gamma_out " Gamma out" 1.95 1.0 5.0 0.05
#define gamma_out params.gamma_out // output gamma
#pragma parameter bogus_interlacing "[ INTERLACING OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter inter " Interlace Trigger Resolution :" 400.0 0.0 800.0 25.0

View file

@ -33,7 +33,8 @@ layout(push_constant) uniform Push
float intres;
float iscans;
float downsample_levelx;
float downsample_levely;
float downsample_levely;
float gamma_out;
} params;
@ -44,9 +45,14 @@ layout(std140, set = 0, binding = 0) uniform UBO
} global;
#pragma parameter GAMMA_INPUT "Gamma Input" 2.4 1.0 5.0 0.05
#pragma parameter bogus_gamma "[ GAMMA OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter GAMMA_INPUT " Gamma Input" 2.4 1.0 5.0 0.05
#define GAMMA_INPUT params.GAMMA_INPUT
#pragma parameter gamma_out " Gamma out" 2.4 1.0 5.0 0.05
#define gamma_out params.gamma_out // output gamma
#pragma parameter bogus_interlacing "[ INTERLACING OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter inter " Interlace Trigger Resolution :" 400.0 0.0 800.0 25.0

View file

@ -190,7 +190,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
#pragma parameter DES " Deconvergence Strength" 0.7 0.0 1.0 0.05
#pragma parameter gamma_out "Gamma out" 2.4 1.0 5.0 0.05
#pragma parameter gamma_out " Gamma out" 2.4 1.0 5.0 0.05
#define gamma_out params.gamma_out // output gamma
#pragma parameter inters " Interlacing Effect Smoothness" 0.0 0.0 0.5 0.05 // Joint parameter with linearize pass, values must match
@ -465,7 +465,7 @@ float SlotMask(vec2 pos, float m)
if ((slotmask + slotmask1) == 0.0) return 1.0;
else
{
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + 1.0;
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + slotms;
pos = floor(pos/slotms);
float mlen = slotwidth*2.0;
float px = fract(pos.x/mlen);
@ -731,7 +731,7 @@ if (abs(vertmask) > 0.025)
float smask = SlotMask(gl_FragCoord.xy * 1.000001, mx);
cmask*= Mask(gl_FragCoord.xy * 1.000001, mx);
if (mask_layout > 0.5) cmask = cmask.bgr;
if (mask_layout > 0.5) cmask = cmask.rbg;
color = color*cmask;
color = min(color,1.0);

View file

@ -184,7 +184,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
#pragma parameter smoothmask " Smooth Masks in bright scanlines" 0.0 0.0 1.0 1.0
#define smoothmask global.smoothmask
#pragma parameter gamma_out "Gamma out" 2.4 1.0 5.0 0.05
#pragma parameter gamma_out " Gamma out" 2.4 1.0 5.0 0.05
#define gamma_out global.gamma_out // output gamma
@ -448,7 +448,7 @@ float SlotMask(vec2 pos, float m)
if ((slotmask + slotmask1) == 0.0) return 1.0;
else
{
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + 1.0;
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + slotms;
pos = floor(pos/slotms);
float mlen = slotwidth*2.0;
float px = fract(pos.x/mlen);
@ -649,7 +649,7 @@ if ((abs(global.deconrr) + abs(global.deconrry) + abs(global.deconrg) + abs(glob
float smask = SlotMask(maskcoord, mx);
cmask*= Mask(maskcoord, mx, mb);
if (mask_layout > 0.5) cmask = cmask.bgr;
if (mask_layout > 0.5) cmask = cmask.rbg;
cmask*=smask;
vec3 cmask1 = cmask;

View file

@ -33,7 +33,8 @@ layout(push_constant) uniform Push
float intres;
float iscans;
float downsample_levelx;
float downsample_levely;
float downsample_levely;
float gamma_out;
} params;
@ -43,10 +44,15 @@ layout(std140, set = 0, binding = 0) uniform UBO
mat4 MVP;
} global;
#pragma parameter bogus_gamma "[ GAMMA OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter GAMMA_INPUT "Gamma Input" 2.4 1.0 5.0 0.05
#pragma parameter GAMMA_INPUT " Gamma Input" 2.4 1.0 5.0 0.05
#define GAMMA_INPUT params.GAMMA_INPUT
#pragma parameter gamma_out " Gamma out" 2.4 1.0 5.0 0.05
#define gamma_out params.gamma_out // output gamma
#pragma parameter bogus_interlacing "[ INTERLACING OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter inter " Interlace Trigger Resolution :" 400.0 0.0 800.0 25.0

View file

@ -34,6 +34,7 @@ layout(push_constant) uniform Push
float inters;
float iscan;
float intres;
float gamma_out;
} params;
@ -42,10 +43,14 @@ layout(std140, set = 0, binding = 0) uniform UBO
mat4 MVP;
} global;
#pragma parameter bogus_gamma "[ GAMMA OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter GAMMA_INPUT "Gamma Input" 2.4 1.0 5.0 0.05
#pragma parameter GAMMA_INPUT " Gamma Input" 2.4 1.0 5.0 0.05
#define GAMMA_INPUT params.GAMMA_INPUT
#pragma parameter gamma_out " Gamma out" 2.4 1.0 5.0 0.05
#define gamma_out params.gamma_out // output gamma
#pragma parameter bogus_interlacing "[ INTERLACING OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter inter " Interlace Trigger Resolution :" 400.0 0.0 800.0 25.0

View file

@ -187,7 +187,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
#pragma parameter smoothmask " Smooth Masks in bright scanlines" 0.0 0.0 1.0 1.0
#define smoothmask global.smoothmask
#pragma parameter gamma_out "Gamma out" 1.75 1.0 5.0 0.05
#pragma parameter gamma_out " Gamma out" 1.75 1.0 5.0 0.05
#define gamma_out global.gamma_out // output gamma
@ -451,7 +451,7 @@ float SlotMask(vec2 pos, float m)
if ((slotmask + slotmask1) == 0.0) return 1.0;
else
{
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + 1.0;
if (shadowMask == 2.0 || shadowMask == 6.0) pos.x = pos.x + slotms;
pos = floor(pos/slotms);
float mlen = slotwidth*2.0;
float px = fract(pos.x/mlen);
@ -653,7 +653,7 @@ if ((abs(global.deconrr) + abs(global.deconrry) + abs(global.deconrg) + abs(glob
float smask = SlotMask(maskcoord, mx);
cmask*= Mask(maskcoord, mx, mb);
if (mask_layout > 0.5) cmask = cmask.bgr;
if (mask_layout > 0.5) cmask = cmask.rbg;
cmask*=smask;
vec3 cmask1 = cmask;

View file

@ -33,6 +33,7 @@ layout(push_constant) uniform Push
float iscan;
float intres;
float iscans;
float gamma_out;
} params;
@ -42,10 +43,14 @@ layout(std140, set = 0, binding = 0) uniform UBO
mat4 MVP;
} global;
#pragma parameter bogus_gamma "[ GAMMA OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter GAMMA_INPUT "Gamma Input" 1.80 1.0 5.0 0.05
#pragma parameter GAMMA_INPUT " Gamma Input" 1.80 1.0 5.0 0.05
#define GAMMA_INPUT params.GAMMA_INPUT
#pragma parameter gamma_out " Gamma out" 1.75 1.0 5.0 0.05
#define gamma_out params.gamma_out // output gamma
#pragma parameter bogus_interlacing "[ INTERLACING OPTIONS ]: " 0.0 0.0 0.0 1.0
#pragma parameter inter " Interlace Trigger Resolution :" 400.0 0.0 800.0 25.0