Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro Assets
slang-shaders
Commits
83485c69
Commit
83485c69
authored
Oct 26, 2020
by
hunterk
Browse files
add an option to freeze the newpixie scanlines and fix the bezel image
parent
547e9671
Changes
1
Hide whitespace changes
Inline
Side-by-side
crt/shaders/newpixie/newpixie-crt.slang
View file @
83485c69
...
...
@@ -54,12 +54,14 @@ layout(push_constant) uniform Push
float use_frame;
float curvature;
float wiggle_toggle;
float scanroll;
} params;
#pragma parameter use_frame "Use Frame Image" 0.0 0.0 1.0 1.0
#define use_frame params.use_frame
#pragma parameter curvature "Curvature" 2.0 0.0001 4.0 0.25
#pragma parameter wiggle_toggle "Interference" 0.0 0.0 1.0 1.0
#pragma parameter scanroll "Rolling Scanlines" 1.0 0.0 1.0 1.0
#define gl_FragCoord (vTexCoord.xy * params.OutputSize.xy)
#define backbuffer accum1
...
...
@@ -175,6 +177,8 @@ void main()
float vig = (0.1 + 1.0*16.0*curved_uv.x*curved_uv.y*(1.0-curved_uv.x)*(1.0-curved_uv.y));
vig = 1.3*pow(vig,0.5);
col *= vig;
time *= params.scanroll;
/* Scanlines */
float scans = clamp( 0.35+0.18*sin(6.0*time-curved_uv.y*resolution.y*1.5), 0.0, 1.0);
...
...
@@ -206,7 +210,7 @@ void main()
/* Frame */
vec2 fscale = vec2( 0.026, -0.018);//vec2( -0.018, -0.013 );
uv = vec2(uv.x, 1.-uv.y);
vec4 f=texture(frametexture,
u
v*((1.0)+2.0*fscale)-fscale-vec2(-0.0, 0.005));
vec4 f=texture(frametexture,v
TexCoord.xy);//
*((1.0)+2.0*fscale)-fscale-vec2(-0.0, 0.005));
f.xyz = mix( f.xyz, vec3(0.5,0.5,0.5), 0.5 );
float fvig = clamp( -0.00+512.0*uv.x*uv.y*(1.0-uv.x)*(1.0-uv.y), 0.2, 0.8 );
col = mix( col, mix( max( col, 0.0), pow( abs( f.xyz ), vec3( 1.4 ) ) * fvig, f.w * f.w), vec3( use_frame ) );
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment