Merge pull request #287 from DigiDwrf/master

CRT Maximus Royale filter added
This commit is contained in:
hizzlekizzle 2022-09-04 12:52:00 -05:00 committed by GitHub
commit ec7ca0125d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 1774 additions and 0 deletions

View file

@ -0,0 +1,216 @@
shaders = "20"
shader0 = "shaders/crt-maximus-royale/src/H_blur.slang"
filter_linear0 = "false"
srgb_framebuffer0 = "true"
scale_type0 = "source"
scale0 = "1.0"
shader1 = "shaders/crt-royale/src/crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
alias1 = "ORIG_LINEARIZED"
srgb_framebuffer1 = "true"
scale_type1 = "source"
scale1 = "1.0"
shader2 = "shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
srgb_framebuffer2 = "true"
scale_type_x2 = "source"
scale_type_y2 = "source"
scale_x2 = "1.0"
scale_y2 = "3.0"
shader3 = "shaders/crt-maximus-royale/src/resize.slang"
filter_linear3 = "true"
alias3 = "VERTICAL_SCANLINES"
srgb_framebuffer3 = "true"
scale_type_x3 = "source"
scale_type_y3 = "viewport"
scale_x3 = "1.0"
scale_y3 = "1.95"
shader4 = "shaders/crt-royale/src/crt-royale-bloom-approx.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
srgb_framebuffer4 = "true"
scale_type_x4 = "absolute"
scale_type_y4 = "absolute"
scale_x4 = "320"
scale_y4 = "240"
shader5 = "shaders/crt-maximus-royale/src/resize.slang"
filter_linear5 = "true"
alias5 = "BLOOM_APPROX"
srgb_framebuffer5 = "true"
scale_type5 = "source"
scale5 = "1.0"
shader6 = "../blurs/blur9fast-vertical.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
srgb_framebuffer6 = "true"
scale_type6 = "source"
scale6 = "1.0"
shader7 = "../blurs/blur9fast-horizontal.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
alias7 = "HALATION_BLUR"
srgb_framebuffer7 = "true"
scale_type7 = "source"
scale7 = "1.0"
shader8 = "shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
srgb_framebuffer8 = "false"
scale_type_x8 = "absolute"
scale_type_y8 = "viewport"
scale_x8 = "128"
scale_y8 = "0.975"
shader9 = "shaders/crt-royale/src/crt-royale-mask-resize-horizontal.slang"
filter_linear9 = "false"
wrap_mode9 = "clamp_to_border"
alias9 = "MASK_RESIZE"
srgb_framebuffer9 = "true"
scale_type_x9 = "viewport"
scale_type_y9 = "source"
scale_x9 = "0.73125"
scale_y9 = "1.0"
shader10 = "shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_edge"
alias10 = "MASKED_SCANLINES"
srgb_framebuffer10 = "true"
scale_type10 = "source"
scale10 = "1.0"
shader11 = "shaders/crt-royale/src/crt-royale-brightpass.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
alias11 = "BRIGHTPASS"
srgb_framebuffer11 = "true"
scale_type11 = "source"
scale11 = "1.0"
shader12 = "shaders/crt-royale/src/crt-royale-bloom-vertical.slang"
filter_linear12 = "true"
wrap_mode12 = "clamp_to_border"
srgb_framebuffer12 = "true"
scale_type12 = "source"
scale12 = "1.0"
shader13 = "shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang"
filter_linear13 = "true"
wrap_mode13 = "clamp_to_border"
srgb_framebuffer13 = "true"
scale_type13 = "source"
scale13 = "1.0"
shader14 = "shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.slang"
filter_linear14 = "true"
alias14 = "LAST_PASS"
mipmap_input14 = "true"
srgb_framebuffer14 = "true"
scale_type14 = "source"
scale14 = "1.0"
shader15 = "shaders/crt-maximus-royale/src/crt_reflect.slang"
filter_linear15 = "true"
alias15 = "BORDER_REFLECTION"
wrap_mode15 = "clamp_to_border"
srgb_framebuffer15 = "false"
scale_type_x15 = "absolute"
scale_type_y15 = "absolute"
scale_x15 = "160"
scale_y15 = "120"
shader16 = "shaders/crt-maximus-royale/src/BGcolor_pass1.slang"
filter_linear16 = "false"
wrap_mode16 = "clamp_to_border"
alias16 = "BGPASS1"
srgb_framebuffer16 = "false"
scale_type_x16 = "absolute"
scale_type_y16 = "absolute"
scale_x16 = "1.0"
scale_y16 = "100.0"
shader17 = "shaders/crt-maximus-royale/src/BGcolor_pass2.slang"
filter_linear17 = "false"
wrap_mode17 = "clamp_to_border"
alias17 = "BGPASS2"
srgb_framebuffer17 = "false"
scale_type17 = "absolute"
scale17 = "1.0"
shader18 = "shaders/crt-maximus-royale/src/imgborder.slang"
filter_linear18 = "true"
wrap_mode18 = "clamp_to_border"
scale_type18 = "viewport"
scale18 = "1.0"
shader19 = "shaders/crt-maximus-royale/src/tv_reflection.slang"
filter_linear19 = "true"
wrap_mode19 = "clamp_to_border"
scale_type19 = "source"
scale19 = "1.0"
crt_gamma = "1.7"
lcd_gamma = "1.2"
diffusion_weight = "0.3"
beam_spot_power = "0.22"
beam_min_sigma = "0.1"
beam_max_shape = "2.0"
mask_sample_mode_desired = "0.0"
aa_cubic_c = "0.0"
geom_mode_runtime = "1.0"
border_size = "0.0"
border_darkness = "0.0"
textures = "mask_grille_texture_small;mask_grille_texture_large;mask_slot_texture_small;mask_slot_texture_large;mask_shadow_texture_small;mask_shadow_texture_large;TVBORDER1;TVBORDER2;TVBORDER3;TVBORDER2BG;TVBORDER3BG;TVBORDER2LED;TVBORDER3LED;TVLIGHTS1;TVLIGHTS3;MONITORBORDER;MONITORLIGHTS;SHAPE1;SHAPE2"
mask_grille_texture_small_linear = "true"
mask_grille_texture_small_wrap_mode = "repeat"
mask_grille_texture_small_mipmap = "false"
mask_grille_texture_large_linear = "true"
mask_grille_texture_large_wrap_mode = "repeat"
mask_grille_texture_large_mipmap = "true"
mask_slot_texture_small_linear = "true"
mask_slot_texture_small_wrap_mode = "repeat"
mask_slot_texture_small_mipmap = "false"
mask_slot_texture_large_linear = "true"
mask_slot_texture_large_wrap_mode = "repeat"
mask_slot_texture_large_mipmap = "true"
mask_shadow_texture_small_linear = "true"
mask_shadow_texture_small_wrap_mode = "repeat"
mask_shadow_texture_small_mipmap = "false"
mask_shadow_texture_large_linear = "true"
mask_shadow_texture_large_wrap_mode = "repeat"
mask_shadow_texture_large_mipmap = "true"
TVBORDER1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_1.png"
TVBORDER2 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2.png"
TVBORDER3 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3.png"
TVBORDER2BG = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2_bg.png"
TVBORDER3BG = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_bg.png"
TVBORDER2LED = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2_led.png"
TVBORDER3LED = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_led.png"
TVLIGHTS1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_1_lights_alpha.png"
TVLIGHTS3 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_lights_alpha.png"
MONITORBORDER = "shaders/crt-maximus-royale/FrameTextures/16_9/MONITOR_frame.png"
MONITORLIGHTS = "shaders/crt-maximus-royale/FrameTextures/16_9/MONITOR_frame_lights_alpha.png"
SHAPE1 = "shaders/crt-maximus-royale/FrameTextures/16_9/frame_1_shape.png"
SHAPE2 = "shaders/crt-maximus-royale/FrameTextures/16_9/frame_2_shape.png"
DECOR1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_decor_1.png"
mask_grille_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphor128px.png"
mask_grille_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphor512px.png"
mask_slot_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorMatrix128px.png"
mask_slot_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorMatrix512px.png"
mask_shadow_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorDots128px.png"
mask_shadow_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorDots512px.png"

View file

@ -0,0 +1,216 @@
shaders = "20"
shader0 = "shaders/crt-maximus-royale/src/H_blur.slang"
filter_linear0 = "false"
srgb_framebuffer0 = "true"
scale_type0 = "source"
scale0 = "0.5"
shader1 = "shaders/crt-royale/src/crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang"
filter_linear1 = "true"
wrap_mode1 = "clamp_to_border"
alias1 = "ORIG_LINEARIZED"
srgb_framebuffer1 = "true"
scale_type1 = "source"
scale1 = "1.0"
shader2 = "shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang"
filter_linear2 = "true"
wrap_mode2 = "clamp_to_border"
srgb_framebuffer2 = "true"
scale_type_x2 = "source"
scale_type_y2 = "source"
scale_x2 = "1.0"
scale_y2 = "3.0"
shader3 = "shaders/crt-maximus-royale/src/resize.slang"
filter_linear3 = "true"
alias3 = "VERTICAL_SCANLINES"
srgb_framebuffer3 = "true"
scale_type_x3 = "source"
scale_type_y3 = "viewport"
scale_x3 = "1.0"
scale_y3 = "1.95"
shader4 = "shaders/crt-royale/src/crt-royale-bloom-approx.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
srgb_framebuffer4 = "true"
scale_type_x4 = "absolute"
scale_type_y4 = "absolute"
scale_x4 = "320"
scale_y4 = "240"
shader5 = "shaders/crt-maximus-royale/src/resize.slang"
filter_linear5 = "true"
alias5 = "BLOOM_APPROX"
srgb_framebuffer5 = "true"
scale_type5 = "source"
scale5 = "1.0"
shader6 = "../blurs/blur9fast-vertical.slang"
filter_linear6 = "true"
wrap_mode6 = "clamp_to_border"
srgb_framebuffer6 = "true"
scale_type6 = "source"
scale6 = "1.0"
shader7 = "../blurs/blur9fast-horizontal.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
alias7 = "HALATION_BLUR"
srgb_framebuffer7 = "true"
scale_type7 = "source"
scale7 = "1.0"
shader8 = "shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang"
filter_linear8 = "true"
wrap_mode8 = "clamp_to_border"
srgb_framebuffer8 = "false"
scale_type_x8 = "absolute"
scale_type_y8 = "viewport"
scale_x8 = "128"
scale_y8 = "0.975"
shader9 = "shaders/crt-royale/src/crt-royale-mask-resize-horizontal.slang"
filter_linear9 = "false"
wrap_mode9 = "clamp_to_border"
alias9 = "MASK_RESIZE"
srgb_framebuffer9 = "true"
scale_type_x9 = "viewport"
scale_type_y9 = "source"
scale_x9 = "0.73125"
scale_y9 = "1.0"
shader10 = "shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_edge"
alias10 = "MASKED_SCANLINES"
srgb_framebuffer10 = "true"
scale_type10 = "source"
scale10 = "1.0"
shader11 = "shaders/crt-royale/src/crt-royale-brightpass.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
alias11 = "BRIGHTPASS"
srgb_framebuffer11 = "true"
scale_type11 = "source"
scale11 = "1.0"
shader12 = "shaders/crt-royale/src/crt-royale-bloom-vertical.slang"
filter_linear12 = "true"
wrap_mode12 = "clamp_to_border"
srgb_framebuffer12 = "true"
scale_type12 = "source"
scale12 = "1.0"
shader13 = "shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang"
filter_linear13 = "true"
wrap_mode13 = "clamp_to_border"
srgb_framebuffer13 = "true"
scale_type13 = "source"
scale13 = "1.0"
shader14 = "shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.slang"
filter_linear14 = "true"
alias14 = "LAST_PASS"
mipmap_input14 = "true"
srgb_framebuffer14 = "true"
scale_type14 = "source"
scale14 = "1.0"
shader15 = "shaders/crt-maximus-royale/src/crt_reflect.slang"
filter_linear15 = "true"
alias15 = "BORDER_REFLECTION"
wrap_mode15 = "clamp_to_border"
srgb_framebuffer15 = "false"
scale_type_x15 = "absolute"
scale_type_y15 = "absolute"
scale_x15 = "160"
scale_y15 = "120"
shader16 = "shaders/crt-maximus-royale/src/BGcolor_pass1.slang"
filter_linear16 = "false"
wrap_mode16 = "clamp_to_border"
alias16 = "BGPASS1"
srgb_framebuffer16 = "false"
scale_type_x16 = "absolute"
scale_type_y16 = "absolute"
scale_x16 = "1.0"
scale_y16 = "100.0"
shader17 = "shaders/crt-maximus-royale/src/BGcolor_pass2.slang"
filter_linear17 = "false"
wrap_mode17 = "clamp_to_border"
alias17 = "BGPASS2"
srgb_framebuffer17 = "false"
scale_type17 = "absolute"
scale17 = "1.0"
shader18 = "shaders/crt-maximus-royale/src/imgborder.slang"
filter_linear18 = "true"
wrap_mode18 = "clamp_to_border"
scale_type18 = "viewport"
scale18 = "1.0"
shader19 = "shaders/crt-maximus-royale/src/tv_reflection.slang"
filter_linear19 = "true"
wrap_mode19 = "clamp_to_border"
scale_type19 = "source"
scale19 = "1.0"
crt_gamma = "1.7"
lcd_gamma = "1.2"
diffusion_weight = "0.3"
beam_spot_power = "0.22"
beam_min_sigma = "0.1"
beam_max_shape = "2.0"
mask_sample_mode_desired = "0.0"
aa_cubic_c = "0.0"
geom_mode_runtime = "1.0"
border_size = "0.0"
border_darkness = "0.0"
textures = "mask_grille_texture_small;mask_grille_texture_large;mask_slot_texture_small;mask_slot_texture_large;mask_shadow_texture_small;mask_shadow_texture_large;TVBORDER1;TVBORDER2;TVBORDER3;TVBORDER2BG;TVBORDER3BG;TVBORDER2LED;TVBORDER3LED;TVLIGHTS1;TVLIGHTS3;MONITORBORDER;MONITORLIGHTS;SHAPE1;SHAPE2"
mask_grille_texture_small_linear = "true"
mask_grille_texture_small_wrap_mode = "repeat"
mask_grille_texture_small_mipmap = "false"
mask_grille_texture_large_linear = "true"
mask_grille_texture_large_wrap_mode = "repeat"
mask_grille_texture_large_mipmap = "true"
mask_slot_texture_small_linear = "true"
mask_slot_texture_small_wrap_mode = "repeat"
mask_slot_texture_small_mipmap = "false"
mask_slot_texture_large_linear = "true"
mask_slot_texture_large_wrap_mode = "repeat"
mask_slot_texture_large_mipmap = "true"
mask_shadow_texture_small_linear = "true"
mask_shadow_texture_small_wrap_mode = "repeat"
mask_shadow_texture_small_mipmap = "false"
mask_shadow_texture_large_linear = "true"
mask_shadow_texture_large_wrap_mode = "repeat"
mask_shadow_texture_large_mipmap = "true"
TVBORDER1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_1.png"
TVBORDER2 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2.png"
TVBORDER3 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3.png"
TVBORDER2BG = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2_bg.png"
TVBORDER3BG = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_bg.png"
TVBORDER2LED = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2_led.png"
TVBORDER3LED = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_led.png"
TVLIGHTS1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_1_lights_alpha.png"
TVLIGHTS3 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_lights_alpha.png"
MONITORBORDER = "shaders/crt-maximus-royale/FrameTextures/16_9/MONITOR_frame.png"
MONITORLIGHTS = "shaders/crt-maximus-royale/FrameTextures/16_9/MONITOR_frame_lights_alpha.png"
SHAPE1 = "shaders/crt-maximus-royale/FrameTextures/16_9/frame_1_shape.png"
SHAPE2 = "shaders/crt-maximus-royale/FrameTextures/16_9/frame_2_shape.png"
DECOR1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_decor_1.png"
mask_grille_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphor128px.png"
mask_grille_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphor512px.png"
mask_slot_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorMatrix128px.png"
mask_slot_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorMatrix512px.png"
mask_shadow_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorDots128px.png"
mask_shadow_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorDots512px.png"

View file

@ -0,0 +1,242 @@
shaders = "23"
shader0 = "shaders/crt-maximus-royale/src/horizontal_ringing.slang"
filter_linear0 = "false"
srgb_framebuffer0 = "true"
scale_type0 = "source"
scale_x0 = "4.0"
scale_y0 = "1.0"
shader1 = "shaders/crt-maximus-royale/src/ntsc_pass1.slang"
filter_linear1 = "false"
frame_count_mod1 = "2"
float_framebuffer1 = "true"
scale_type_x1 = "source"
scale_type_y1 = "source"
scale_x1 = "4.0"
scale_y1 = "1.0"
shader2 = "shaders/crt-maximus-royale/src/ntsc_pass2.slang"
filter_linear2 = "false"
scale_type_x2 = "source"
scale_type_y2 = "source"
scale_x2 = "0.25"
scale_y2 = "1.0"
shader3 = "shaders/crt-maximus-royale/src/H_blur.slang"
filter_linear3 = "false"
srgb_framebuffer3 = "true"
scale_type3 = "source"
scale3 = "1.0"
shader4 = "shaders/crt-royale/src/crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang"
filter_linear4 = "true"
wrap_mode4 = "clamp_to_border"
alias4 = "ORIG_LINEARIZED"
srgb_framebuffer4 = "true"
scale_type4 = "source"
scale4 = "1.0"
shader5 = "shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang"
filter_linear5 = "true"
wrap_mode5 = "clamp_to_border"
srgb_framebuffer5 = "true"
scale_type_x5 = "source"
scale_type_y5 = "source"
scale_x5 = "1.0"
scale_y5 = "6.0"
shader6 = "shaders/crt-maximus-royale/src/resize.slang"
filter_linear6 = "true"
alias6 = "VERTICAL_SCANLINES"
srgb_framebuffer6 = "true"
scale_type_x6 = "source"
scale_type_y6 = "viewport"
scale_x6 = "1.0"
scale_y6 = "1.95"
shader7 = "shaders/crt-royale/src/crt-royale-bloom-approx.slang"
filter_linear7 = "true"
wrap_mode7 = "clamp_to_border"
srgb_framebuffer7 = "true"
scale_type_x7 = "absolute"
scale_type_y7 = "absolute"
scale_x7 = "320"
scale_y7 = "240"
shader8 = "shaders/crt-maximus-royale/src/resize.slang"
filter_linear8 = "true"
alias8 = "BLOOM_APPROX"
wrap_mode8 = "clamp_to_border"
srgb_framebuffer8 = "true"
scale_type8 = "source"
scale8 = "1.0"
shader9 = "../blurs/blur9fast-vertical.slang"
filter_linear9 = "true"
wrap_mode9 = "clamp_to_border"
srgb_framebuffer9 = "true"
scale_type9 = "source"
scale9 = "1.0"
shader10 = "../blurs/blur9fast-horizontal.slang"
filter_linear10 = "true"
wrap_mode10 = "clamp_to_border"
alias10 = "HALATION_BLUR"
srgb_framebuffer10 = "false"
scale_type10 = "source"
scale10 = "1.0"
shader11 = "shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang"
filter_linear11 = "true"
wrap_mode11 = "clamp_to_border"
srgb_framebuffer11 = "false"
scale_type_x11 = "absolute"
scale_type_y11 = "viewport"
scale_x11 = "128"
scale_y11 = "0.975"
shader12 = "shaders/crt-royale/src/crt-royale-mask-resize-horizontal.slang"
filter_linear12 = "false"
wrap_mode12 = "clamp_to_border"
alias12 = "MASK_RESIZE"
srgb_framebuffer12 = "true"
scale_type_x12 = "viewport"
scale_type_y12 = "source"
scale_x12 = "0.73125"
scale_y12 = "2.0"
shader13 = "shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang"
filter_linear13 = "true"
wrap_mode13 = "clamp_to_edge"
alias13 = "MASKED_SCANLINES"
srgb_framebuffer13 = "true"
scale_type13 = "source"
scale13 = "1.0"
shader14 = "shaders/crt-royale/src/crt-royale-brightpass.slang"
filter_linear14 = "true"
wrap_mode14 = "clamp_to_border"
alias14 = "BRIGHTPASS"
srgb_framebuffer14 = "true"
scale_type14 = "source"
scale14 = "1.0"
shader15 = "shaders/crt-royale/src/crt-royale-bloom-vertical.slang"
filter_linear15 = "true"
wrap_mode15 = "clamp_to_border"
srgb_framebuffer15 = "true"
scale_type15 = "source"
scale15 = "1.0"
shader16 = "shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang"
filter_linear16 = "true"
wrap_mode16 = "clamp_to_border"
srgb_framebuffer16 = "true"
scale_type16 = "source"
scale16 = "1.0"
shader17 = "shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.slang"
filter_linear17 = "true"
alias17 = "LAST_PASS"
mipmap_input17 = "false"
srgb_framebuffer17 = "true"
scale_type_x17 = "source"
scale_type_y17 = "source"
scale_x17 = "1.0"
scale_y17 = "0.5"
shader18 = "shaders/crt-maximus-royale/src/crt_reflect.slang"
filter_linear18 = "true"
alias18 = "BORDER_REFLECTION"
wrap_mode18 = "clamp_to_border"
srgb_framebuffer18 = "false"
scale_type_x18 = "absolute"
scale_type_y18 = "absolute"
scale_x18 = "160"
scale_y18 = "120"
shader19 = "shaders/crt-maximus-royale/src/BGcolor_pass1.slang"
filter_linear19 = "false"
wrap_mode19 = "clamp_to_border"
alias19 = "BGPASS1"
srgb_framebuffer19 = "false"
scale_type_x19 = "absolute"
scale_type_y19 = "absolute"
scale_x19 = "1.0"
scale_y19 = "100.0"
shader20 = "shaders/crt-maximus-royale/src/BGcolor_pass2.slang"
filter_linear20 = "false"
wrap_mode20 = "clamp_to_border"
alias20 = "BGPASS2"
srgb_framebuffer20 = "false"
scale_type20 = "absolute"
scale20 = "1.0"
shader21 = "shaders/crt-maximus-royale/src/imgborder.slang"
filter_linear21 = "true"
wrap_mode21 = "clamp_to_border"
scale_type21 = "viewport"
scale21 = "1.0"
shader22 = "shaders/crt-maximus-royale/src/tv_reflection.slang"
filter_linear22 = "true"
wrap_mode22 = "clamp_to_border"
scale_type22 = "source"
scale22 = "1.0"
crt_gamma = "1.7"
lcd_gamma = "1.2"
diffusion_weight = "0.3"
beam_spot_power = "0.22"
beam_min_sigma = "0.1"
beam_max_shape = "2.0"
mask_sample_mode_desired = "0.0"
aa_cubic_c = "0.0"
geom_mode_runtime = "1.0"
border_size = "0.0"
border_darkness = "0.0"
textures = "mask_grille_texture_small;mask_grille_texture_large;mask_slot_texture_small;mask_slot_texture_large;mask_shadow_texture_small;mask_shadow_texture_large;TVBORDER1;TVBORDER2;TVBORDER3;TVBORDER2BG;TVBORDER3BG;TVBORDER2LED;TVBORDER3LED;TVLIGHTS1;TVLIGHTS3;MONITORBORDER;MONITORLIGHTS;SHAPE1;SHAPE2"
mask_grille_texture_small_linear = "true"
mask_grille_texture_small_wrap_mode = "repeat"
mask_grille_texture_small_mipmap = "false"
mask_grille_texture_large_linear = "true"
mask_grille_texture_large_wrap_mode = "repeat"
mask_grille_texture_large_mipmap = "true"
mask_slot_texture_small_linear = "true"
mask_slot_texture_small_wrap_mode = "repeat"
mask_slot_texture_small_mipmap = "false"
mask_slot_texture_large_linear = "true"
mask_slot_texture_large_wrap_mode = "repeat"
mask_slot_texture_large_mipmap = "true"
mask_shadow_texture_small_linear = "true"
mask_shadow_texture_small_wrap_mode = "repeat"
mask_shadow_texture_small_mipmap = "false"
mask_shadow_texture_large_linear = "true"
mask_shadow_texture_large_wrap_mode = "repeat"
mask_shadow_texture_large_mipmap = "true"
TVBORDER1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_1.png"
TVBORDER2 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2.png"
TVBORDER3 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3.png"
TVBORDER2BG = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2_bg.png"
TVBORDER3BG = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_bg.png"
TVBORDER2LED = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_2_led.png"
TVBORDER3LED = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_led.png"
TVLIGHTS1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_1_lights_alpha.png"
TVLIGHTS3 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_frame_3_lights_alpha.png"
MONITORBORDER = "shaders/crt-maximus-royale/FrameTextures/16_9/MONITOR_frame.png"
MONITORLIGHTS = "shaders/crt-maximus-royale/FrameTextures/16_9/MONITOR_frame_lights_alpha.png"
SHAPE1 = "shaders/crt-maximus-royale/FrameTextures/16_9/frame_1_shape.png"
SHAPE2 = "shaders/crt-maximus-royale/FrameTextures/16_9/frame_2_shape.png"
DECOR1 = "shaders/crt-maximus-royale/FrameTextures/16_9/TV_decor_1.png"
mask_grille_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphor128pxH.png"
mask_grille_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphor512pxH.png"
mask_slot_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorMatrix128pxH.png"
mask_slot_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorMatrix512pxH.png"
mask_shadow_texture_small = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorDots128pxH.png"
mask_shadow_texture_large = "shaders/crt-maximus-royale/TilePhosphorTextures/TilePhosphorDots512pxH.png"

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

View file

@ -0,0 +1,58 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float bgMode;
float ledMode;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
} global;
#pragma parameter bgMode "BG Mode" 0.0 0.0 3.0 1.0
#pragma parameter ledMode "Rear TV LED Mode" 0.0 0.0 3.0 1.0
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
void main()
{
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Original;
void main()
{
vec3 BColor = vec3(0.0).rgb;
if ((params.bgMode > 1.0) || (params.ledMode == 3.0)) for (float i = 0.02; i <= 1.0; i += 0.02) BColor += texture(Original, vec2(i,vTexCoord.y)).rgb;
FragColor = vec4(BColor/50, 1.0).rgba;
}

View file

@ -0,0 +1,58 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float bgMode;
float ledMode;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
} global;
#pragma parameter bgMode "BG Mode" 0.0 0.0 3.0 1.0
#pragma parameter ledMode "Rear TV LED Mode" 0.0 0.0 3.0 1.0
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
void main()
{
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D BGPASS1;
void main()
{
vec3 BColor = vec3(0.0).rgb;
if ((params.bgMode > 1.0) || (params.ledMode == 3.0)) for (float i = 0.02; i <= 1.0; i += 0.02) BColor += texture(BGPASS1, vec2(0.0,i)).rgb;
FragColor = vec4(BColor/50, 1.0).rgba;
}

View file

@ -0,0 +1,74 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float Hsharpness;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
} global;
#pragma parameter Hsharpness "Horizontal Sharpness" 10.0 1.0 20.0 0.5
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
void main()
{
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
void main()
{
vec3 Color;
float count = -0.005 / params.Hsharpness;
float limit = 0.005 / params.Hsharpness;
float countAdd = 0.001 / params.Hsharpness;
if (params.Hsharpness < 20.0)
{
for (float i = count; i < limit ; i += countAdd)
{
Color += texture(Source, vec2(vTexCoord.x + i,vTexCoord.y)).rgb;
}
Color /= 10.0;
}
else
{
Color = texture(Source, vTexCoord).rgb;
}
FragColor = vec4( Color , 1.0 );
}

View file

@ -0,0 +1,132 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float crtFrame;
float Xscale;
float Yscale;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
} global;
#pragma parameter Xscale "Horizontal Scale %" 100.0 75.0 150.0 0.1
#pragma parameter Yscale "Vertical Scale %" 100.0 75.0 150.0 0.1
#pragma parameter crtFrame "CRT Frame" 1.0 1.0 4.0 1.0
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec2 screen_coord;
layout(location = 2) out vec2 resize_coord;
void main()
{
gl_Position = global.MVP * Position;
vec2 center = TexCoord.xy - 0.5;
screen_coord = center / vec2(0.955,0.98);
resize_coord = vec2(params.Xscale,params.Yscale) * 0.01;
vTexCoord = TexCoord.xy;
if (params.crtFrame == 4.0) screen_coord /= vec2(1.0,0.985);
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec2 screen_coord;
layout(location = 2) in vec2 resize_coord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
layout(set = 0, binding = 3) uniform sampler2D Original;
void main()
{
////CALCULATE REFLEXION COORDS 1st pass////
float curveFactor = 0.14;
float scaleFactor = 1.0;
float borderAdjustment = 0.99;
if (params.crtFrame == 3.0) scaleFactor = 0.835;
if (params.crtFrame == 4.0)
{
curveFactor = 0.1;
scaleFactor = 0.92;
borderAdjustment = 1.035;
}
vec2 LightsCoordPre = screen_coord/cos(screen_coord.yx * vec2(3.0,4.0) * curveFactor) / scaleFactor;
vec2 LightsCoord = 0.5 + LightsCoordPre / borderAdjustment;
vec2 LightsCoordScale = 0.5 + LightsCoordPre / resize_coord;
vec2 LightsCoordInv = 1.0 - LightsCoord;
vec2 LightsCoordHalf = LightsCoord / 2.0;
vec2 LightsCoordHalfInv = LightsCoordHalf - 0.5;
vec2 rezCoords = 0.5 / resize_coord * borderAdjustment - 0.5;
////CALCULATE REFLEXION COORDS 2nd pass////
vec2 newLightsCoord = LightsCoord;
if (LightsCoordScale.x > -0.05 && LightsCoordScale.x < 1.05 && LightsCoordScale.y > -0.05 && LightsCoordScale.y < 1.05)
{
if (LightsCoord.x < 0.0 && -LightsCoordHalf.x < LightsCoord.y && -LightsCoordHalf.x < LightsCoordInv.y)
{
newLightsCoord.x = -LightsCoord.x - rezCoords.x;
newLightsCoord.y *= 1.0 - LightsCoord.x + rezCoords.y * 2.0;
newLightsCoord.y += LightsCoord.x / 2.0 - rezCoords.y;
}
if (LightsCoord.x > 1.0 && LightsCoordHalfInv.x < LightsCoord.y && LightsCoordHalfInv.x < LightsCoordInv.y)
{
newLightsCoord.x = 2.0 - LightsCoord.x + rezCoords.x;
newLightsCoord.y *= 1.0 - LightsCoordInv.x + rezCoords.y * 2.0;
newLightsCoord.y += LightsCoordInv.x / 2.0 - rezCoords.y;
}
if (LightsCoord.y < 0.0 && -LightsCoordHalf.y < LightsCoord.x && -LightsCoordHalf.y < LightsCoordInv.x)
{
newLightsCoord.y = -LightsCoord.y - rezCoords.y;
newLightsCoord.x *= 1.0 - LightsCoord.y + rezCoords.x * 2.0;
newLightsCoord.x += LightsCoord.y / 2.0 - rezCoords.x;
}
if (LightsCoord.y > 1.0 && LightsCoordHalfInv.y < LightsCoord.x && LightsCoordHalfInv.y < LightsCoordInv.x)
{
newLightsCoord.y = 2.0 - LightsCoord.y + rezCoords.y;
newLightsCoord.x *= 1.0 - LightsCoordInv.y + rezCoords.x * 2.0;
newLightsCoord.x += LightsCoordInv.y / 2.0 - rezCoords.x;
}
}
if (LightsCoord.x > 0.0 && LightsCoord.x < 1.0 && LightsCoord.y > 0.0 && LightsCoord.y < 1.0) { newLightsCoord = LightsCoordScale; }
vec4 lightSource = texture(Original, newLightsCoord).rgba;
FragColor = lightSource; //final output
}

View file

@ -0,0 +1,81 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float ringAct;
float ringDsp;
float ringInt;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
} global;
#pragma parameter ringAct "Ringing On" 0.0 0.0 1.0 1.0
#pragma parameter ringDsp "Ringing Displace" 3.0 0.0 3.0 0.1
#pragma parameter ringInt "Ringing Intensity" 5.0 0.0 10.0 0.5
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
void main()
{
gl_Position = global.MVP * Position;
vTexCoord = TexCoord.xy;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
void main()
{
vec3 screen = vec3(0.0);
float rDisp = params.ringDsp * 0.001;
float Disp;
bool rAct = bool(params.ringAct);
if (rAct)
{
for (int i; i < 10 ; i++)
{
Disp = float(i) * rDisp;
screen += (texture(Source, vec2(vTexCoord.x + Disp, vTexCoord.y)).xyz - texture(Source, vec2(vTexCoord.x + Disp + rDisp, vTexCoord.y)).xyz) * pow((10.0 - float(i))/10.0,5)/4.0;
}
for (int j; j < 10 ; j++)
{
Disp = float(j) * rDisp;
screen -= (texture(Source, vec2(vTexCoord.x - Disp, vTexCoord.y)).xyz - texture(Source, vec2(vTexCoord.x - Disp - rDisp, vTexCoord.y)).xyz) * pow((10.0 - float(j))/10.0,5);
}
screen /= 10;
screen *= params.ringInt;
}
FragColor = texture(Source,vTexCoord) + vec4(screen,1.0);
}

View file

@ -0,0 +1,203 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float crtFrame;
float bgMode;
float bgR;
float bgG;
float bgB;
float ledMode;
float ledR;
float ledG;
float ledB;
float ledSpeed;
float ledBrightness;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
vec4 OutputSize;
uint FrameCount;
} global;
#pragma parameter crtFrame "CRT Frame" 1.0 1.0 4.0 1.0
#pragma parameter bgMode "BG Mode" 0.0 0.0 3.0 1.0
#pragma parameter bgR "BG Red" 0.0 0.0 100.0 1.0
#pragma parameter bgG "BG Green" 25.0 0.0 100.0 1.0
#pragma parameter bgB "BG Blue" 50.0 0.0 100.0 1.0
#pragma parameter ledMode "Rear TV LED Mode" 0.0 0.0 3.0 1.0
#pragma parameter ledR "LED Red" 50.0 0.0 100.0 1.0
#pragma parameter ledG "LED Green" 50.0 0.0 100.0 1.0
#pragma parameter ledB "LED Blue" 50.0 0.0 100.0 1.0
#pragma parameter ledSpeed "LED Speed" 1.0 1.0 20.0 1.0
#pragma parameter ledBrightness "LED Brightness" 50.0 1.0 100.0 1.0
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec2 screen_coord;
layout(location = 2) out vec2 screen_coord_fix;
layout(location = 3) out vec2 frame_coord;
layout(location = 4) out float screen_ratio;
void main()
{
gl_Position = global.MVP * Position;
vec2 middle = vec2(0.5);
vec2 center = TexCoord.xy - middle;
float s4_3_ratio = (global.OutputSize.y/3.0 * 4.0) / global.OutputSize.x;
float s16_9_ratio = (global.OutputSize.y/9.0 * 16.0) / global.OutputSize.x;
vec2 screen_coord_pre = center / vec2(s4_3_ratio , 1.0);
screen_coord = middle + screen_coord_pre;
screen_coord_fix = middle + screen_coord_pre / 0.975;
frame_coord = middle + center / vec2(s16_9_ratio , 1.0);
screen_ratio = global.OutputSize.x / global.OutputSize.y;
vTexCoord = TexCoord.xy;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec2 screen_coord;
layout(location = 2) in vec2 screen_coord_fix;
layout(location = 3) in vec2 frame_coord;
layout(location = 4) in float screen_ratio;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D BGPASS2;
layout(set = 0, binding = 3) uniform sampler2D TVBORDER1;
layout(set = 0, binding = 4) uniform sampler2D TVBORDER2;
layout(set = 0, binding = 5) uniform sampler2D TVBORDER3;
layout(set = 0, binding = 6) uniform sampler2D TVBORDER2BG;
layout(set = 0, binding = 7) uniform sampler2D TVBORDER3BG;
layout(set = 0, binding = 8) uniform sampler2D TVBORDER2LED;
layout(set = 0, binding = 9) uniform sampler2D TVBORDER3LED;
layout(set = 0, binding = 10) uniform sampler2D MONITORBORDER;
layout(set = 0, binding = 11) uniform sampler2D SHAPE1;
layout(set = 0, binding = 12) uniform sampler2D SHAPE2;
layout(set = 0, binding = 13) uniform sampler2D LAST_PASS;
void main()
{
////DRAWING////
vec3 screen = texture(LAST_PASS, screen_coord_fix).rgb;
vec3 shape;
vec4 background;
vec4 backgroundBG = vec4(0.0).rgba;
vec3 backgroundLED = vec3(0.0).rgb;
vec3 BGcolor = vec3(0.0).rgb;
vec3 LEDcolor = vec3(0.0).rgb;
vec4 borders = vec4(0.0).rgba;
if (params.crtFrame == 1.0)
{
background = texture(TVBORDER1, frame_coord);
float Sratio = screen_ratio / (16.0/9.0);
if (vTexCoord.x < 0.3)
{
borders = vec4(texture(TVBORDER1, vec2(vTexCoord.x * Sratio , frame_coord.y)).rgb , 0.0);
}
if (vTexCoord.x > 0.7)
{
borders = vec4(texture(TVBORDER1, vec2(1.0 + (vTexCoord.x - 1.0) * Sratio , frame_coord.y)).rgb , 0.0);
}
vec2 sidebar = vec2((vTexCoord.x * global.OutputSize.x - 25.0) / 5.0 , ((1.0 - vTexCoord.x) * global.OutputSize.x - 25.0) / 5.0);
if (screen_ratio < (16.0/9.0) && screen_ratio > (4.205556/3.0))
{
if (sidebar.x < 0.0) { borders.a = 1.0; }
else if (sidebar.x < 1.0) { borders.a += -sidebar.x; }
if (sidebar.y < 0.0) { borders.a = 1.0; }
else if (sidebar.y < 1.0) { borders.a += -sidebar.y; }
}
}
if ((params.crtFrame == 2.0) || (params.crtFrame == 3.0))
{
float BG_R = params.bgR / 100;
float BG_G = params.bgG / 100;
float BG_B = params.bgB / 100;
float LED_R = params.ledR / 100;
float LED_G = params.ledG / 100;
float LED_B = params.ledB / 100;
if ((params.bgMode > 0.0) && (params.bgMode < 3.0)) BGcolor = vec3(BG_R, BG_G, BG_B).rgb;
if (params.bgMode > 1.0) BGcolor += texture(BGPASS2, vec2(0.0)).rgb;
if (params.ledMode == 1.0) LEDcolor = vec3(LED_R, LED_G, LED_B).rgb;
if (params.ledMode == 2.0)
{
float LED_Speed = global.FrameCount * params.ledSpeed / 1000;
LEDcolor = vec3(sin(LED_Speed), sin(LED_Speed - 2.094395), sin(LED_Speed - 4.18879)).rgb + 1.0;
}
if (params.ledMode == 3.0) LEDcolor += texture(BGPASS2, vec2(0.0)).rgb * 5.0;
if (params.ledMode >= 2.0)
{
float LED_Brightness = params.ledBrightness / 100;
LEDcolor *= LED_Brightness;
}
}
if (params.crtFrame == 2.0)
{
background = texture(TVBORDER2, frame_coord);
backgroundBG = texture(TVBORDER2BG, frame_coord);
backgroundLED = texture(TVBORDER2LED, frame_coord).rgb;
}
if (params.crtFrame == 3.0)
{
background = texture(TVBORDER3, frame_coord);
backgroundBG = texture(TVBORDER3BG, frame_coord);
backgroundLED = texture(TVBORDER3LED, frame_coord).rgb;
shape = texture(SHAPE2, frame_coord).rgb;
}
else shape = texture(SHAPE1, frame_coord).rgb;
if (params.crtFrame == 4.0) background = texture(MONITORBORDER, frame_coord);
///NOISE///
vec3 grain;
float x = (vTexCoord.x + 1.0) * (vTexCoord.y + 1.0) * (mod(global.FrameCount, 1000.0) + 10.0) * 10;
grain = vec3(mod((mod(x, 10.0) + 1.0) * (mod(x, 100.0) + 1.0), 0.01) - 0.005);
////OUTPUT////
FragColor = vec4(mix(mix(mix(screen + shape + grain, background.rgb, background.a), backgroundBG.rgb * BGcolor.rgb + backgroundLED.rgb * LEDcolor.rgb, backgroundBG.a), borders.rgb, borders.a),1.0); //final output
}

View file

@ -0,0 +1,138 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float h2x;
float CVBS_SVIDEO_RGB;
float CVBS_RES;
float CVBS_PHASE;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
vec4 OutputSize;
vec4 OriginalSize;
vec4 SourceSize;
uint FrameCount;
} global;
#pragma parameter h2x "Horizontal Scale" 2.0 0.0 2.0 1.0
#pragma parameter CVBS_SVIDEO_RGB "CVBS - SVIDEO - RGB" 0.0 0.0 2.0 1.0
#pragma parameter CVBS_RES "CVBS Intensity" 0.0 0.0 1.0 1.0
#pragma parameter CVBS_PHASE "CVBS Phase" 3.0 2.0 4.0 1.0
#define PI 3.14159265
#define CMF_TWO_PHASE (4.0 * PI / 15.0)
#define CMF_THREE_PHASE (PI / 3.0)
#define FRGART (params.h2x + params.CVBS_RES)
mat3 mix_matCVBS = mat3(
1.0, FRGART, FRGART,
FRGART, 2.0, 0.0,
FRGART, 0.0, 2.0
);
mat3 mix_matSVIDEO = mat3(
1.0, 0.0, 0.0,
0.0, 2.0, 0.0,
0.0, 0.0, 2.0
);
#include "ntsc_rgbyuv.inc"
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec2 pix_no;
void main()
{
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
if (params.CVBS_SVIDEO_RGB < 2)
{
vec2 cutH = vec2(1.0);
vec2 doubleY = vec2(1.0);
vec2 Src_Size = global.SourceSize.xy * vec2(0.25, 1.0);
vec2 Out_Size = global.OutputSize.xy * vec2(0.5, 1.0);
if (params.h2x == 0.0) { cutH.x = 4.0; }
if (params.h2x == 1.0) { cutH.x = 2.0; }
if (global.OriginalSize.y > 400) { doubleY.y = 0.5; }
vec2 SrcSize = Src_Size / cutH;
vec2 OutSize = Out_Size / cutH;
pix_no = TexCoord * SrcSize * (OutSize / SrcSize) * doubleY;
}
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec2 pix_no;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
void main()
{
vec3 col = texture(Source, vTexCoord).rgb;
vec3 yiq;
vec3 yiqsum;
float chroma_phase;
float mod_phase;
float i_mod;
float q_mod;
float CHROMA_MOD_FREQ;
float PHASE_MOD_FREQ;
if (params.CVBS_SVIDEO_RGB < 2)
{
yiq = rgb2yiq(col);
if (params.CVBS_PHASE == 2) CHROMA_MOD_FREQ = CMF_TWO_PHASE;
if (params.CVBS_PHASE >= 3) CHROMA_MOD_FREQ = CMF_THREE_PHASE;
if (params.CVBS_PHASE == 4) PHASE_MOD_FREQ = 2.0;
else PHASE_MOD_FREQ = 3.0;
chroma_phase = 0.6667 * PI * (mod(pix_no.y, PHASE_MOD_FREQ) + global.FrameCount);
mod_phase = chroma_phase + (pix_no.x) * CHROMA_MOD_FREQ;
i_mod = cos(mod_phase);
q_mod = sin(mod_phase);
yiq.yz *= vec2(i_mod, q_mod); // Modulate.
if (params.CVBS_SVIDEO_RGB == 0) { yiq *= mix_matCVBS; } // Cross-talk.
if (params.CVBS_SVIDEO_RGB == 1) { yiq *= mix_matSVIDEO; } // Cross-talk.
yiq.yz *= vec2(i_mod, q_mod); // Demodulate.
col = yiq;
}
FragColor = vec4(col, 1.0);
}

View file

@ -0,0 +1,153 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float CVBS_SVIDEO_RGB;
float h2x;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
vec4 OriginalSize;
vec4 SourceSize;
} global;
#pragma parameter h2x "Horizontal Scale" 2.0 0.0 2.0 1.0
#pragma parameter CVBS_SVIDEO_RGB "CVBS - SVIDEO - RGB" 0.0 0.0 2.0 1.0
#include "ntsc_rgbyuv.inc"
#define TAPS 24
const float luma_filter[TAPS + 1] = float[TAPS + 1](
-0.000012020,
-0.000022146,
-0.000013155,
-0.000012020,
-0.000049979,
-0.000113940,
-0.000122150,
-0.000005612,
0.000170516,
0.000237199,
0.000169640,
0.000285688,
0.000984574,
0.002018683,
0.002002275,
-0.000909882,
-0.007049081,
-0.013222860,
-0.012606931,
0.002460860,
0.035868225,
0.084016453,
0.135563500,
0.175261268,
0.190176552);
const float chroma_filter[TAPS + 1] = float[TAPS + 1](
-0.000118847,
-0.000271306,
-0.000502642,
-0.000930833,
-0.001451013,
-0.002064744,
-0.002700432,
-0.003241276,
-0.003524948,
-0.003350284,
-0.002491729,
-0.000721149,
0.002164659,
0.006313635,
0.011789103,
0.018545660,
0.026414396,
0.035100710,
0.044196567,
0.053207202,
0.061590275,
0.068803602,
0.074356193,
0.077856564,
0.079052396);
#define fetch_offset(offset, one_x) \
texture(Source, vTexCoord + vec2((offset) * (one_x), 0.0)).xyz
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out float cutH;
void main()
{
gl_Position = global.MVP * Position;
vTexCoord = TexCoord;
cutH = global.SourceSize.x / 2.0;
if (params.CVBS_SVIDEO_RGB < 2)
{
if (params.h2x == 0.0) { cutH /= 4.0; }
else if (params.h2x == 1.0) { cutH /= 2.0; }
else if (global.OriginalSize.x > 500) { cutH /= 2.0; }
vTexCoord -= vec2(0.5 / cutH, 0.0); // Compensate for decimate-by-2.
}
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in float cutH;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
void main()
{
vec3 rgb;
if (params.CVBS_SVIDEO_RGB < 2)
{
float one_x = 1.0 / cutH;
vec3 signal = vec3(0.0);
for (int i = 0; i < TAPS; i++)
{
float offset = float(i);
vec3 sums = fetch_offset(offset - float(TAPS), one_x) + fetch_offset(float(TAPS) - offset, one_x);
signal += sums * vec3(luma_filter[i], chroma_filter[i], chroma_filter[i]);
}
signal += texture(Source, vTexCoord).xyz * vec3(luma_filter[TAPS], chroma_filter[TAPS], chroma_filter[TAPS]);
rgb = yiq2rgb(signal);
}
else
{
rgb = texture(Source, vTexCoord).xyz;
}
FragColor = vec4(rgb, 1.0);
}

View file

@ -0,0 +1,20 @@
const mat3 yiq2rgb_mat = mat3(
1.0, 0.956, 0.6210,
1.0, -0.2720, -0.6474,
1.0, -1.1060, 1.7046);
vec3 yiq2rgb(vec3 yiq)
{
return yiq * yiq2rgb_mat;
}
const mat3 yiq_mat = mat3(
0.2989, 0.5870, 0.1140,
0.5959, -0.2744, -0.3216,
0.2115, -0.5229, 0.3114
);
vec3 rgb2yiq(vec3 col)
{
return col * yiq_mat;
}

View file

@ -0,0 +1,69 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float Xscale;
float Yscale;
float crtFrame;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
mat4 MVP;
} global;
#pragma parameter Xscale "Horizontal Scale %" 100.0 75.0 150.0 0.1
#pragma parameter Yscale "Vertical Scale %" 100.0 75.0 150.0 0.1
#pragma parameter crtFrame "CRT Frame" 1.0 1.0 4.0 1.0
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
void main()
{
gl_Position = global.MVP * Position;
vec2 center = TexCoord.xy - 0.5;
vec2 resizeCoord = vec2(params.Xscale,params.Yscale) * 0.01;
float resizeFactor = 1.0;
if (params.crtFrame == 3.0) resizeFactor = 0.835;
if (params.crtFrame == 4.0)
{
resizeCoord *= vec2(1.0,0.985);
resizeFactor = 0.92;
}
vTexCoord = 0.5 + center / resizeCoord / resizeFactor;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
void main()
{
FragColor = texture(Source, vTexCoord).rgba;
}

View file

@ -0,0 +1,114 @@
#version 450
///////////////////////////// GPL LICENSE NOTICE /////////////////////////////
// crt-maximus-royale: A fully customizable extension for crt-royale shader,
// inside a TV / MONITOR BOX with backlight and some other cool stuff.
// Copyright (C) 2022 DigiDwrf
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place, Suite 330, Boston, MA 02111-1307 USA
layout(push_constant) uniform Push
{
float crtFrame;
float crtReflection;
} params;
layout(std140, set = 0, binding = 0) uniform UBO
{
vec4 OutputSize;
mat4 MVP;
} global;
#pragma parameter crtFrame "CRT Frame" 1.0 1.0 4.0 1.0
#pragma parameter crtReflection "CRT Reflection" 1.0 0.0 1.0 1.0
#pragma stage vertex
layout(location = 0) in vec4 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 0) out vec2 vTexCoord;
layout(location = 1) out vec2 light_coord;
layout(location = 2) out vec2 frame_coord;
void main()
{
gl_Position = global.MVP * Position;
vec2 middle = vec2(0.5);
vec2 center = TexCoord.xy - middle;
float s4_3_ratio = (global.OutputSize.y/3.0 * 4.0) / global.OutputSize.x;
float s16_9_ratio = (global.OutputSize.y/9.0 * 16.0) / global.OutputSize.x;
light_coord = middle + center / vec2(s4_3_ratio / 0.986 , 1.0);
frame_coord = middle + center / vec2(s16_9_ratio , 1.0);
vTexCoord = TexCoord.xy;
}
#pragma stage fragment
layout(location = 0) in vec2 vTexCoord;
layout(location = 1) in vec2 light_coord;
layout(location = 2) in vec2 frame_coord;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
layout(set = 0, binding = 3) uniform sampler2D Original;
layout(set = 0, binding = 4) uniform sampler2D TVLIGHTS1;
layout(set = 0, binding = 5) uniform sampler2D TVLIGHTS3;
layout(set = 0, binding = 6) uniform sampler2D MONITORLIGHTS;
layout(set = 0, binding = 7) uniform sampler2D BORDER_REFLECTION;
void main()
{
vec3 color = texture(Source, vTexCoord).rgb;
if (params.crtReflection == 1.0)
{
////DRAWING////
vec3 lights;
if (params.crtFrame <= 2.0) lights = texture(TVLIGHTS1, frame_coord).rgb;
else if (params.crtFrame == 3.0) lights = texture(TVLIGHTS3, frame_coord).rgb;
else lights = texture(MONITORLIGHTS, frame_coord).rgb;
////GAUSSIAN BLUR////
const float PI = 3.14159265f;
const float PI2 = PI*2;
vec2 Radius;
vec3 lightSource = vec3(0.0);
if (lights.r > 0.01 && lights.g > 0.01 && lights.b > 0.01)
{
for(float d = 0.0 ; d < PI2 ; d += PI2/14)
{
Radius = vec2(cos(d),sin(d)); //Calculate Radius
for(float e = 0.005 ; e < 0.03 ; e += 0.005)
lightSource += texture(BORDER_REFLECTION, light_coord + Radius * e).rgb;
}
}
lightSource /= 220;
color += lightSource * lights;
}
////OUTPUT////
FragColor = vec4(color,1.0); //final output
}