mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-23 08:11:29 +11:00
Merge branch 'libretro:master' into master
This commit is contained in:
commit
0d881b43bb
3
crt/shaders/zfast_crt/zfast_crt_coarsemask.slang
Normal file
3
crt/shaders/zfast_crt/zfast_crt_coarsemask.slang
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#version 450
|
||||||
|
|
||||||
|
#include "zfast_crt_impl.inc"
|
8
crt/shaders/zfast_crt/zfast_crt_finemask.slang
Normal file
8
crt/shaders/zfast_crt/zfast_crt_finemask.slang
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#version 450
|
||||||
|
|
||||||
|
// This can't be an option without slowing the shader down.
|
||||||
|
// Note that only the fine mask works on SNES Classic Edition
|
||||||
|
// due to Mali 400 gpu precision.
|
||||||
|
#define FINEMASK
|
||||||
|
|
||||||
|
#include "zfast_crt_impl.inc"
|
|
@ -1,5 +1,3 @@
|
||||||
#version 450
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
zfast_crt_standard - A simple, fast CRT shader.
|
zfast_crt_standard - A simple, fast CRT shader.
|
||||||
|
|
||||||
|
@ -52,10 +50,6 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
//#define FRAGMENT
|
//#define FRAGMENT
|
||||||
//#define VERTEX
|
//#define VERTEX
|
||||||
|
|
||||||
//This can't be an option without slowing the shader down
|
|
||||||
//Comment this out for a coarser 3 pixel mask...which is currently broken
|
|
||||||
//on SNES Classic Edition due to Mali 400 gpu precision
|
|
||||||
#define FINEMASK
|
|
||||||
//Some drivers don't return black with texture coordinates out of bounds
|
//Some drivers don't return black with texture coordinates out of bounds
|
||||||
//SNES Classic is too slow to black these areas out when using fullscreen
|
//SNES Classic is too slow to black these areas out when using fullscreen
|
||||||
//overlays. But you can uncomment the below to black them out if necessary
|
//overlays. But you can uncomment the below to black them out if necessary
|
||||||
|
@ -98,7 +92,7 @@ void main()
|
||||||
float whichmask = fract(floor(vTexCoord.x*params.OutputSize.x*-0.4999));
|
float whichmask = fract(floor(vTexCoord.x*params.OutputSize.x*-0.4999));
|
||||||
float mask = 1.0 + float(whichmask < 0.5) * -MASK_DARK;
|
float mask = 1.0 + float(whichmask < 0.5) * -MASK_DARK;
|
||||||
#else
|
#else
|
||||||
float whichmask = fract(floor(vTexCoord.x*params.OutputSize.x)*-0.3333));
|
float whichmask = fract(floor(vTexCoord.x*params.OutputSize.x)*-0.3333);
|
||||||
float mask = 1.0 + float(whichmask <= 0.33333) * -MASK_DARK;
|
float mask = 1.0 + float(whichmask <= 0.33333) * -MASK_DARK;
|
||||||
#endif
|
#endif
|
||||||
vec3 colour = texture(Source, p).rgb;
|
vec3 colour = texture(Source, p).rgb;
|
4
crt/zfast-crt-hdmask.slangp
Normal file
4
crt/zfast-crt-hdmask.slangp
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
shaders = 1
|
||||||
|
|
||||||
|
shader0 = shaders/zfast_crt/zfast_crt_coarsemask.slang
|
||||||
|
filter_linear0 = true
|
|
@ -1,4 +1,4 @@
|
||||||
shaders = 1
|
shaders = 1
|
||||||
|
|
||||||
shader0 = shaders/zfast_crt.slang
|
shader0 = shaders/zfast_crt/zfast_crt_finemask.slang
|
||||||
filter_linear0 = true
|
filter_linear0 = true
|
Loading…
Reference in a new issue