mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-21 23:31:30 +11:00
small update and a preset (#449)
update crt-simple, add crt-geom-simple preset
This commit is contained in:
parent
0eaf552fc7
commit
4e7d3480f5
|
@ -12,18 +12,20 @@
|
|||
*
|
||||
*
|
||||
*/
|
||||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
vec4 SourceSize;
|
||||
vec4 OriginalSize;
|
||||
vec4 OutputSize;
|
||||
uint FrameCount;
|
||||
float DISTORTION,SCANLINE,INPUTGAMMA,OUTPUTGAMMA,MASK,SIZE;
|
||||
float DISTORTION,SCANLINE,INPUTGAMMA,OUTPUTGAMMA,MASK,SIZE,DOWNSCALE;
|
||||
} params;
|
||||
|
||||
// Parameter lines go here:
|
||||
#pragma parameter DISTORTION "Distortion" 0.12 0.0 0.30 0.01
|
||||
#pragma parameter SCANLINE "Scanline Weight" 0.3 0.2 0.6 0.05
|
||||
#pragma parameter DOWNSCALE "Scanlines Downscale" 1.0 1.0 2.0 1.0
|
||||
#pragma parameter INPUTGAMMA "Input Gamma" 2.4 0.0 4.0 0.05
|
||||
#pragma parameter OUTPUTGAMMA "Output Gamma" 2.2 0.0 4.0 0.05
|
||||
#pragma parameter MASK "Mask Brightness" 0.7 0.0 1.0 0.05
|
||||
|
@ -35,6 +37,7 @@ layout(push_constant) uniform Push
|
|||
#define OUTPUTGAMMA params.OUTPUTGAMMA
|
||||
#define MASK params.MASK
|
||||
#define SIZE params.SIZE
|
||||
#define DOWNSCALE params.DOWNSCALE
|
||||
|
||||
#define SourceSize params.SourceSize
|
||||
#define OriginalSize params.OriginalSize
|
||||
|
@ -133,7 +136,7 @@ void main()
|
|||
// Of all the pixels that are mapped onto the texel we are
|
||||
// currently rendering, which pixel are we currently rendering?
|
||||
vec2 ratio_scale = xy * SourceSize.xy - 0.5;
|
||||
vec2 uv_ratio = fract(ratio_scale);
|
||||
vec2 uv_ratio = fract(ratio_scale/DOWNSCALE);
|
||||
|
||||
// Snap to the center of the underlying texel.
|
||||
xy = (floor(ratio_scale) + 0.5) / SourceSize.xy;
|
||||
|
|
27
presets/crt-geom-simple.slangp
Normal file
27
presets/crt-geom-simple.slangp
Normal file
|
@ -0,0 +1,27 @@
|
|||
shaders = "3"
|
||||
feedback_pass = "0"
|
||||
shader0 = "../misc/shaders/simple_color_controls.slang"
|
||||
filter_linear0 = "false"
|
||||
scale_type_x0 = "source"
|
||||
scale_x0 = "1.000000"
|
||||
scale_type_y0 = "source"
|
||||
scale_y0 = "1.000000"
|
||||
shader1 = "../misc/shaders/chromaticity.slang"
|
||||
filter_linear1 = "false"
|
||||
shader2 = "../crt/shaders/crt-simple.slang"
|
||||
filter_linear2 = "true"
|
||||
scale_type_x2 = "viewport"
|
||||
scale_x2 = "1.000000"
|
||||
scale_type_y2 = "viewport"
|
||||
scale_y2 = "1.000000"
|
||||
TEMP = "7079.000000"
|
||||
SAT = "1.080000"
|
||||
BRIGHTNESS = "1.020000"
|
||||
contrast = "1.020000"
|
||||
BLACK = "0.010000"
|
||||
postbr = "1.050000"
|
||||
gamma_out_red = "2.300000"
|
||||
gamma_out_green = "2.100000"
|
||||
DISTORTION = "0.100000"
|
||||
INPUTGAMMA = "2.000000"
|
||||
OUTPUTGAMMA = "2.000000"
|
Loading…
Reference in a new issue