diff --git a/bezel/koko-aio/FXAA-bloom.slangp b/bezel/koko-aio/FXAA-bloom.slangp index f5560a8..620e536 100644 --- a/bezel/koko-aio/FXAA-bloom.slangp +++ b/bezel/koko-aio/FXAA-bloom.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -196,7 +196,7 @@ SAT_BLEED_PAL = "1.000000" SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" -OFFSET_STRENGTH = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -216,10 +216,9 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" @@ -227,13 +226,11 @@ GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.001000" -BEZEL_REFL_ZOOM = "0.990000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_DYNZOOM = "0.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/README.md b/bezel/koko-aio/README.md deleted file mode 100644 index 1e5dc45..0000000 --- a/bezel/koko-aio/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# Koko-aio - -Koko-aio shader is meant to be an all-in one crt shader.
-It can be configured with many parameters, so that can be -scaled to run on even on modest gpus while still developed to -run with heavier presets on at least Haswell+ iGpus.
-On that gpu, as in version 3.5, it reaches about 85fps with all features enabled
-When dealing with lowres content on 1920x1080 resolution.
-While it is not meant to simulate the internal behaviour of CRT displays,
-it aims to give users "visual" parameters to make their monitors look similar.
-Several presets are included.
- -***Additional documentation:*** -* [See here](docs.md) - -***Additional artwork:*** -* https://github.com/kokoko3k/koko-aio-slang-presets-and-overlays - -***Actually, it provides emulation for:*** -* Scanlines -* Screenlines -* RGB phosphors -* RGB deconvergence -* NTSC/PAL CVBS color bleeding -* NTSC color artifacting (early stage) -* Aperture grille and slot mask. -* Input signal glowing -* Output signal glowing -* Blooming -* Gamma, contrast, saturation, luminance, color temperature adjustments -* Black frame insertions through alternate blanking -* Interlace flickering, forcing and emulation -* Antialiasing -* Curvature -* Ambient lights -* Vignette and Spotlight -* Bezel (Thank you HyperspaceMadness for allowing me to rip his automagically generated bezel!) - https://github.com/HyperspaceMadness/ -* Background images -* Full screen glowing - -***External code by:*** -* Nvidia (FXAA) -* EasyMode (curvature related code) - -# Examples - -***monitor-slotmask-bloom-bezelwider - Arcade - Final fight*** -![alt text](https://github.com/kokoko3k/koko-aio-slang/blob/main/screenshots/screenshots.3.5/monitor-slotmask-bloom-bezelwider.mame.ffight.png?raw=true) - -***monitor-Commodore_1084S-wider - Amiga - ProjectX SE*** -![alt text](https://github.com/kokoko3k/koko-aio-slang/blob/main/screenshots/screenshots.3.5/monitor-Commodore_1084S-wider.puae.projectx.png?raw=true) - -***tv-PAL-my-old - Master System - Trans Bot*** -![alt text](https://github.com/kokoko3k/koko-aio-slang/blob/main/screenshots/screenshots.3.5/tv-PAL-my-old,mastersystem.transbot.png?raw=true) - -***tv-NTSC-1 - Genesis - Sonic 2*** -![alt text](https://github.com/kokoko3k/koko-aio-slang/blob/main/screenshots/screenshots.3.5/tv-NTSC-1.md.sonic2.png?raw=true) - -***tv-NTSC-2 - Snes - Aladdin*** -![alt text](https://github.com/kokoko3k/koko-aio-slang/blob/main/screenshots/screenshots.3.5/tv-NTSC-2.snes.aladdin.png?raw=true) - -***tv-aperturegrille-bloom-bezel - Amiga - Leander*** -![alt text](https://github.com/kokoko3k/koko-aio-slang/blob/main/screenshots/screenshots.3.5/tv-aperturegrille-bloom-bezel.puae.leander.png?raw=true) diff --git a/bezel/koko-aio/clean-scanlines-classic_take.slangp b/bezel/koko-aio/clean-scanlines-classic_take.slangp index 4cd84de..9871e63 100644 --- a/bezel/koko-aio/clean-scanlines-classic_take.slangp +++ b/bezel/koko-aio/clean-scanlines-classic_take.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -188,7 +188,12 @@ scale_type_y16 = "viewport" scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" -GAMMA_OUT = "0.500000" +GAMMA_OUT = "0.480000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "0.850000" IN_GLOW_GAMMA = "2.000000" @@ -205,23 +210,26 @@ HALO_POWER = "0.400000" HALO_W = "3.000001" HALO_H = "3.000001" HALO_GAMMA = "1.300000" -HALO_VS_SCAN = "0.800000" +HALO_VS_SCAN = "1.000000" DO_SCANLINES = "1.000000" SCANLINE_MIN = "0.200000" -SCANLINE_MAX = "3.000000" -SCANLINE_DARK = "0.100000" +SCANLINE_MAX = "0.800000" +SCANLINE_MINMAX_GAMMA = "0.700000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" -GEOM_CORNER_SMOOTH = "200.000000" +GEOM_CORNER_SIZE = "0.010000" +GEOM_CORNER_SMOOTH = "400.000000" BEZEL_INNER_ZOOM = "-0.215000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/docs.md b/bezel/koko-aio/docs.md index 1c0ee69..8d9f8d3 100644 --- a/bezel/koko-aio/docs.md +++ b/bezel/koko-aio/docs.md @@ -10,11 +10,6 @@ Use it if you don't want to blur the image and you still don't like jagged or too much pixelated images. -**RGB deconvergence:** - Shift R,G,B components separately to mimic channel deconvergence. - By varying Red, Green and Blue offsets, the relative component will be - shifted column by column, row by row. - **CVBS: NTSC color artifacts: ** Tries to emulate typical NTSC color artifacting without emulating full NTSC coding/decoding pipeline. @@ -22,12 +17,20 @@ an accurate emulation (yet?) As today, it is enough to emulate rainbowing effects on genesis. +** RF Noise: ** + Emulates radio frequency noise with a given strength + **CVBS: Bandwidth limited chroma:** Will cause an horizontal chroma bleed which cheaply mimics the effect of poor composite video signals. It can be used with RGB shifting and image blurring to give the picture an ntsc look without dealing with specific encoding/decoding stuffs. +**Deconvergence:** + Shift R,G,B components separately to mimic channel deconvergence. + By varying Red, Green and Blue offsets, the relative component will be + shifted column by column, row by row. + **Glow/Blur:** Emulate the CRT glowing "feature", so that the brighter areas of the image will light their surroundings, @@ -52,6 +55,7 @@ When NTSC artifacts emulation is enabled, this option will let you blur them more, this would help to selectively blur things like waterfalls in Sonic 2. + The value you set it will be subtracted from glow horizontal sharpness. Blur less NTSC artifacts (min treshold) In relation to the previous setting, this allow to blur only the most prominent artifacts. @@ -59,7 +63,7 @@ This will help you to set the previous 2 values as it will show only the artifacts that will modify the blur. -**RGB Masks and/or Darklines:** +**Masks and/or Darklines:** Emulates CRT RGB phosphors (RGB Mask), slotmasks and aperturegrille (Darklines). @@ -68,7 +72,7 @@ you may want to scale this filter by a factor. Vmask Strength: How much will the RGB mask be visible. - . (LoDPI) Green,Magenta -> BGR: + . (LoDPI) Green,Magenta -> RGB: By exploiting common monitors RGB subpixel order, this causes the RGB mask, to be emulated by using just 2 pixels instead of 3. Very useful for 1080p (or lower) displays and to keep more brightness. @@ -125,11 +129,10 @@ controls how "little" they will look pronunced. You can even use a negative value to make the scanline more evident, but graphical glitches may occour. - Scanlines gap brightness: - Controls how much the gap between scanlines is dark. - Compensate brightness loss: - Will make scanlines brighter, where possible, to compensate for the - loss of brightness given by the dark gap between them. + Minimum/Maximum height: + Control the scanline thickness, can be used to mitigate moiree. + Min->Max Inertia + The lower, the thinner scanlines will be used for higher brightness. Scanlines bleeding: Will cause the scanline itself to light the scanline gap (dark) part. You may use it to keep a good picture brightness level. @@ -148,13 +151,16 @@ and avoid graphical glitches. If you enable this feature, it is highly recommended to disable darklines. Darklines will still used when dealing with interlaced or flickering screens. - Type 0 allows you to configure strength and stagger. - The stagger height will be modulated by the scanline height. - Type 1 produces tinner slotmasks, but with fixed stagger. + Type 1 allows you to configure strength and stagger. The stagger height will be modulated by the scanline height. + Type 2 produces thinner slotmasks, (dark gaps more pronunced), + but with fixed offset. + The stagger height will still be modulated by the scanline height. + This is intended to give pixels a sparkling point. + Works best with scanline heights in range [0.5..0.7] Type 3 is fixed and produces heavier and thinner slotmasks without visible scanlines. Slotmask strength - The strenght of the slotmask (available on type 1 and 2 only) + The strength of the slotmask . Offset This is the slotmask offset/stagger, (available on type 1 only) Keep it around 79 or all the way to max @@ -197,6 +203,8 @@ control how much the display is curved along its axes. Corner radius, Corner sharpness: Control the "smoothness" of the display corners. + Cut curvature ears; + If you see weird image repetition try this. **Bezel:** Draws a monitor frame with simulated reflections from the game content. @@ -212,20 +220,27 @@ Straight Use a straight bezel instead of a curved one. + Inner zoom: + Allows to shrink or expand the game content to fit the monitor frame. + When integer scaling is enabled, this is ignored. + Frame zoom: + Allows to shrink or expand the monitor frame to fit the game content. Bezel color (red,green,blue) and contrast: Allows to choose the color of the monitor frame. - Image zoom: - Allows to shrink or expand the game content to fit the monitor frame. - Frame zoom: - Allows to shrink or expand the monitor frame to fit the game content. - Image Border: - Draws a black border around the game content. - Sharp reflections + Reflections strength + The amount of reflections + Reflections sharpness Modulates from totally blurred to totally sharp reflection appearance. + Reflections roughness + The amount of material roughness in reflection area + Diffusion strength + Mix an amount of high blurred reflection to simulate light diffusion + Specularity strength + The amount of specular reflection + Darken corners + How much the bezel corners should be darkened + -**Global shift/zoom image:** - Zoom and shift everything on screen, but background pictures. - **Backgound image:** Draws an image on screen picked from the "textures" shader subdirectory, named: background.png
@@ -245,12 +260,26 @@ This could be needed when dealing with vertical games. Use -1 to let the shader try to guess if the rotation is needed. Wrap mode: + This feature is static, to use it + you have to manually enable it by removing the leading: "//" + from "//#define ALLOW_BG_IMAGE_TEXTURE_WRAP_IN_SHADER" in config.inc + What to do outside the image: 0 Mirrored repeat because so is configured in main .slangp. 1 Clamp to border and it means black. 2 Clamp to edge and means that it repeats the edge color. 3 Plain repeat without mirroring. + +**Backdrop support:** + Some old arcades used a mirror trick to overlay the + game content over an high definition printed image.
+ The image used by default, picked from the "textures" shader subdirectory, + is named: boothill.jpg
+ Shift(Zoom) Backdrop over X(Y) axis: + move or zoom the whole background image. + + **Ambient light leds:** Emulates the presence of led strips under the monitor that lights the surroundings according to the edges of the game content. @@ -270,7 +299,32 @@ Note: To avoid burn-in effects, keep Light Falloff + Led power not too high. Colorize Bezel Allow to add an amount of the ambient light over the bezel frame + Colorization size + How much the ambient light should bleed over the monitor. + Pushing this too high would make it bleed over the tube. + This is not supported. + Back/Foreground image alpha blend + When displaying background or foreground images, ambient lights are + shown on their transparent areas (alpha channel) + Switching this you can choose if you want to emulate leds: + under the image (0/mix) or over the image (1/add) + Always colorize Back/Foreground image (add mode only) + When "Back/Foreground image alpha blend" is set to 1/add, + you can choose to always colorize the foreground image by a certain amount. + This can be used to produce big haloes all around the tube. + This internally works by adding the amount of your choice to the alpha channel + of the foreground image. + +**Luminosity dependant zoom:** + On older CRT monitors, the picture gets bigger when the image was brighter. +**Vignette:** + Will cause uneven brightness of the image, more at the center, + less at the edges. + +**Spot:** + Simulates external light reflected by the monitor glass. + **Aspect Ratio:** When using effects that need Retroarch aspect ratio option to be set to "full", you have to provide the source aspect @@ -293,39 +347,49 @@ As long as Aspect Ratio Numerator is positive, this will be used as the denominator of the fraction. -**Luminosity dependant zoom:** - On older CRT monitors, the picture gets bigger when the image was brighter. +**Global shift/zoom image:** + Zoom and shift everything on screen, but background pictures. -**Vignette:** - Will cause uneven brightness of the image, more at the center, - less at the edges. +**Override content geometry:** + Contrary to the global aspect ratio control, this changes only the game geometry. + Bezel stays the same. -**Spot:** - Simulates external light reflected by the monitor glass. + Integer scale: Game content zoom height is rounded to nearest integer. + Maximum integer scale: Dont allow integer scaling more than this + * beware: the following options in this group + overrides the integer scale. + Aspect: Change aspect ratio. + Vertical/Horizontal position: Shifts the game position + Zoom: Change the size +**Tilt:** + Put the bezel and the game content into perspective. + + Tilt along X(Y) axis: + Rotate the image in space + Fov: Modulates the field of view + Bezel multiplier: + Can be used to adjust the bezel rotation + in relation to the game tilt amount + + **Alternate line blanking:** CRT monitors \*real\* refresh was amazing, today is just "meh" in most cases. - This emmulates the low pixel persistance of CRT monitors + This emulates the low pixel persistance of CRT monitors and reduces the motion blur, typical of LCD displays, by blanking even/odd screen lines on even/odd frames, by sacrificing image brightness, ofc. + This feature is static, to use it + you have to manually enable it by removing the leading: "//" + from "//#define ALLOW_ALT_BLANK" in config.inc + Frame insertion strength: How much the line will be blanked. Dark lines period: You can blank single line or a group of them at once. See what performs better on your display. -**Backdrop support:** - Some (not so much) old arcades used a mirror trick to overlay the - game content over an high definition printed image.
- koko-aio supports them but you will explicitely need to enable
- that feature in config.inc file, by uncommenting a string this way:
- //#define STATIC_SUPPORT_BACKDROP 1.0
- becomes:
- #define STATIC_SUPPORT_BACKDROP 1.0
- You can only combine the static backdrop with images
- that are painted over the screen.
- If you need to zoom the game content only, use the global zoom controls. + diff --git a/bezel/koko-aio/monitor-BASE.slangp b/bezel/koko-aio/monitor-BASE.slangp index de12c2b..c568bc9 100644 --- a/bezel/koko-aio/monitor-BASE.slangp +++ b/bezel/koko-aio/monitor-BASE.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -189,6 +189,11 @@ scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -207,19 +212,22 @@ HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.200000" +SCANLINE_MIN = "0.250000" SCANLINE_DARK = "0.050000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" -GEOM_CORNER_SMOOTH = "200.000000" +GEOM_CORNER_SIZE = "0.010000" +GEOM_CORNER_SMOOTH = "400.000000" BEZEL_INNER_ZOOM = "-0.215000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/monitor-Commodore_1084S-Night.slangp b/bezel/koko-aio/monitor-Commodore_1084S-Night.slangp new file mode 100644 index 0000000..62f8b0a --- /dev/null +++ b/bezel/koko-aio/monitor-Commodore_1084S-Night.slangp @@ -0,0 +1,271 @@ +shaders = "17" +shader0 = "shaders/ntsc_pass.slang" +filter_linear0 = "false" +wrap_mode0 = "mirrored_repeat" +mipmap_input0 = "false" +alias0 = "ntsc_pass" +float_framebuffer0 = "false" +srgb_framebuffer0 = "false" +scale_type_x0 = "source" +scale_x0 = "1.000000" +scale_type_y0 = "source" +scale_y0 = "1.000000" +shader1 = "shaders/first_pass.slang" +filter_linear1 = "false" +wrap_mode1 = "mirrored_repeat" +mipmap_input1 = "false" +alias1 = "first_pass" +float_framebuffer1 = "false" +srgb_framebuffer1 = "false" +scale_type_x1 = "source" +scale_x1 = "2.000000" +scale_type_y1 = "source" +scale_y1 = "2.000000" +shader2 = "shaders/fxaa.slang" +filter_linear2 = "true" +wrap_mode2 = "mirrored_repeat" +mipmap_input2 = "true" +alias2 = "FXAA_pass" +float_framebuffer2 = "false" +srgb_framebuffer2 = "false" +scale_type_x2 = "source" +scale_x2 = "1.000000" +scale_type_y2 = "source" +scale_y2 = "1.000000" +shader3 = "shaders/shift_and_bleed.slang" +filter_linear3 = "true" +wrap_mode3 = "mirrored_repeat" +mipmap_input3 = "false" +alias3 = "shift_and_bleed_pass" +float_framebuffer3 = "true" +srgb_framebuffer3 = "false" +scale_type_x3 = "source" +scale_x3 = "1.000000" +scale_type_y3 = "source" +scale_y3 = "1.000000" +shader4 = "shaders/in_glow_x.slang" +filter_linear4 = "true" +wrap_mode4 = "mirrored_repeat" +mipmap_input4 = "false" +alias4 = "in_glow_pass_x" +float_framebuffer4 = "true" +srgb_framebuffer4 = "false" +scale_type_x4 = "source" +scale_x4 = "1.000000" +scale_type_y4 = "source" +scale_y4 = "1.000000" +shader5 = "shaders/in_glow_y.slang" +filter_linear5 = "true" +wrap_mode5 = "mirrored_repeat" +mipmap_input5 = "false" +alias5 = "in_glow_pass" +float_framebuffer5 = "true" +srgb_framebuffer5 = "false" +scale_type_x5 = "source" +scale_x5 = "1.000000" +scale_type_y5 = "source" +scale_y5 = "1.000000" +shader6 = "shaders/halo_x.slang" +filter_linear6 = "true" +wrap_mode6 = "clamp_to_edge" +mipmap_input6 = "false" +alias6 = "halo_pass_x" +float_framebuffer6 = "true" +srgb_framebuffer6 = "false" +scale_type_x6 = "source" +scale_x6 = "1.000000" +scale_type_y6 = "source" +scale_y6 = "1.000000" +shader7 = "shaders/halo_y.slang" +filter_linear7 = "true" +wrap_mode7 = "clamp_to_edge" +mipmap_input7 = "false" +alias7 = "halo_pass" +float_framebuffer7 = "true" +srgb_framebuffer7 = "false" +scale_type_x7 = "source" +scale_x7 = "1.000000" +scale_type_y7 = "source" +scale_y7 = "1.000000" +shader8 = "shaders/avglum_pass.slang" +filter_linear8 = "true" +wrap_mode8 = "mirrored_repeat" +mipmap_input8 = "false" +alias8 = "avglum_pass" +float_framebuffer8 = "false" +srgb_framebuffer8 = "false" +scale_type_x8 = "source" +scale_x8 = "0.500000" +scale_type_y8 = "source" +scale_y8 = "0.500000" +shader9 = "shaders/reflection_blur_pre.slang" +filter_linear9 = "true" +wrap_mode9 = "clamp_to_border" +mipmap_input9 = "false" +alias9 = "reflected_blurred_pass_pre" +float_framebuffer9 = "false" +srgb_framebuffer9 = "false" +scale_type_x9 = "source" +scale_x9 = "1.000000" +scale_type_y9 = "source" +scale_y9 = "1.000000" +shader10 = "shaders/reflection_blur.slang" +filter_linear10 = "true" +wrap_mode10 = "mirrored_repeat" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" +float_framebuffer10 = "false" +srgb_framebuffer10 = "false" +scale_type_x10 = "source" +scale_x10 = "1.000000" +scale_type_y10 = "source" +scale_y10 = "1.000000" +shader11 = "shaders/bloom_pass_1.slang" +filter_linear11 = "true" +wrap_mode11 = "mirrored_repeat" +mipmap_input11 = "false" +alias11 = "bloom_pass_1" +float_framebuffer11 = "false" +srgb_framebuffer11 = "false" +scale_type_x11 = "source" +scale_x11 = "1.000000" +scale_type_y11 = "source" +scale_y11 = "1.000000" +shader12 = "shaders/bloom_pass_2.slang" +filter_linear12 = "true" +wrap_mode12 = "clamp_to_edge" +mipmap_input12 = "false" +alias12 = "bloom_pass_2" +float_framebuffer12 = "false" +srgb_framebuffer12 = "false" +scale_type_x12 = "source" +scale_x12 = "0.500000" +scale_type_y12 = "source" +scale_y12 = "0.500000" +shader13 = "shaders/bloom_pass_3.slang" +filter_linear13 = "true" +wrap_mode13 = "clamp_to_edge" +mipmap_input13 = "false" +alias13 = "bloom_pass_3" +float_framebuffer13 = "false" +srgb_framebuffer13 = "false" +scale_type_x13 = "source" +scale_x13 = "1.000000" +scale_type_y13 = "source" +scale_y13 = "1.000000" +shader14 = "shaders/bloom_pass_4.slang" +filter_linear14 = "true" +wrap_mode14 = "mirrored_repeat" +mipmap_input14 = "false" +alias14 = "bloom_pass_final" +float_framebuffer14 = "true" +srgb_framebuffer14 = "false" +scale_type_x14 = "source" +scale_x14 = "1.000000" +scale_type_y14 = "source" +scale_y14 = "1.000000" +shader15 = "shaders/ambi_temporal_pass.slang" +filter_linear15 = "true" +wrap_mode15 = "clamp_to_border" +mipmap_input15 = "false" +alias15 = "ambi_temporal_pass" +float_framebuffer15 = "true" +srgb_framebuffer15 = "false" +scale_type_x15 = "viewport" +scale_x15 = "0.050000" +scale_type_y15 = "viewport" +scale_y15 = "0.050000" +shader16 = "shaders/final_pass.slang" +filter_linear16 = "true" +wrap_mode16 = "mirrored_repeat" +mipmap_input16 = "false" +alias16 = "final_pass" +float_framebuffer16 = "false" +srgb_framebuffer16 = "false" +scale_type_x16 = "viewport" +scale_x16 = "1.000000" +scale_type_y16 = "viewport" +scale_y16 = "1.000000" +DO_CCORRECTION = "1.000000" +LUMINANCE = "0.200000" +GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" +DO_IN_GLOW = "1.000000" +IN_GLOW_POWER = "1.600000" +IN_GLOW_GAMMA = "2.000000" +IN_GLOW_W = "0.000000" +IN_GLOW_H = "2.000000" +IN_GLOW_BIAS = "0.000000" +DO_VMASK_AND_DARKLINES = "1.000000" +RGB_MASK_STRENGTH = "1.000000" +VMASK_USE_GM = "1.000000" +DARKLINES_STRENGTH = "0.000000" +DO_HALO = "1.000000" +HALO_POWER = "0.430000" +HALO_W = "3.500000" +HALO_H = "3.500000" +HALO_GAMMA = "1.300000" +HALO_VS_SCAN = "1.000000" +DO_SCANLINES = "1.000000" +SCANLINE_MIN = "0.300000" +SCANLINE_SM_TYPE = "1.000000" +SCANLINE_SM_VOFFSET = "60.000000" +DO_BLOOM = "1.000000" +BLOOM_MIX = "0.500000" +DO_CURVATURE = "1.000000" +GEOM_WARP_X = "0.450000" +GEOM_WARP_Y = "0.500000" +GEOM_CORNER_SMOOTH = "700.000000" +DO_BEZEL = "1.000000" +BEZEL_INNER_ZOOM = "-0.600000" +BEZEL_FRAME_ZOOM = "-0.247000" +BEZEL_R = "0.030000" +BEZEL_G = "0.015000" +BEZEL_B = "0.005000" +BEZEL_CON = "2.180000" +BEZEL_REFL_STRENGTH = "0.640000" +BEZEL_DIFFUSION_STR = "0.500000" +BEZEL_CORNER_DARK = "0.400000" +DO_BG_IMAGE = "1.000000" +BG_IMAGE_OVER = "1.000000" +BG_IMAGE_ZOOM = "0.998000" +BG_IMAGE_NIGHTIFY = "0.800000" +AMBI_STEPS = "5.000000" +AMBI_FALLOFF = "0.300000" +AMBI_POWER = "7.000000" +AMBI_OVER_BEZEL = "0.000000" +AMBI_OVER_BEZEL_SIZE = "0.180000" +AMBI_BG_IMAGE_BLEND_MODE = "1.000000" +AMBI_BG_IMAGE_FORCE = "1.000000" +DO_VIGNETTE = "1.000000" +V_SIZE = "2.000000" +V_POWER = "1.050000" +DO_SPOT = "1.000000" +S_POSITION = "194.000000" +S_SIZE = "0.640000" +S_POWER = "0.250000" +textures = "monitor_body_curved;monitor_body_straight;bg_under;bg_over;backdrop" +monitor_body_curved = "textures/monitor_body_curved.png" +monitor_body_curved_linear = "true" +monitor_body_curved_wrap_mode = "clamp_to_edge" +monitor_body_curved_mipmap = "true" +monitor_body_straight = "textures/monitor_body_straight.png" +monitor_body_straight_linear = "true" +monitor_body_straight_wrap_mode = "clamp_to_edge" +monitor_body_straight_mipmap = "true" +bg_under = "textures/background_under.png" +bg_under_linear = "true" +bg_under_wrap_mode = "mirrored_repeat" +bg_under_mipmap = "true" +bg_over = "textures/background_over.png" +bg_over_linear = "true" +bg_over_wrap_mode = "mirrored_repeat" +bg_over_mipmap = "true" +backdrop = "textures/boothill.jpg" +backdrop_linear = "true" +backdrop_wrap_mode = "mirrored_repeat" +backdrop_mipmap = "true" diff --git a/bezel/koko-aio/monitor-Commodore_1084S-wider.slangp b/bezel/koko-aio/monitor-Commodore_1084S-wider.slangp index 19ce1b2..1c942c5 100644 --- a/bezel/koko-aio/monitor-Commodore_1084S-wider.slangp +++ b/bezel/koko-aio/monitor-Commodore_1084S-wider.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -188,9 +188,14 @@ scale_type_y16 = "viewport" scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" -GAMMA_OUT = "0.520000" +GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" -IN_GLOW_POWER = "2.100000" +IN_GLOW_POWER = "1.600000" IN_GLOW_GAMMA = "2.000000" IN_GLOW_W = "0.000000" IN_GLOW_H = "2.000000" @@ -200,15 +205,15 @@ RGB_MASK_STRENGTH = "1.000000" VMASK_USE_GM = "1.000000" DARKLINES_STRENGTH = "0.000000" DO_HALO = "1.000000" -HALO_POWER = "0.280000" +HALO_POWER = "0.430000" HALO_W = "3.500000" HALO_H = "3.500000" -HALO_GAMMA = "1.500000" -HALO_VS_SCAN = "0.800000" +HALO_GAMMA = "1.300000" +HALO_VS_SCAN = "1.000000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.450000" -SCANLINE_DARK = "0.050000" +SCANLINE_MIN = "0.300000" SCANLINE_SM_TYPE = "1.000000" +SCANLINE_SM_VOFFSET = "60.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" @@ -216,23 +221,23 @@ GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "700.000000" DO_BEZEL = "1.000000" -BEZEL_R = "0.025000" -BEZEL_G = "0.000000" -BEZEL_B = "-0.025000" -BEZEL_INNER_ZOOM = "-0.390000" +BEZEL_INNER_ZOOM = "-0.440000" BEZEL_FRAME_ZOOM = "-0.140000" -BEZEL_IMAGE_BORDER = "1.030000" +BEZEL_R = "0.030000" +BEZEL_G = "0.015000" +BEZEL_B = "0.005000" +BEZEL_CON = "2.180000" BEZEL_REFL_STRENGTH = "0.200000" -BEZEL_RFL_OFFSET = "-0.003000" -BEZEL_REFL_ZOOM = "0.993000" DO_BG_IMAGE = "1.000000" BG_IMAGE_OVER = "1.000000" -BG_IMAGE_OFFX = "0.002000" -BG_IMAGE_OFFY = "0.045500" BG_IMAGE_ZOOM = "1.091004" -DO_AMBILIGHT = "0.000000" -AMBI_FALLOFF = "0.400000" -AMBI_POWER = "1.000000" +AMBI_STEPS = "5.000000" +AMBI_FALLOFF = "0.500000" +AMBI_POWER = "0.700000" +AMBI_OVER_BEZEL = "0.000000" +AMBI_OVER_BEZEL_SIZE = "0.180000" +AMBI_BG_IMAGE_BLEND_MODE = "1.000000" +AMBI_BG_IMAGE_FORCE = "1.000000" DO_VIGNETTE = "1.000000" V_SIZE = "2.000000" V_POWER = "1.050000" @@ -242,7 +247,7 @@ S_SIZE = "0.640000" S_POWER = "0.250000" DO_GLOBAL_SHZO = "1.000000" GLOBAL_OFFX = "-0.001000" -GLOBAL_OFFY = "-0.037000" +GLOBAL_OFFY = "0.006000" GLOBAL_ZOOM = "1.000000" textures = "monitor_body_curved;monitor_body_straight;bg_under;bg_over;backdrop" monitor_body_curved = "textures/monitor_body_curved.png" diff --git a/bezel/koko-aio/monitor-Commodore_1084S.slangp b/bezel/koko-aio/monitor-Commodore_1084S.slangp index 7cea6c0..0d2a74d 100644 --- a/bezel/koko-aio/monitor-Commodore_1084S.slangp +++ b/bezel/koko-aio/monitor-Commodore_1084S.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -188,9 +188,14 @@ scale_type_y16 = "viewport" scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" -GAMMA_OUT = "0.520000" +GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" -IN_GLOW_POWER = "2.100000" +IN_GLOW_POWER = "1.600000" IN_GLOW_GAMMA = "2.000000" IN_GLOW_W = "0.000000" IN_GLOW_H = "2.000000" @@ -200,15 +205,15 @@ RGB_MASK_STRENGTH = "1.000000" VMASK_USE_GM = "1.000000" DARKLINES_STRENGTH = "0.000000" DO_HALO = "1.000000" -HALO_POWER = "0.280000" +HALO_POWER = "0.430000" HALO_W = "3.500000" HALO_H = "3.500000" -HALO_GAMMA = "1.500000" -HALO_VS_SCAN = "0.800000" +HALO_GAMMA = "1.300000" +HALO_VS_SCAN = "1.000000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.600000" -SCANLINE_DARK = "0.050000" +SCANLINE_MIN = "0.300000" SCANLINE_SM_TYPE = "1.000000" +SCANLINE_SM_VOFFSET = "60.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" @@ -216,23 +221,23 @@ GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "700.000000" DO_BEZEL = "1.000000" -BEZEL_R = "0.025000" -BEZEL_G = "0.000000" -BEZEL_B = "-0.025000" -BEZEL_INNER_ZOOM = "-0.520000" -BEZEL_FRAME_ZOOM = "-0.250000" -BEZEL_IMAGE_BORDER = "1.040000" +BEZEL_INNER_ZOOM = "-0.600000" +BEZEL_FRAME_ZOOM = "-0.247000" +BEZEL_R = "0.030000" +BEZEL_G = "0.015000" +BEZEL_B = "0.005000" +BEZEL_CON = "2.180000" BEZEL_REFL_STRENGTH = "0.200000" -BEZEL_RFL_OFFSET = "-0.003000" -BEZEL_REFL_ZOOM = "0.993000" DO_BG_IMAGE = "1.000000" BG_IMAGE_OVER = "1.000000" -BG_IMAGE_OFFX = "0.001500" -BG_IMAGE_OFFY = "0.001500" BG_IMAGE_ZOOM = "0.998000" -DO_AMBILIGHT = "0.000000" -AMBI_FALLOFF = "0.400000" -AMBI_POWER = "1.000000" +AMBI_STEPS = "5.000000" +AMBI_FALLOFF = "0.500000" +AMBI_POWER = "0.700000" +AMBI_OVER_BEZEL = "0.000000" +AMBI_OVER_BEZEL_SIZE = "0.180000" +AMBI_BG_IMAGE_BLEND_MODE = "1.000000" +AMBI_BG_IMAGE_FORCE = "1.000000" DO_VIGNETTE = "1.000000" V_SIZE = "2.000000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/monitor-bloom-bezel.slangp b/bezel/koko-aio/monitor-bloom-bezel.slangp index c9730fb..c1ab793 100644 --- a/bezel/koko-aio/monitor-bloom-bezel.slangp +++ b/bezel/koko-aio/monitor-bloom-bezel.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -188,7 +188,12 @@ scale_type_y16 = "viewport" scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" -GAMMA_OUT = "0.530000" +GAMMA_OUT = "0.500000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -201,28 +206,30 @@ VMASK_USE_GM = "1.000000" VMASK_GAP = "1.000000" DARKLINES_STRENGTH = "0.000000" DO_HALO = "1.000000" -HALO_POWER = "0.430000" +HALO_POWER = "0.380000" HALO_W = "3.500000" HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.300000" -SCANLINES_BLEEDING = "0.300000" +SCANLINE_MIN = "0.250000" +SCANLINE_MAX = "0.700000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.165000" +BEZEL_INNER_ZOOM = "-0.185000" BEZEL_FRAME_ZOOM = "0.040000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.600000" AMBI_POWER = "1.700000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/monitor-bloom-bezelwider.slangp b/bezel/koko-aio/monitor-bloom-bezelwider.slangp index 4e7369e..b635aa8 100644 --- a/bezel/koko-aio/monitor-bloom-bezelwider.slangp +++ b/bezel/koko-aio/monitor-bloom-bezelwider.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -188,7 +188,12 @@ scale_type_y16 = "viewport" scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" -GAMMA_OUT = "0.530000" +GAMMA_OUT = "0.500000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -201,28 +206,30 @@ VMASK_USE_GM = "1.000000" VMASK_GAP = "1.000000" DARKLINES_STRENGTH = "0.000000" DO_HALO = "1.000000" -HALO_POWER = "0.430000" +HALO_POWER = "0.380000" HALO_W = "3.500000" HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" SCANLINE_MIN = "0.200000" -SCANLINES_BLEEDING = "0.300000" +SCANLINE_MAX = "0.700000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/monitor-bloom.slangp b/bezel/koko-aio/monitor-bloom.slangp index 020054f..75e432b 100644 --- a/bezel/koko-aio/monitor-bloom.slangp +++ b/bezel/koko-aio/monitor-bloom.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -189,6 +189,11 @@ scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -207,20 +212,23 @@ HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.200000" +SCANLINE_MIN = "0.250000" SCANLINE_DARK = "0.050000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" -GEOM_CORNER_SMOOTH = "200.000000" +GEOM_CORNER_SIZE = "0.010000" +GEOM_CORNER_SMOOTH = "400.000000" BEZEL_INNER_ZOOM = "-0.215000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/monitor-slotmask-bloom-ShinyBezel.slangp b/bezel/koko-aio/monitor-slotmask-bloom-ShinyBezel.slangp new file mode 100644 index 0000000..55d7f32 --- /dev/null +++ b/bezel/koko-aio/monitor-slotmask-bloom-ShinyBezel.slangp @@ -0,0 +1,271 @@ +shaders = "17" +shader0 = "shaders/ntsc_pass.slang" +filter_linear0 = "false" +wrap_mode0 = "mirrored_repeat" +mipmap_input0 = "false" +alias0 = "ntsc_pass" +float_framebuffer0 = "false" +srgb_framebuffer0 = "false" +scale_type_x0 = "source" +scale_x0 = "1.000000" +scale_type_y0 = "source" +scale_y0 = "1.000000" +shader1 = "shaders/first_pass.slang" +filter_linear1 = "false" +wrap_mode1 = "mirrored_repeat" +mipmap_input1 = "false" +alias1 = "first_pass" +float_framebuffer1 = "false" +srgb_framebuffer1 = "false" +scale_type_x1 = "source" +scale_x1 = "2.000000" +scale_type_y1 = "source" +scale_y1 = "2.000000" +shader2 = "shaders/fxaa.slang" +filter_linear2 = "true" +wrap_mode2 = "mirrored_repeat" +mipmap_input2 = "true" +alias2 = "FXAA_pass" +float_framebuffer2 = "false" +srgb_framebuffer2 = "false" +scale_type_x2 = "source" +scale_x2 = "1.000000" +scale_type_y2 = "source" +scale_y2 = "1.000000" +shader3 = "shaders/shift_and_bleed.slang" +filter_linear3 = "true" +wrap_mode3 = "mirrored_repeat" +mipmap_input3 = "false" +alias3 = "shift_and_bleed_pass" +float_framebuffer3 = "true" +srgb_framebuffer3 = "false" +scale_type_x3 = "source" +scale_x3 = "1.000000" +scale_type_y3 = "source" +scale_y3 = "1.000000" +shader4 = "shaders/in_glow_x.slang" +filter_linear4 = "true" +wrap_mode4 = "mirrored_repeat" +mipmap_input4 = "false" +alias4 = "in_glow_pass_x" +float_framebuffer4 = "true" +srgb_framebuffer4 = "false" +scale_type_x4 = "source" +scale_x4 = "1.000000" +scale_type_y4 = "source" +scale_y4 = "1.000000" +shader5 = "shaders/in_glow_y.slang" +filter_linear5 = "true" +wrap_mode5 = "mirrored_repeat" +mipmap_input5 = "false" +alias5 = "in_glow_pass" +float_framebuffer5 = "true" +srgb_framebuffer5 = "false" +scale_type_x5 = "source" +scale_x5 = "1.000000" +scale_type_y5 = "source" +scale_y5 = "1.000000" +shader6 = "shaders/halo_x.slang" +filter_linear6 = "true" +wrap_mode6 = "clamp_to_edge" +mipmap_input6 = "false" +alias6 = "halo_pass_x" +float_framebuffer6 = "true" +srgb_framebuffer6 = "false" +scale_type_x6 = "source" +scale_x6 = "1.000000" +scale_type_y6 = "source" +scale_y6 = "1.000000" +shader7 = "shaders/halo_y.slang" +filter_linear7 = "true" +wrap_mode7 = "clamp_to_edge" +mipmap_input7 = "false" +alias7 = "halo_pass" +float_framebuffer7 = "true" +srgb_framebuffer7 = "false" +scale_type_x7 = "source" +scale_x7 = "1.000000" +scale_type_y7 = "source" +scale_y7 = "1.000000" +shader8 = "shaders/avglum_pass.slang" +filter_linear8 = "true" +wrap_mode8 = "mirrored_repeat" +mipmap_input8 = "false" +alias8 = "avglum_pass" +float_framebuffer8 = "false" +srgb_framebuffer8 = "false" +scale_type_x8 = "source" +scale_x8 = "0.500000" +scale_type_y8 = "source" +scale_y8 = "0.500000" +shader9 = "shaders/reflection_blur_pre.slang" +filter_linear9 = "true" +wrap_mode9 = "clamp_to_border" +mipmap_input9 = "false" +alias9 = "reflected_blurred_pass_pre" +float_framebuffer9 = "false" +srgb_framebuffer9 = "false" +scale_type_x9 = "source" +scale_x9 = "1.000000" +scale_type_y9 = "source" +scale_y9 = "1.000000" +shader10 = "shaders/reflection_blur.slang" +filter_linear10 = "true" +wrap_mode10 = "mirrored_repeat" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" +float_framebuffer10 = "false" +srgb_framebuffer10 = "false" +scale_type_x10 = "source" +scale_x10 = "1.000000" +scale_type_y10 = "source" +scale_y10 = "1.000000" +shader11 = "shaders/bloom_pass_1.slang" +filter_linear11 = "true" +wrap_mode11 = "mirrored_repeat" +mipmap_input11 = "false" +alias11 = "bloom_pass_1" +float_framebuffer11 = "false" +srgb_framebuffer11 = "false" +scale_type_x11 = "source" +scale_x11 = "1.000000" +scale_type_y11 = "source" +scale_y11 = "1.000000" +shader12 = "shaders/bloom_pass_2.slang" +filter_linear12 = "true" +wrap_mode12 = "clamp_to_edge" +mipmap_input12 = "false" +alias12 = "bloom_pass_2" +float_framebuffer12 = "false" +srgb_framebuffer12 = "false" +scale_type_x12 = "source" +scale_x12 = "0.500000" +scale_type_y12 = "source" +scale_y12 = "0.500000" +shader13 = "shaders/bloom_pass_3.slang" +filter_linear13 = "true" +wrap_mode13 = "clamp_to_edge" +mipmap_input13 = "false" +alias13 = "bloom_pass_3" +float_framebuffer13 = "false" +srgb_framebuffer13 = "false" +scale_type_x13 = "source" +scale_x13 = "1.000000" +scale_type_y13 = "source" +scale_y13 = "1.000000" +shader14 = "shaders/bloom_pass_4.slang" +filter_linear14 = "true" +wrap_mode14 = "mirrored_repeat" +mipmap_input14 = "false" +alias14 = "bloom_pass_final" +float_framebuffer14 = "true" +srgb_framebuffer14 = "false" +scale_type_x14 = "source" +scale_x14 = "1.000000" +scale_type_y14 = "source" +scale_y14 = "1.000000" +shader15 = "shaders/ambi_temporal_pass.slang" +filter_linear15 = "true" +wrap_mode15 = "clamp_to_border" +mipmap_input15 = "false" +alias15 = "ambi_temporal_pass" +float_framebuffer15 = "true" +srgb_framebuffer15 = "false" +scale_type_x15 = "viewport" +scale_x15 = "0.050000" +scale_type_y15 = "viewport" +scale_y15 = "0.050000" +shader16 = "shaders/final_pass.slang" +filter_linear16 = "true" +wrap_mode16 = "mirrored_repeat" +mipmap_input16 = "false" +alias16 = "final_pass" +float_framebuffer16 = "false" +srgb_framebuffer16 = "false" +scale_type_x16 = "viewport" +scale_x16 = "1.000000" +scale_type_y16 = "viewport" +scale_y16 = "1.000000" +DO_CCORRECTION = "1.000000" +LUMINANCE = "0.200000" +GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" +DO_IN_GLOW = "1.000000" +IN_GLOW_POWER = "1.950000" +IN_GLOW_GAMMA = "2.000000" +IN_GLOW_W = "0.000000" +IN_GLOW_H = "2.000000" +IN_GLOW_BIAS = "0.000000" +DO_VMASK_AND_DARKLINES = "1.000000" +RGB_MASK_STRENGTH = "1.000000" +VMASK_USE_GM = "1.000000" +VMASK_GAP = "1.000000" +DARKLINES_STRENGTH = "0.000000" +DO_HALO = "1.000000" +HALO_POWER = "0.430000" +HALO_W = "3.500000" +HALO_H = "3.500000" +HALO_GAMMA = "1.300000" +HALO_VS_SCAN = "0.800000" +DO_SCANLINES = "1.000000" +SCANLINE_MIN = "0.250000" +SCANLINE_SM_TYPE = "1.000000" +SCANLINE_SM_VOFFSET = "70.000000" +DO_BLOOM = "1.000000" +BLOOM_MIX = "0.500000" +DO_CURVATURE = "1.000000" +GEOM_WARP_X = "0.450000" +GEOM_WARP_Y = "0.500000" +GEOM_CORNER_SMOOTH = "400.000000" +DO_BEZEL = "1.000000" +BEZEL_INNER_ZOOM = "-0.185000" +BEZEL_FRAME_ZOOM = "0.040000" +BEZEL_R = "-0.115000" +BEZEL_G = "-0.115000" +BEZEL_B = "-0.115000" +BEZEL_CON = "4.000000" +BEZEL_REFL_STRENGTH = "1.000000" +BEZEL_RFL_BLR_SHD = "1.000000" +BEZEL_ROUGHNESS = "1.300000" +BEZEL_DIFFUSION_STR = "0.500000" +BEZEL_SPCL_STRENGTH = "0.800000" +BEZEL_CORNER_DARK = "0.000000" +DO_BG_IMAGE = "1.000000" +BG_IMAGE_NIGHTIFY = "0.700000" +AMBI_STEPS = "5.000000" +AMBI_FALLOFF = "0.380000" +AMBI_POWER = "7.000000" +AMBI_OVER_BEZEL = "1.700000" +AMBI_OVER_BEZEL_SIZE = "0.140000" +AMBI_BG_IMAGE_BLEND_MODE = "1.000000" +AMBI_BG_IMAGE_FORCE = "0.500000" +DO_VIGNETTE = "1.000000" +V_SIZE = "2.700000" +V_POWER = "1.050000" +DO_SPOT = "1.000000" +S_POSITION = "194.000000" +textures = "monitor_body_curved;monitor_body_straight;bg_under;bg_over;backdrop" +monitor_body_curved = "textures/monitor_body_curved.png" +monitor_body_curved_linear = "true" +monitor_body_curved_wrap_mode = "clamp_to_edge" +monitor_body_curved_mipmap = "true" +monitor_body_straight = "textures/monitor_body_straight.png" +monitor_body_straight_linear = "true" +monitor_body_straight_wrap_mode = "clamp_to_edge" +monitor_body_straight_mipmap = "true" +bg_under = "textures/background_under.png" +bg_under_linear = "true" +bg_under_wrap_mode = "mirrored_repeat" +bg_under_mipmap = "true" +bg_over = "textures/background_over.png" +bg_over_linear = "true" +bg_over_wrap_mode = "mirrored_repeat" +bg_over_mipmap = "true" +backdrop = "textures/boothill.jpg" +backdrop_linear = "true" +backdrop_wrap_mode = "mirrored_repeat" +backdrop_mipmap = "true" diff --git a/bezel/koko-aio/monitor-slotmask-bloom-bezel-backimage.slangp b/bezel/koko-aio/monitor-slotmask-bloom-bezel-backimage.slangp index 29a8166..5ec274b 100644 --- a/bezel/koko-aio/monitor-slotmask-bloom-bezel-backimage.slangp +++ b/bezel/koko-aio/monitor-slotmask-bloom-bezel-backimage.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -189,6 +189,11 @@ scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -207,25 +212,27 @@ HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.300000" -SCANLINES_BLEEDING = "0.300000" +SCANLINE_MIN = "0.250000" SCANLINE_SM_TYPE = "1.000000" SCANLINE_SM_VOFFSET = "70.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.165000" +BEZEL_INNER_ZOOM = "-0.185000" BEZEL_FRAME_ZOOM = "0.040000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" DO_BG_IMAGE = "1.000000" AMBI_STEPS = "5.000000" AMBI_POWER = "2.100000" +AMBI_OVER_BEZEL = "0.200000" +AMBI_BG_IMAGE_BLEND_MODE = "1.000000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp b/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp index 84fd8c0..84123aa 100644 --- a/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp +++ b/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -189,6 +189,11 @@ scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -207,24 +212,25 @@ HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.300000" -SCANLINES_BLEEDING = "0.300000" +SCANLINE_MIN = "0.250000" SCANLINE_SM_TYPE = "1.000000" SCANLINE_SM_VOFFSET = "70.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.165000" +BEZEL_INNER_ZOOM = "-0.185000" BEZEL_FRAME_ZOOM = "0.040000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.600000" AMBI_POWER = "1.700000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/monitor-slotmask-bloom-bezelwider-classic_take.slangp b/bezel/koko-aio/monitor-slotmask-bloom-bezelwider-classic_take.slangp index 7fe5803..1cf7dcb 100644 --- a/bezel/koko-aio/monitor-slotmask-bloom-bezelwider-classic_take.slangp +++ b/bezel/koko-aio/monitor-slotmask-bloom-bezelwider-classic_take.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -189,8 +189,13 @@ scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" GAMMA_OUT = "0.525000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" -IN_GLOW_POWER = "1.950000" +IN_GLOW_POWER = "1.700000" IN_GLOW_GAMMA = "2.000000" IN_GLOW_SPREAD = "1.200000" IN_GLOW_W = "1.000000" @@ -199,32 +204,31 @@ IN_GLOW_BIAS = "0.000000" DO_VMASK_AND_DARKLINES = "1.000000" RGB_MASK_STRENGTH = "1.000000" VMASK_USE_GM = "1.000000" -VMASK_GAP = "1.000000" DO_HALO = "1.000000" -HALO_POWER = "0.355000" +HALO_POWER = "0.430000" HALO_W = "3.500000" HALO_H = "3.500000" HALO_GAMMA = "1.300000" -HALO_VS_SCAN = "0.600000" +HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.050000" -SCANLINE_MAX = "4.099998" -SCANLINE_DARK = "0.100000" +SCANLINE_MIN = "0.250000" SCANLINE_SM_VOFFSET = "70.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/monitor-slotmask-bloom-bezelwider.slangp b/bezel/koko-aio/monitor-slotmask-bloom-bezelwider.slangp index b2a970b..e42b3a4 100644 --- a/bezel/koko-aio/monitor-slotmask-bloom-bezelwider.slangp +++ b/bezel/koko-aio/monitor-slotmask-bloom-bezelwider.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -189,6 +189,11 @@ scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -207,23 +212,25 @@ HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.200000" +SCANLINE_MIN = "0.250000" SCANLINE_SM_TYPE = "1.000000" SCANLINE_SM_VOFFSET = "70.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/monitor-slotmask-bloom.slangp b/bezel/koko-aio/monitor-slotmask-bloom.slangp index 83a5a16..1bda49c 100644 --- a/bezel/koko-aio/monitor-slotmask-bloom.slangp +++ b/bezel/koko-aio/monitor-slotmask-bloom.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -189,6 +189,11 @@ scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -207,21 +212,24 @@ HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.200000" +SCANLINE_MIN = "0.250000" SCANLINE_SM_TYPE = "1.000000" SCANLINE_SM_VOFFSET = "70.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" -GEOM_CORNER_SMOOTH = "200.000000" +GEOM_CORNER_SIZE = "0.010000" +GEOM_CORNER_SMOOTH = "400.000000" BEZEL_INNER_ZOOM = "-0.215000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/monitor-slotmask.slangp b/bezel/koko-aio/monitor-slotmask.slangp index a18e357..112ea04 100644 --- a/bezel/koko-aio/monitor-slotmask.slangp +++ b/bezel/koko-aio/monitor-slotmask.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -189,6 +189,11 @@ scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" LUMINANCE = "0.200000" GAMMA_OUT = "0.530000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "1.950000" IN_GLOW_GAMMA = "2.000000" @@ -207,20 +212,23 @@ HALO_H = "3.500000" HALO_GAMMA = "1.300000" HALO_VS_SCAN = "0.800000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.200000" +SCANLINE_MIN = "0.250000" SCANLINE_SM_TYPE = "1.000000" SCANLINE_SM_VOFFSET = "70.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" -GEOM_CORNER_SMOOTH = "200.000000" +GEOM_CORNER_SIZE = "0.010000" +GEOM_CORNER_SMOOTH = "400.000000" BEZEL_INNER_ZOOM = "-0.215000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/shaders/ambi_temporal_pass.slang b/bezel/koko-aio/shaders/ambi_temporal_pass.slang index 2c0ccd6..e7df0e3 100644 --- a/bezel/koko-aio/shaders/ambi_temporal_pass.slang +++ b/bezel/koko-aio/shaders/ambi_temporal_pass.slang @@ -3,6 +3,7 @@ /* This pass simulates the presence of a led strip placed on the back of the virtual screen */ #include "config.inc" +#include "includes/functions.include.slang" #define PastSampler ambi_temporal_passFeedback @@ -18,8 +19,8 @@ layout(location = 1) out float border_min; layout(location = 2) out float border_max; layout(location = 3) out float fstep; layout(location = 4) out float lod; -layout(location = 5) out vec2 vWarp_vexp; -layout(location = 6) out vec2 vWarp_arg2; +layout(location = 5) out vec2 pre_pass_coords; +layout(location = 6) out float vIs_rotated; void main() { gl_Position = global.MVP * Position; @@ -32,9 +33,30 @@ void main() { //Calc a lod for a texture sized led_strip x led_strip lod = log2(global.first_passSize.y / leds_per_strip); - //Precalc some Curvature/Warp values: - vWarp_vexp = 1.0/ (1 + (vec2(GEOM_WARP_X, GEOM_WARP_Y) * 0.2)) ; - vWarp_arg2 = 1.0 - pow(vec2(0.29289321881345247559915563789515), vWarp_vexp ); + + //Scale to the original aspect + float in_aspect = get_in_aspect(); + + bool isrotated = is_rotated(); + vIs_rotated = float(isrotated); + + if ( !do_integer_scale() ) + pre_pass_coords = get_scaled_coords_aspect(TexCoord,global.FinalViewportSize, in_aspect, isrotated) + vec2(0.00001); + else + pre_pass_coords = integer_scale(TexCoord, in_aspect, isrotated) ; + + + if (DO_GLOBAL_SHZO >0.5) + pre_pass_coords = zoom(pre_pass_coords + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ); + + if (DO_GAME_GEOM_OVERRIDE > 0.5) + pre_pass_coords = content_geom_override(pre_pass_coords, GAME_GEOM_ASPECT, get_in_aspect(), GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM); + + + if (DO_BEZEL > 0.5) + pre_pass_coords = zoomout_coords(pre_pass_coords, -get_BEZEL_INNER_ZOOM() , 1.0); + + } #pragma stage fragment @@ -43,8 +65,8 @@ layout(location = 1) in float border_min; layout(location = 2) in float border_max; layout(location = 3) in float fstep; layout(location = 4) in float lod; -layout(location = 5) in vec2 vWarp_vexp; -layout(location = 6) in vec2 vWarp_arg2; +layout(location = 5) in vec2 pre_pass_coords; +layout(location = 6) in float vIs_rotated; layout(location = 0) out vec4 FragColor; @@ -54,7 +76,7 @@ layout(set = 0, binding = 3) uniform sampler2D avglum_passFeedback; layout(set = 0, binding = 4) uniform sampler2D first_pass; -#include "includes/functions.include.slang" + vec3 ambi_push_pass(vec2 coords, float f_lod) { vec3 pixel_out = textureLod(first_pass, coords, f_lod).rgb; @@ -70,35 +92,23 @@ vec3 circle_smooth(vec2 coords, vec2 middle, float f_radius, float FALLOFF, floa return circle_color; } -#define tol_start 0.06 //skip tolerance -#define tol_end 0.94 //1-tol_start +#define tol_start 0.08 //skip tolerance +#define tol_end 1-tol_start -vec3 ambi_pre_pass() { +vec3 ambi_pre_pass(vec2 coords) { + if (DO_TILT == 1.0) + coords = tilt(coords, vIs_rotated, vec2(TILT_X, TILT_Y)); + + + //Skip coords in the rect "under the tube" + if (coords.x > tol_start && + coords.x < tol_end && + coords.y > tol_start && + coords.y < tol_end) + return vec3(0.0); - //Scale to the original aspect - vec2 coords = get_scaled_coords(vTexCoord, global.FinalViewportSize, is_rotated()); - if (DO_GLOBAL_SHZO >0.5) - coords = zoom(coords + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ); - - if (DO_BEZEL==1.0) coords = zoomout_coords(coords, -BEZEL_INNER_ZOOM , 1.0); - - //Skip coords in the rect "under the monitor" - FragColor = vec4(0.0); - - //First consider to skip the curved coords - if (DO_CURVATURE == 1.0) { - if ((GEOM_WARP_X > 0.0) || (GEOM_WARP_Y > 0.0)) { - vec2 coords_curved = Warp_fast(coords, vWarp_vexp, vWarp_arg2); // vec2 coords_curved = Warp(coords, GEOM_WARP_X, GEOM_WARP_Y); - if ( ( (coords_curved.x > tol_start && coords_curved.x < 1.0 - tol_start ) && (coords_curved.y > tol_start && coords_curved.y < 1.0 - tol_start) ) && - !( (coords.x < - tol_start || coords.x > 1.0 + tol_start) || (coords.y < - tol_start || coords.y > 1.0 + tol_start) ) ) - return vec3(0.0); - } - } - //...next, the straight ones (needed even when curvature is due, because it returns particular values in the corners) - //skip_pass = skip_pass && !( (coords.x < 0.0 -tol || coords.x > 1.0 +tol) || (coords.y < 0.0 -tol || coords.y > 1.0 +tol) ); -if (coords.x > tol_start && coords.x < tol_end && coords.y > tol_start && coords.y < tol_end) return vec3(0.0); - + //Finally, emulate leds. vec3 pixel_out = vec3(0.0); float middle_x; float middle_y ; @@ -147,10 +157,10 @@ vec3 ambi_step_rgb(vec3 s,vec3 d, vec3 mystep){ } -vec4 pixel_ambilight() { +vec4 pixel_ambilight(vec2 local_pre_pass_coords) { vec4 past_pixel_vec4 = texture(PastSampler, vTexCoord); - vec3 present_pixel = ambi_pre_pass().rgb; + vec3 present_pixel = ambi_pre_pass(local_pre_pass_coords).rgb; vec3 past_pixel = past_pixel_vec4.rgb; float scene_change_remaining = past_pixel_vec4.a; @@ -191,5 +201,5 @@ void main() { } - FragColor = pixel_ambilight(); + FragColor = pixel_ambilight(pre_pass_coords); } diff --git a/bezel/koko-aio/shaders/avglum_pass.slang b/bezel/koko-aio/shaders/avglum_pass.slang index 2b7fba7..827489c 100644 --- a/bezel/koko-aio/shaders/avglum_pass.slang +++ b/bezel/koko-aio/shaders/avglum_pass.slang @@ -15,9 +15,16 @@ layout(location = 1) in vec2 TexCoord; layout(location = 0) out vec2 vTexCoord; layout(location = 1) out float lod; +#include "includes/functions.include.slang" + + void main() { gl_Position = global.MVP * Position; - vTexCoord = TexCoord; + + vTexCoord = TexCoord; + + if (DO_GAME_GEOM_OVERRIDE > 0.5) + vTexCoord = content_geom_override(vTexCoord, GAME_GEOM_ASPECT, get_in_aspect(), GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM); } #pragma stage fragment @@ -56,7 +63,6 @@ float get_avglum() { * anything else: continuous sampling */ - bool reduced_sampling_co = vTexCoord.x > 0.24 && vTexCoord.x < 0.26 && vTexCoord.y > 0.24 && vTexCoord.y < 0.26 ; @@ -97,12 +103,17 @@ void main() { //if (DO_AMBILIGHT == 1.0 || DO_BEZEL == 1.0 || DO_DYNZOOM == 1.0) { if ( DO_AMBILIGHT + DO_BEZEL + DO_DYNZOOM + DO_BLOOM == 0 ) return; + vec4 pixel_out; pixel_out.a = get_avglum(); if (DO_BEZEL + DO_BLOOM > 0.0) { - //Create a small mipmap to be used to light the bezel corners. + //Create a small mipmap to be used to light the bezel corners + //and by the bloom pass to identify bright areas. pixel_out.rgb = textureLod(first_pass, vTexCoord, mip_lod).rgb; } + FragColor = pixel_out; + //FragColor = texture(first_pass, vTexCoord); + } diff --git a/bezel/koko-aio/shaders/config.globals.inc b/bezel/koko-aio/shaders/config.globals.inc index dbff650..dee14e3 100644 --- a/bezel/koko-aio/shaders/config.globals.inc +++ b/bezel/koko-aio/shaders/config.globals.inc @@ -110,7 +110,8 @@ #define RGB_MASK_STRENGTH global.RGB_MASK_STRENGTH #define VMASK_OVERWHITE params.VMASK_OVERWHITE #define VMASK_DARKLINE_SCALE params.VMASK_DARKLINE_SCALE - #define VMASK_GAP params.VMASK_GAP + #define VMASK_GAP params.VMASK_GAP + #define VMASK_USE_DUMB global.VMASK_USE_DUMB #define VMASK_USE_GM params.VMASK_USE_GM #define DARKLINES_STRENGTH global.DARKLINES_STRENGTH #define DRKLN_OVERWHITE params.DRKLN_OVERWHITE @@ -135,7 +136,7 @@ #define SCANLINE_FLICKERING global.SCANLINE_FLICKERING #define SCANLINE_FLICKERING_POWER global.SCANLINE_FLICKERING_POWER #define SCANLINE_DISABLE_ON_INTERLACE global.SCANLINE_DISABLE_ON_INTERLACE - #define SCANLINE_COMPENSATION global.SCANLINE_COMPENSATION + #define SCANLINE_MINMAX_GAMMA global.SCANLINE_MINMAX_GAMMA #define SCANLINE_SM_TYPE global.SCANLINE_SM_TYPE #define SCANLINE_SM_STRENGTH global.SCANLINE_SM_STRENGTH #define SCANLINE_SM_VOFFSET global.SCANLINE_SM_VOFFSET @@ -159,6 +160,7 @@ #define DO_CURVATURE global.DO_CURVATURE #define GEOM_WARP_X global.GEOM_WARP_X #define GEOM_WARP_Y global.GEOM_WARP_Y + #define GEOM_CUT_EARS global.GEOM_CUT_EARS #define GEOM_CORNER_SIZE global.GEOM_CORNER_SIZE #define GEOM_CORNER_SMOOTH global.GEOM_CORNER_SMOOTH @@ -171,12 +173,14 @@ #define BEZEL_CON global.BEZEL_CON #define BEZEL_INNER_ZOOM global.BEZEL_INNER_ZOOM #define BEZEL_FRAME_ZOOM global.BEZEL_FRAME_ZOOM - #define BEZEL_IMAGE_BORDER global.BEZEL_IMAGE_BORDER #define BEZEL_USE_STRAIGHT global.BEZEL_USE_STRAIGHT #define BEZEL_RFL_BLR_SHD global.BEZEL_RFL_BLR_SHD - #define BEZEL_RFL_OFFSET global.BEZEL_RFL_OFFSET - #define BEZEL_REFL_ZOOM global.BEZEL_REFL_ZOOM + #define BEZEL_RFL_ZOOM global.BEZEL_RFL_ZOOM #define BEZEL_REFL_STRENGTH global.BEZEL_REFL_STRENGTH + #define BEZEL_SPCL_STRENGTH global.BEZEL_SPCL_STRENGTH + #define BEZEL_DIFFUSION_STR global.BEZEL_DIFFUSION_STR + #define BEZEL_CORNER_DARK global.BEZEL_CORNER_DARK + #define BEZEL_ROUGHNESS global.BEZEL_ROUGHNESS #define DO_SPOT global.DO_SPOT #define S_POSITION global.S_POSITION @@ -198,23 +202,32 @@ #define BG_IMAGE_ZOOM global.BG_IMAGE_ZOOM #define BG_IMAGE_ROTATION global.BG_IMAGE_ROTATION #define BG_IMAGE_WRAP_MODE global.BG_IMAGE_WRAP_MODE + #define BG_IMAGE_NIGHTIFY global.BG_IMAGE_NIGHTIFY +#define DO_BACKDROP global. DO_BACKDROP + #define BACKDROP_OFFX global.BACKDROP_OFFX + #define BACKDROP_OFFY global.BACKDROP_OFFY + #define BACKDROP_ZOOM global.BACKDROP_ZOOM + #define DO_AMBILIGHT global.DO_AMBILIGHT - #define AMBI_STEPS global.AMBI_STEPS - #define AMBI_FALLOFF global.AMBI_FALLOFF - #define AMBI_POWER global.AMBI_POWER - #define AMBI_OVER_BEZEL global.AMBI_OVER_BEZEL - #define ASPECT_X global.ASPECT_X - #define ASPECT_Y global.ASPECT_Y - + #define AMBI_STEPS global.AMBI_STEPS + #define AMBI_FALLOFF global.AMBI_FALLOFF + #define AMBI_POWER global.AMBI_POWER + #define AMBI_OVER_BEZEL global.AMBI_OVER_BEZEL + #define AMBI_OVER_BEZEL_SIZE global.AMBI_OVER_BEZEL_SIZE + #define AMBI_BG_IMAGE_BLEND_MODE global.AMBI_BG_IMAGE_BLEND_MODE + #define AMBI_BG_IMAGE_FORCE global.AMBI_BG_IMAGE_FORCE +//Global aspect ratio related + #define ASPECT_X global.ASPECT_X + #define ASPECT_Y global.ASPECT_Y + #define DO_DYNZOOM global.DO_DYNZOOM #define DYNZOOM_FACTOR global.DYNZOOM_FACTOR - #define DO_ALT_BLANK global.DO_ALT_BLANK #define ALT_BLANK_STRENGTH global.ALT_BLANK_STRENGTH #define ALT_BLANK_PERIOD global.ALT_BLANK_PERIOD @@ -224,3 +237,18 @@ #define GLOBAL_ZOOM global.GLOBAL_ZOOM #define GLOBAL_OFFX global.GLOBAL_OFFX #define GLOBAL_OFFY global.GLOBAL_OFFY + + +#define DO_GAME_GEOM_OVERRIDE global.DO_GAME_GEOM_OVERRIDE + #define GAME_GEOM_INT_SCALE global.GAME_GEOM_INT_SCALE + #define GAME_GEOM_INT_SCALE_MAX global.GAME_GEOM_INT_SCALE_MAX + #define GAME_GEOM_ASPECT global.GAME_GEOM_ASPECT + #define GAME_GEOM_VSHIFT global.GAME_GEOM_VSHIFT + #define GAME_GEOM_HSHIFT global.GAME_GEOM_HSHIFT + #define GAME_GEOM_ZOOM global.GAME_GEOM_ZOOM + + #define DO_TILT global.DO_TILT + #define TILT_X global.TILT_X + #define TILT_Y global.TILT_Y + #define TILT_FOV global.TILT_FOV + #define TILT_BEZEL_K global.TILT_BEZEL_K diff --git a/bezel/koko-aio/shaders/config.inc b/bezel/koko-aio/shaders/config.inc index 0fc61b9..b04f0bc 100644 --- a/bezel/koko-aio/shaders/config.inc +++ b/bezel/koko-aio/shaders/config.inc @@ -1,29 +1,60 @@ + +// BEZEL STATIC CONFIG ############################################################################################## + // Uncomment this to improve bezel downscaling. // If you are using standard bezel, leave commented to gain performance. //#define STATIC_BEZEL_USE_MIPMAP 1.0 - //Consider content interlaced if lines are more than this -#define MIN_LINES_INTERLACED 380 + //This is used to skip calculations in the reflection blur code. + //set it to minimum value that allows you to see reflection entirely +#define BEZEL_REFL_SKIP_SIZE 0.08 - //Sort of dithering/debanding used in vignette, spot, backlight leds -#define NOISEPOWER 1/192.0 -//((params.OutputSize.z)*3) + //This is the size (in 0..1 range) of the bezel texture that does + //not include the center tube, including reflection area, and the shadow. + //It is actually used to skip drawing game content under the bezel or + //over its shadow. + //Set it to the maximum size as long as you see the full game content + //in the bezel. +#define BEZEL_BORDER_SIZE vec2(0.07, 0.07) - //If you change the default bezel texture, you may have to edit this to - //align bezel reflections and game content. (it seems to depend on the curvature amount) -#define BEZEL_BORDER_SIZE 0.197 + //This is the blank area or shadow size (one side, in percent) at the sides of the bezel as defined by the bezel texture + //BEZEL_SHADOW_SIZE = max shadow or blank side size / bezel_texture_size. + //It is used to skip drawing bg/fg or ambient light over the tube, set it to a value that allow for them to be + //shown over the bezel blank/shadowed sides but not on the tube (ie: value too big) +#define BEZEL_SHADOW_SIZE 0.06 + + //to speedup things, bezel rende logic can be completely skipped in the inner tube, if we + //already know it is completely transparent. + //Set the following to the maximum value that allow you to see + //bezel borders and, if present in the source bezel texture, inner content/border shades +#define BEZEL_TUBE_BLANK_SIZE 0.88 + + //In the second reflection pass, the coordinates are zoomedout by the + //BEZEL_REFL_ZOOMOUT_ROOM so that the image is mirrored-repeated by retroarch. + //they are adjusted by an inverse amount in final pass to align them + //lowering this value makes more room for reflections, but this steals + //pixels for reflection resolution, so make it higher as possible as + //long as you can see the reflections on the reflective area without + //them blanking or repeating. + //Modifying it require you to tweak BEZEL_REFL_CORNER_BLANK_SIZE too. +#define BEZEL_REFL_ZOOMOUT_ROOM 0.8 - //The maximum radius of the reflection blur. //3.3..4.0 max -#define BEZEL_REFL_BLUR_MAX 4.0 // Define the size and the smoothness of the rectangle // in the bezel corners that will hide and blur the reflections -#define BEZEL_REFL_CORNER_BLANK_SIZE 0.0685 -#define BEZEL_REFL_CORNER_BLANK_SHADE 0.05 // keep it > 0.0 +#define BEZEL_REFL_CORNER_BLANK_SIZE 0.091 +#define BEZEL_REFL_CORNER_BLANK_SHADE 0.055 // keep it > 0.0 - //Bezel reflection warping (curvature) may need a correction factor. - //Modify this if bezel reflections does not follow the border -#define BEZEL_REFL_WARP_CORRECTION_FACTOR 1.9 + + //When colorizing the bezel via ambient light, it is possible to choose where + //the colorization ends. depending on the bezel texture/lut used, the following + //parameter wil allow to colorize top/bottom and left/right border with the + //same shade amount. +#define AMBI_OVER_BEZEL_AR_CORRECTION 0.98 + + + +// AMBIENT LIGHT STATIC CONFIG ########################################################################################## // 0.0-1.0: sensitivity to scene change (ambilike stuff), 0.0 changes more #define AMBI_SCENE_CHG_THRSHLD 0.07 @@ -39,6 +70,14 @@ //#define AMBI_FAST_STEP 0.125 #define AMBI_FAST_STEP 0.25 + + + + + + +// GLOW STATIC CONFIG ########################################################################################## + //Setting the glow/halo sharpness parameter to this //will skip the blurring phase and lowers the gpu use //Set this to the same value as used for the maximum @@ -48,8 +87,7 @@ //Minumum glow sharpness //I set this to allow negative values for glow sharpness //that will calc their values from light spread amount -#define MIN_IN_GLOW_SHARP 0.5 - +#define MIN_IN_GLOW_SHARP 0.40 //Setting glow to blur bias parameter to this //will skip the glow/blur mix codem and just return //the blurred image @@ -69,11 +107,36 @@ #define IN_GLOW_SHARPNESS_SPREAD_RATIO_H 2.0 - //Support for backdrops has to be enable by uncommenting: -//#define STATIC_SUPPORT_BACKDROP 1.0 -#define BACKDROP_OFFX 0.0 -#define BACKDROP_OFFY 0.0 -#define BACKDROP_ZOOM 1.0 + + + +// MISC STATIC CONFIG ########################################################################################## + //Consider content interlaced if lines are more than this +#define MIN_LINES_INTERLACED 380 + + //Static dithering applied over vignette and spot +#define NOISEPOWER 5/1000.0 + //Temporal noise strength applied over ambient lights +#define NOISEPOWER_AMBI_MUL 13/1000.0 + + + //Experimental alternating blanking feature has been disabled by default, you can enable it by + //uncommenting the following line: +//#define ALLOW_ALT_BLANK + + //Should texture wrapping be allowed as a shader parameter? + //since it causes branching, better set it as a static value. +//#define ALLOW_BG_IMAGE_TEXTURE_WRAP_IN_SHADER + + + //Gap size in pixel for 1X to 4X mask scaling: +#define GAP_SIZE_PER_SCALE vec4(1.0, 1.0, 2.0, 2.0) + + +// STATIC CONFIG ENDS HERE ########################################################################################## + + + @@ -126,6 +189,7 @@ layout(std140, set = 0, binding = 0) uniform UBO { float DO_SCANLINES; float DO_IN_GLOW; float DO_VMASK_AND_DARKLINES ; + float VMASK_USE_DUMB; float MASK_COMPENSATION ; float DO_HALO ; float DO_CCORRECTION; @@ -168,7 +232,7 @@ layout(std140, set = 0, binding = 0) uniform UBO { float SCANLINE_FLICKERING ; //2 float SCANLINE_FLICKERING_POWER; float SCANLINE_DISABLE_ON_INTERLACE; - float SCANLINE_COMPENSATION; + float SCANLINE_MINMAX_GAMMA; float SCANLINE_SM_STRENGTH; float SCANLINE_SM_TYPE; float SCANLINE_SM_VOFFSET; @@ -187,6 +251,7 @@ layout(std140, set = 0, binding = 0) uniform UBO { float GEOM_WARP_X; float GEOM_WARP_Y; + float GEOM_CUT_EARS; float GEOM_CORNER_SIZE; float GEOM_CORNER_SMOOTH; @@ -196,14 +261,16 @@ layout(std140, set = 0, binding = 0) uniform UBO { float BEZEL_B; float BEZEL_CON; float BEZEL_INNER_ZOOM; - float BEZEL_IMAGE_BORDER; float BEZEL_FRAME_ZOOM; float BEZEL_USE_STRAIGHT; float BEZEL_RFL_BLR_SHD; - float BEZEL_RFL_OFFSET; - float BEZEL_REFL_ZOOM; + float BEZEL_RFL_ZOOM; float BEZEL_REFL_STRENGTH; - + float BEZEL_DIFFUSION_STR; + float BEZEL_SPCL_STRENGTH; + float BEZEL_ROUGHNESS; + float BEZEL_CORNER_DARK; + float DO_SPOT; float S_POSITION; float S_SIZE; @@ -220,9 +287,13 @@ layout(std140, set = 0, binding = 0) uniform UBO { float AMBI_FALLOFF; float AMBI_POWER; float AMBI_OVER_BEZEL; + float AMBI_OVER_BEZEL_SIZE; + float AMBI_STEPS; + float AMBI_BG_IMAGE_BLEND_MODE; + float AMBI_BG_IMAGE_FORCE; + float ASPECT_X; float ASPECT_Y; - float AMBI_STEPS; float DO_BG_IMAGE; float BG_IMAGE_OVER; @@ -230,6 +301,7 @@ layout(std140, set = 0, binding = 0) uniform UBO { float BG_IMAGE_OFFX; float BG_IMAGE_ZOOM; float BG_IMAGE_ROTATION; + float BG_IMAGE_NIGHTIFY; float BG_IMAGE_WRAP_MODE; float DO_SHIFT_RGB; @@ -246,6 +318,25 @@ layout(std140, set = 0, binding = 0) uniform UBO { float DO_RF_NOISE; float RF_NOISE_STRENGTH; + float DO_GAME_GEOM_OVERRIDE; + float GAME_GEOM_INT_SCALE; + float GAME_GEOM_INT_SCALE_MAX; + float GAME_GEOM_ASPECT; + float GAME_GEOM_VSHIFT; + float GAME_GEOM_HSHIFT; + float GAME_GEOM_ZOOM; + + float DO_TILT; + float TILT_X; + float TILT_Y; + float TILT_BEZEL_K; + float TILT_FOV; + + float DO_BACKDROP; + float BACKDROP_OFFX; + float BACKDROP_OFFY; + float BACKDROP_ZOOM; + } global; // Color correction @@ -255,7 +346,7 @@ layout(std140, set = 0, binding = 0) uniform UBO { #pragma parameter CONTRAST " Contrast in (0.0=off)" 0.0 -1.0 1.0 0.01 #pragma parameter BRIGHTNESS " Brightness in (0.0=off)" 0.0 -1.0 1.0 0.01 #pragma parameter TEMPERATURE " Temperature in (6500=off)" 6500.0 3000 10000.0 50.0 -#pragma parameter GAMMA_OUT " Gamma out" 0.69 0.1 9.0 0.025 +#pragma parameter GAMMA_OUT " Gamma out" 0.69 0.1 4.0 0.01 #pragma parameter BLANK1 " " 0.0 0.0 1.0 1.0 @@ -297,7 +388,7 @@ layout(std140, set = 0, binding = 0) uniform UBO { //Offset RGB -#pragma parameter DO_SHIFT_RGB "★ RGB deconvergence enable? (bad with FXAA) ==>" 0.0 0.0 1.0 1.0 +#pragma parameter DO_SHIFT_RGB "★ Deconvergence enable? ==>" 0.0 0.0 1.0 1.0 #pragma parameter OFFSET_STRENGTH " Strength" 0.6 0.0 1.0 0.05 #pragma parameter SHIFT_R " Red offset" -40.0 -210.0 189.0 1 #pragma parameter SHIFT_G " Green offset" 2.0 -210.0 189.0 1 @@ -314,25 +405,26 @@ layout(std140, set = 0, binding = 0) uniform UBO { #pragma parameter IN_GLOW_W " Sharpness X (0 = controlled by glow spread)" 2.5 0.0 7.0 0.05 #pragma parameter IN_GLOW_H " Sharpness Y (0 = controlled by glow spread)" 2.5 0.0 7.0 0.05 #pragma parameter IN_GLOW_BIAS " Glow to blur bias" 1.0 0.0 1.0 0.05 -#pragma parameter IN_GLOW_NTSC_ARTF_MULT " Blur NTSC artifacts more" 0.0 0.0 8.0 0.1 -#pragma parameter IN_GLOW_NTSC_ARTF_TRSH " Blur less NTSC artifacts (min treshold)" 1.0 0.0 1.0 0.05 +#pragma parameter IN_GLOW_NTSC_ARTF_MULT " Blur NTSC artifacts more" 0.0 0.0 8.0 0.01 +#pragma parameter IN_GLOW_NTSC_ARTF_TRSH " Blur less NTSC artifacts (min treshold)" 1.0 0.0 1.0 0.01 #pragma parameter IN_GLOW_SHOW_ARTF_MASK " Show NTSC artifacts mask (debug)" 0.0 0.0 1.0 1.0 #pragma parameter BLANK7 " " 0.0 0.0 1.0 1.0 // Mask -#pragma parameter DO_VMASK_AND_DARKLINES "★ RGB Masks and/or Darklines enable? ==>" 0.0 0.0 1.0 1.0 +#pragma parameter DO_VMASK_AND_DARKLINES "★ Masks and/or Darklines enable? ==>" 0.0 0.0 1.0 1.0 #pragma parameter MASK_COMPENSATION " Compensate for brightness loss" 0.0 0.0 1.0 0.05 #pragma parameter VMASK_DARKLINE_SCALE " (HiDPI) Vmask and Darklines multiplier" 1.0 1.0 4.0 1.0 #pragma parameter RGB_MASK_STRENGTH " RGB Mask Strength (0.0 to disable)" 0.75 0.0 1.0 0.05 -#pragma parameter VMASK_USE_GM " . (LoDPI) Green,Magenta -> BGR" 0.0 0.0 1.0 1.0 -#pragma parameter VMASK_GAP " . Horizontal Gap between triads:" 0.0 0.0 1.0 1.0 +#pragma parameter VMASK_USE_GM " . Use LoDPI Green,Magenta -> RGB" 0.0 0.0 1.0 1.0 +#pragma parameter VMASK_GAP " . Horizontal Gap between triads" 0.0 0.0 1.0 1.0 +#pragma parameter VMASK_USE_DUMB " . Just draw gap" 0.0 0.0 1.0 1.0 #pragma parameter VMASK_OVERWHITE " . Affect bright colors" 1.0 0.0 1.0 0.05 #pragma parameter DARKLINES_STRENGTH " Darklines strength (0.0 to disable)" 0.65 0.0 1.0 0.05 #pragma parameter DARKLINES_VOFFSET " . Offset" 1.0 0.0 1.0 1.0 -#pragma parameter DARKLINES_PERIOD " . Height" 2.0 2.0 16.0 2.0 +#pragma parameter DARKLINES_PERIOD " . Height" 2.0 2.0 16.0 1.0 #pragma parameter DRKLN_OVERWHITE " . Affect bright colors" 1.0 0.0 1.0 0.05 #pragma parameter BLANK9 " " 0.0 0.0 1.0 1.0 @@ -351,22 +443,22 @@ layout(std140, set = 0, binding = 0) uniform UBO { // Scanlines #pragma parameter DO_SCANLINES "★ Scanlines enable? ==>" 0.0 0.0 1.0 1.0 -#pragma parameter SCANLINE_MIN " Minimum height" 1.0 0.05 1.0 0.05 -#pragma parameter SCANLINE_MAX " Maximum height" 1.0 0.05 25.0 0.1 +#pragma parameter SCANLINE_MIN " Minimum height" 1.0 0.01 1.0 0.01 +#pragma parameter SCANLINE_MAX " Maximum height" 0.5 0.05 1.0 0.01 +#pragma parameter SCANLINE_MINMAX_GAMMA " Min->Max inertia" 1.0 0.0 4.0 0.1 #pragma parameter SCANLINE_DARK " Gap brightness" 0.0 -0.5 1.0 0.05 -#pragma parameter SCANLINE_COMPENSATION " Compensate for brightness loss" 0.0 0.0 1.0 0.1 #pragma parameter SCANLINES_BLEEDING " Scanlines bleeding" 0.0 0.0 3.0 0.05 #pragma parameter SCANLINE_FLICKERING " Interlace Flicker (0=off,1=on,2=if interlaced)" 2.0 0.0 2.0 1.0 -#pragma parameter SCANLINE_FLICKERING_POWER " Interlace Flicker power" 0.75 0.0 4.0 0.1 +#pragma parameter SCANLINE_FLICKERING_POWER " Interlace Flicker power" 0.25 0.0 8.0 0.01 #pragma parameter SCANLINE_DISABLE_ON_INTERLACE " Disable on interlaced screen" 0.0 0.0 1.0 1.0 #pragma parameter BLANK11 " " 0.0 0.0 1.0 1.0 #pragma parameter SCANLINE_SM_TYPE " Slotmask type (disable (0) with darklines!)" 0.0 0.0 3.0 1.0 -#pragma parameter SCANLINE_SM_STRENGTH " . Slotmask strength (type 1 and 2 only)" 1.0 0.0 1.0 0.05 +#pragma parameter SCANLINE_SM_STRENGTH " . Slotmask strength" 1.0 0.0 1.0 0.05 #pragma parameter SCANLINE_SM_VOFFSET " . Offset (type 1 only)" 45.0 0.0 158.0 1.0 #pragma parameter BLANK12 " " 0.0 0.0 1.0 1.0 -//p1.20,r2.0 + // Bloom #pragma parameter DO_BLOOM "★ Bloom enable? ==>" 0.0 0.0 1.0 1.0 #pragma parameter BLOOM_MIX " Final mix, (0.0=off)" 0.45 0.0 1.0 0.01 @@ -384,9 +476,10 @@ layout(std140, set = 0, binding = 0) uniform UBO { //Curvature parameters: -#pragma parameter DO_CURVATURE "★ Curvature enable? ==>" 0.0 0.0 1.0 1.0 +#pragma parameter DO_CURVATURE "★ Curvature/Border enable? ==>" 0.0 0.0 1.0 1.0 #pragma parameter GEOM_WARP_X " Warp X" 0.3 0.0 6.0 0.025 #pragma parameter GEOM_WARP_Y " Warp Y" 0.0 0.0 6.0 0.025 +#pragma parameter GEOM_CUT_EARS " Cut curvature ears" 1.4 1.0 10.0 0.01 #pragma parameter GEOM_CORNER_SIZE " Corner radius" 0.005 0.005 0.1 0.001 #pragma parameter GEOM_CORNER_SMOOTH " Corner sharpness" 350.0 15.0 1000.0 1.0 #pragma parameter BLANK14 " " 0.0 0.0 1.0 1.0 @@ -394,19 +487,21 @@ layout(std140, set = 0, binding = 0) uniform UBO { //Bezel related -#pragma parameter DO_BEZEL "★ Bezel enable? ==>" 0.0 0.0 1.0 1.0 -#pragma parameter BEZEL_USE_STRAIGHT " Straight" 0.0 0.0 1.0 1.0 -#pragma parameter BEZEL_R " Color: Red" -0.3 -0.5 0.5 0.01 -#pragma parameter BEZEL_G " Color: Green" -0.3 -0.5 0.5 0.01 -#pragma parameter BEZEL_B " Color: Blue" -0.3 -0.5 0.5 0.01 -#pragma parameter BEZEL_CON " Contrast" 1.3 0.0 10.0 0.01 -#pragma parameter BEZEL_INNER_ZOOM " Image zoom" -0.18 -1.5 0.5 0.005 -#pragma parameter BEZEL_FRAME_ZOOM " Frame zoom" 0.0 -1.5 0.5 0.005 -#pragma parameter BEZEL_IMAGE_BORDER " Image border" 1.01 1.0 1.2 0.01 -#pragma parameter BEZEL_REFL_STRENGTH " Reflection strength" 0.5 0.0 1.0 0.01 -#pragma parameter BEZEL_RFL_BLR_SHD " Sharp reflections" 0.0 -1.0 1.0 0.1 -#pragma parameter BEZEL_RFL_OFFSET " Align reflections: offset" 0.003 -0.01 0.01 0.001 -#pragma parameter BEZEL_REFL_ZOOM " Align reflections: zoom" 0.98 0.8 1.2 0.001 +#pragma parameter DO_BEZEL "★ Bezel enable? ==>" 0.0 0.0 1.0 1.0 +#pragma parameter BEZEL_USE_STRAIGHT " Straight" 0.0 0.0 1.0 1.0 +#pragma parameter BEZEL_INNER_ZOOM " Inner zoom (ignored if integer scaled)" -0.18 -1.5 0.5 0.005 +#pragma parameter BEZEL_FRAME_ZOOM " Frame zoom" 0.0 -1.5 0.5 0.005 +#pragma parameter BEZEL_R " Color: Red" -0.3 -1.0 1.0 0.005 +#pragma parameter BEZEL_G " Color: Green" -0.3 -1.0 1.0 0.005 +#pragma parameter BEZEL_B " Color: Blue" -0.3 -1.0 1.0 0.005 +#pragma parameter BEZEL_CON " Contrast" 1.3 0.0 10.0 0.01 +#pragma parameter BEZEL_RFL_ZOOM " Reflections zoom" 0.0 -1.5 0.5 0.005 +#pragma parameter BEZEL_REFL_STRENGTH " Reflections strength" 0.5 0.0 1.0 0.01 +#pragma parameter BEZEL_RFL_BLR_SHD " Reflections sharpness" -0.0 -0.5 1.0 0.01 +#pragma parameter BEZEL_ROUGHNESS " Reflections roughness" 1.0 0.0 5.0 0.1 +#pragma parameter BEZEL_DIFFUSION_STR " Diffusion strength" 0.0 0.0 1.0 0.01 +#pragma parameter BEZEL_SPCL_STRENGTH " Specularity strength" 0.5 0.0 3.0 0.05 +#pragma parameter BEZEL_CORNER_DARK " Darken corners" 0.8 0.0 1.0 0.05 #pragma parameter BLANK15 " " 0.0 0.0 1.0 1.0 @@ -414,26 +509,37 @@ layout(std140, set = 0, binding = 0) uniform UBO { //Background Image -#pragma parameter DO_BG_IMAGE "★ Backgound image enable? ==>" 0.0 0.0 1.0 1.0 +#pragma parameter DO_BG_IMAGE "★ Back/Foreground image enable? ==>" 0.0 0.0 1.0 1.0 #pragma parameter LABEL_WARNING1 " ⚠ RetroArch aspect needs to be set to Full! ⚠" 1.0 1.0 1.0 1.0 #pragma parameter BG_IMAGE_OVER " Image over content (alpha channel driven)?" 0.0 0.0 1.0 1.0 #pragma parameter BG_IMAGE_OFFX " Shift Image over X axis" 0.0 -1.0 1.0 0.0005 #pragma parameter BG_IMAGE_OFFY " Shift Image over Y axis" 0.0 -1.0 1.0 0.0005 #pragma parameter BG_IMAGE_ZOOM " Zoom Image" 1.0 -1.0 3.0 0.0005 #pragma parameter BG_IMAGE_ROTATION " Rotate image mode (-1 for auto)" -1.0 -1.0 2.0 1.0 -#pragma parameter BG_IMAGE_WRAP_MODE " Wrap mode: default, clamp to border, edge, repeat" 0.0 0.0 3.0 1.0 +#pragma parameter BG_IMAGE_NIGHTIFY " Nightify image" 0.0 0.0 1.0 0.1 +#pragma parameter LABEL_0101 " !NEXT FEATURE IS STATIC, SEE docs.md TO ENABLE" 0.0 0.0 1.0 1.0 +#pragma parameter BG_IMAGE_WRAP_MODE " Wrap mode: default, clamp to border, edge, repeat" 0.0 0.0 3.0 1.0 #pragma parameter BLANK16 " " 0.0 0.0 1.0 1.0 +//Backdrop image +#pragma parameter DO_BACKDROP "★ Backdrop mirrored image enable? ==>" 0.0 0.0 1.0 1.0 +#pragma parameter BACKDROP_OFFX " Shift backdrop over X axis" 0.0 -1.0 1.0 0.0005 +#pragma parameter BACKDROP_OFFY " Shift backdrop over X axis" 0.0 -1.0 1.0 0.0005 +#pragma parameter BACKDROP_ZOOM " Zoom backdrop" 1.0 -1.0 3.0 0.0005 +#pragma parameter BLANK161 " " 0.0 0.0 1.0 1.0 //Back leds //Emulates leds under the monitor frame that slowly reacts to image contents -#pragma parameter DO_AMBILIGHT "★ Ambient light leds enable? ==> " 1.0 0.0 1.0 1.0 -#pragma parameter LABEL_WARNING3 " ⚠ RetroArch aspect needs to be set to Full! ⚠" 1.0 1.0 1.0 1.0 -#pragma parameter AMBI_STEPS " Slowness" 60.0 5.0 1000.0 5.0 -#pragma parameter AMBI_FALLOFF " Light Falloff" 0.7 0.1 3.0 0.01 -#pragma parameter AMBI_POWER " Led power" 1.5 1.0 7.0 0.05 -#pragma parameter AMBI_OVER_BEZEL " Colorize Bezel" 0.1 0.0 1.0 0.01 +#pragma parameter DO_AMBILIGHT "★ Ambient light leds enable? ==> " 1.0 0.0 1.0 1.0 +#pragma parameter LABEL_WARNING3 " ⚠ RetroArch aspect needs to be set to Full! ⚠" 1.0 1.0 1.0 1.0 +#pragma parameter AMBI_STEPS " Slowness" 60.0 5.0 1000.0 5.0 +#pragma parameter AMBI_FALLOFF " Light Falloff" 0.7 0.1 3.0 0.01 +#pragma parameter AMBI_POWER " Led power" 1.5 0.0 7.0 0.05 +#pragma parameter AMBI_OVER_BEZEL " Colorize Bezel" 0.5 0.0 5.0 0.05 +#pragma parameter AMBI_OVER_BEZEL_SIZE " Colorization size" 0.15 0.0 0.5 0.001 +#pragma parameter AMBI_BG_IMAGE_BLEND_MODE " Back/Foreground image alpha blend (0=mix, 1/check=add)" 0.0 0.0 1.0 1.0 +#pragma parameter AMBI_BG_IMAGE_FORCE " Always colorize Back/Foreground image (add mode only) " 0.0 0.0 1.0 0.1 #pragma parameter BLANK17 " " 0.0 0.0 1.0 1.0 @@ -442,6 +548,7 @@ layout(std140, set = 0, binding = 0) uniform UBO { //Modulate the image zooming depending on the image luminosity. //You can lower the effect power through the DYNZOOM_FACTOR parameter. #pragma parameter DO_DYNZOOM "★ Luminosity dependant zoom enable? ==>" 1.0 0.0 1.0 1.0 +#pragma parameter LABEL_WARNING6 "⚠ Enabling this feature overrides integer scale" 1.0 1.0 1.0 1.0 #pragma parameter DYNZOOM_FACTOR " Narrowness" 80.0 15.0 120.0 0.5 #pragma parameter BLANK18 " " 0.0 0.0 1.0 1.0 @@ -460,16 +567,8 @@ layout(std140, set = 0, binding = 0) uniform UBO { -// Alternative blanking -#pragma parameter DO_ALT_BLANK "★ Alternate line blanking enable? ==>" 0.0 0.0 1.0 1.0 -#pragma parameter ALT_BLANK_STRENGTH " Alternate black frame insertion strength" 0.5 0.0 1.0 0.1 -#pragma parameter ALT_BLANK_PERIOD " Blank lines period" 4.0 0.0 20.0 1.0 -#pragma parameter BLANK20 " " 0.0 0.0 1.0 1.0 - - - //Global Zoom/Offset -#pragma parameter DO_GLOBAL_SHZO "★ Global shift/zoom" 0.0 0.0 1.0 1.0 +#pragma parameter DO_GLOBAL_SHZO "★ Global shift/zoom enable? ==>" 0.0 0.0 1.0 1.0 #pragma parameter GLOBAL_OFFX " X axis shift " 0.0 -1.0 1.0 0.0005 #pragma parameter GLOBAL_OFFY " Y axis shift " 0.0 -1.0 1.0 0.0005 #pragma parameter GLOBAL_ZOOM " Zoom" 2.0 0.0 3.0 0.0005 @@ -490,6 +589,36 @@ layout(std140, set = 0, binding = 0) uniform UBO { #pragma parameter label_aspect_preset4 " (-4 = Megadrive 10/7)" 0.0 0.0 0.0 1.0 #pragma parameter label_aspect_preset5 " (-5 = Uncorrected)" 0.0 0.0 0.0 1.0 #pragma parameter label_aspect_preset6 " (-6 = MAME rotated/TATE 0.75)" 0.0 0.0 0.0 1.0 +#pragma parameter BLANK23 " " 0.0 0.0 1.0 1.0 + + + +//Content geomerty overrides +#pragma parameter DO_GAME_GEOM_OVERRIDE "★ Override content geometry enable? ==>" 0.0 0.0 1.0 1.0 +#pragma parameter GAME_GEOM_INT_SCALE " Integer scale (disables inner zoom)" 0.0 0.0 1.0 1.0 +#pragma parameter GAME_GEOM_INT_SCALE_MAX " Maximum integer scale" 10.0 1.0 100.0 1.0 +#pragma parameter LABEL_WARNING4 " ⚠ The following will override integer scale ⚠" 1.0 1.0 1.0 1.0 +#pragma parameter GAME_GEOM_ASPECT " Aspect (0 = unchanged)" 0.0 0.0 3.0 0.005 +#pragma parameter GAME_GEOM_VSHIFT " Vertical position" 0.0 -10.0 10.0 0.01 +#pragma parameter GAME_GEOM_HSHIFT " Horizontal position" 0.0 -10.0 10.0 0.01 +#pragma parameter GAME_GEOM_ZOOM " Zoom" 1.0 0.0 2.0 0.01 +#pragma parameter BLANK20 " " 0.0 0.0 1.0 1.0 + +//Tilt +#pragma parameter DO_TILT "★ Tilt enable? ==>" 0.0 0.0 1.0 1.0 +#pragma parameter TILT_X " Tilt along X axis" 0.0 -0.5 0.5 0.01 +#pragma parameter TILT_Y " Tilt along Y axis" 0.0 -0.5 0.5 0.01 +#pragma parameter TILT_FOV " Fov" 0.7 0.1 1.5 0.05 +#pragma parameter TILT_BEZEL_K " Bezel multiplier" 1.0 0.0 1.5 0.01 +#pragma parameter BLANK_01 " " 0.0 0.0 1.0 1.0 + + +// Alternative blanking, needs to be statically enabled, see docs.md. +#pragma parameter DO_ALT_BLANK "★ Alternate line blanking enable? ==>" 0.0 0.0 1.0 1.0 +#pragma parameter label_alt_blank " !THIS FEATURE IS STATIC, SEE docs.md TO ENABLE" 0.0 0.0 0.0 1.0 +#pragma parameter ALT_BLANK_STRENGTH " Alternate black frame insertion strength" 0.5 -1.0 1.0 0.1 +#pragma parameter ALT_BLANK_PERIOD " Blank lines period" 4.0 1.0 30.0 1.0 +#pragma parameter BLANK_02 " " 0.0 0.0 1.0 1.0 diff --git a/bezel/koko-aio/shaders/final_pass.slang b/bezel/koko-aio/shaders/final_pass.slang index da2329e..75b55ad 100644 --- a/bezel/koko-aio/shaders/final_pass.slang +++ b/bezel/koko-aio/shaders/final_pass.slang @@ -27,60 +27,86 @@ layout(location = 4) out float vIsRotated; layout(location = 7) out float vIsInterlaced; layout(location = 8) out float vFlickeringScanlines; layout(location = 9) out float vScanlinePeriod; - layout(location = 10) out float vScanlinesAlternate; - -//Vignette, spot: - layout(location = 11) out float vIn_aspect; - - + layout(location = 10) out float vScanlineAlternateOffset; + layout(location = 11) out float vMax_inLum; +//Vignette, spot: + layout(location = 12) out float vIn_aspect; + +layout(location = 13) out float vDynamicSeed; +layout(location = 14) out float vBEZEL_INNER_ZOOM_adapted; +layout(location = 15) out float vVmask_gap; + #include "includes/functions.include.slang" +#define PI_15 4.71238898038469 //pi*1.5 + void main() { gl_Position = global.MVP * Position; vIsRotated = float(is_rotated()); vIn_aspect = get_in_aspect(); - vTexCoord = get_scaled_coords_aspect(TexCoord,global.FinalViewportSize, vIn_aspect, bool(vIsRotated)) + vec2(0.00001); + + //Calculate vTexcoord as fractional or integer scaled? + if ( !do_integer_scale() ) + vTexCoord = get_scaled_coords_aspect(TexCoord,global.FinalViewportSize, vIn_aspect, bool(vIsRotated)) + vec2(0.0001); + else + vTexCoord = integer_scale(TexCoord, vIn_aspect, bool(vIsRotated)) + vec2(0.0001); //<- without the offset, SCANLINE_MIN doesn't work. + + //if (DO_GLOBAL_SHZO >0.5) + // vTexCoord = zoom(vTexCoord + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ); + //..unbranched previous + vTexCoord = (zoom(vTexCoord + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ) * DO_GLOBAL_SHZO) + + (vTexCoord * (1-DO_GLOBAL_SHZO) ); - if (DO_GLOBAL_SHZO >0.5) - vTexCoord = zoom(vTexCoord + vec2(-GLOBAL_OFFX, -GLOBAL_OFFY), GLOBAL_ZOOM ); - vOutputCoord = TexCoord; - + vFragCoord = vec2( floor(vOutputCoord.x * params.OutputSize.x), floor(vOutputCoord.y * params.OutputSize.y)); + + vBEZEL_INNER_ZOOM_adapted = get_BEZEL_INNER_ZOOM() * DO_BEZEL; + //Precalc some Curvature/Warp values: - vec2 geom_warp_adapted = vec2(GEOM_WARP_X, GEOM_WARP_Y); - - /* if (DO_BEZEL > 0.0) { - geom_warp_adapted *= (-BEZEL_INNER_ZOOM) + 1; - }*/ + float warp_adaption = 1 - vBEZEL_INNER_ZOOM_adapted * 4.0; + vec2 geom_warp_adapted = vec2(GEOM_WARP_X, GEOM_WARP_Y) * warp_adaption; + vWarp_vexp = 1.0/ (1 + (vec2(geom_warp_adapted.x, geom_warp_adapted.y) * 0.2)) ; - - vWarp_arg2 = 1.0 - pow(vec2(0.29289321881345247559915563789515), vWarp_vexp ); + + //SPOT + spot_offset = offsets_from_float(S_POSITION+420.0,40); + spot_offset = spot_offset / 10.0 + vec2(0.0,1.0); //Help scanline code too: if (DO_SCANLINES > 0.5) { bool bIs_Interlaced = is_interlaced(); vIsInterlaced = float(bIs_Interlaced); vFlickeringScanlines = float((DO_SCANLINES == 1.0) && scanline_have_to_flicker(bIs_Interlaced)) ; - + //Scanline period: vScanlinePeriod = 1.0; - vScanlinesAlternate = 0.0; + vScanlineAlternateOffset = 0.0; + if (bIs_Interlaced) { - if (params.FrameCount % 2 == 0.0) vScanlinesAlternate = 1.0; - if (params.OriginalSize.y > MIN_LINES_INTERLACED ) vScanlinePeriod = 0.5; + if (params.FrameCount % 2 == 0.0) vScanlineAlternateOffset = PI_15; + vScanlinePeriod = 0.5; } - //vScanlinePhase = 0.0; - //vScanlinePhase = vScanlinePeriod * pi - pi/4.0; //<-- needed to match scanlines done in first_pass. //FIXME check what happens for highter res. + + //Calculate the maximum possible brightness of the input color by taking glow, + //contrast and brightness into account. This is needed so that scanline generation + //can map the proper input range and strictly obey scanline thickness constraints. + vMax_inLum = max( 1.0, DO_CCORRECTION * apply_contrast_brightness(1.0, CONTRAST, BRIGHTNESS)) * + max( 1.0, DO_IN_GLOW * IN_GLOW_POWER); } - //SPOT - spot_offset = offsets_from_float(S_POSITION+420.0,40); - spot_offset = spot_offset / 10.0 + vec2(0.0,1.0); + //Generate a seed that changes over time for temporal random noise + vDynamicSeed = mod(params.FrameCount, 60.0001); + + //slotmask/vmask gap size: + //Gap size in pixel for 1X to 4X mask scaling: + // vec4 GAP_SIZE_PER_SCALE = vec4(1.0, 1.0, 2.0, 2.0); <--- moved in config.inc + vec4 vgap_size_per_scale = GAP_SIZE_PER_SCALE / VMASK_DARKLINE_SCALE; + vVmask_gap = vgap_size_per_scale[int(VMASK_DARKLINE_SCALE-1)]; } @@ -95,19 +121,21 @@ layout(location = 6) in vec2 vWarp_arg2; layout(location = 7) in float vIsInterlaced; layout(location = 8) in float vFlickeringScanlines; layout(location = 9) in float vScanlinePeriod; -layout(location = 10) in float vScanlinesAlternate; -layout(location = 11) in float vIn_aspect; +layout(location = 10) in float vScanlineAlternateOffset; +layout(location = 11) in float vMax_inLum; +layout(location = 12) in float vIn_aspect; +layout(location = 13) in float vDynamicSeed; +layout(location = 14) in float vBEZEL_INNER_ZOOM_adapted; +layout(location = 15) in float vVmask_gap; + layout(location = 0) out vec4 FragColor; -#ifdef STATIC_SUPPORT_BACKDROP - layout(set = 0, binding = 1) uniform sampler2D backdrop; - #else - layout(set = 0, binding = 1) uniform sampler2D first_pass; -#endif + +layout(set = 0, binding = 1) uniform sampler2D backdrop; layout(set = 0, binding = 2) uniform sampler2D bloom_pass_final; -layout(set = 0, binding = 3) uniform sampler2D reflected_blurred_pass2; +layout(set = 0, binding = 3) uniform sampler2D reflected_blurred_pass; layout(set = 0, binding = 4) uniform sampler2D ambi_temporal_pass; layout(set = 0, binding = 5) uniform sampler2D avglum_pass; layout(set = 0, binding = 6) uniform sampler2D monitor_body_straight; @@ -119,111 +147,123 @@ layout(set = 0, binding = 11) uniform sampler2D in_glow_pass; layout(set = 0, binding = 12) uniform sampler2D halo_pass; +layout(set = 0, binding = 15) uniform sampler2D first_pass; + + + +#define RECT01 vec4(0.0, 0.0, 1.0, 1.0) #define HALF_PI 1.5707963267949 #define QUARTER_PI 0.785398163397448 #include "includes/functions.include.slang" -vec3 pixel_vmask(vec3 source, float white_reference, float over_white) { -// Simple RGB mask emulation with or without horizontal gap - float ooo = 1.0 - RGB_MASK_STRENGTH; + +vec2 vOutputCoord_adapted; +vec2 get_vOutputCoord_adapted() { + return vOutputCoord_adapted; +} + + +vec3 fn_pixel_nightify(vec3 color_in, float strength) { + if (strength == 0.0) return color_in; + color_in = clamp(color_in, 0.0, 1.0); + + vec3 color_hsv_in = rgb2hsv(color_in); + strength = scale_to_range(strength, 0.0, 1.0); + + vec3 color_hsv_min = color_hsv_in; + color_hsv_min.yz = scale_to_range_vec2(color_hsv_min.yz, -0.1, 0.1); + + vec3 color_rgb_min = hsv2rgb(color_hsv_min); + return mix(color_in, color_rgb_min, strength); +} + +vec3 pixel_vmask(vec3 source, float white_reference, float over_white) { + // Simple RGB mask emulation with or without horizontal gap + float ggg = 1.0 - RGB_MASK_STRENGTH; + float ooo = max( VMASK_USE_DUMB + 1 - RGB_MASK_STRENGTH, 0.0); //<- make a dumb mask? + // RGB mask: R G B vec3 m1 = vec3( 1.0 , ooo , ooo ); //col 1 vec3 m2 = vec3( ooo , 1.0 , ooo ); //col 2 vec3 m3 = vec3( ooo , ooo , 1.0 ); //col 3 - vec3 gap = vec3( ooo ); - + vec3 gap = vec3( ggg ); + vec3 pixel_out; vec3 vmasked; - vec4 vec_mod=(vec4(3,1,2,3) + vec4(VMASK_GAP,0.0,0.0,0.0))* VMASK_DARKLINE_SCALE ; + + vec4 vec_mod=(vec4(3,1,2,3) + vec4(VMASK_GAP * vVmask_gap,0.0,0.0,0.0))* VMASK_DARKLINE_SCALE; + vec_mod = ceil(vec_mod); float fcol = vOutputCoord.x * params.OutputSize.x; - if (mod(fcol, vec_mod.x) < vec_mod.y) - vmasked = m1 * source; - else if (mod(fcol, vec_mod.x) < vec_mod.z) - vmasked = m2 * source; - else if (mod(fcol, vec_mod.x) < vec_mod.w) - vmasked = m3 * source; - else vmasked = gap * source; + float mod_compare = mod(fcol, vec_mod.x); + if (mod_compare < vec_mod.y) + vmasked = m1; + else if (mod_compare < vec_mod.z) + vmasked = m2; + else if (mod_compare < vec_mod.w) + vmasked = m3; + else vmasked = gap; + + vmasked *= source; + + //Unbranched previous, worse performance. + /* + bool bm1 = (mod_compare < vec_mod.y); + bool bm2 = (mod_compare < vec_mod.z) && !bm1; + bool bm3 = (mod_compare < vec_mod.w) && !bm1 && !bm2; + bool bgap = !bm3 && !bm2 && !bm1; + vmasked = m1*float(bm1) + m2*float(bm2) + m3*float(bm3) + gap*float(bgap); + vmasked = source * vmasked; + */ + if (over_white == 1.0) pixel_out = vmasked; else { white_reference-= over_white; white_reference= clamp(white_reference,0.0,1.0); pixel_out= mix(vmasked,source,white_reference); } - return pixel_out; - -} + return pixel_out; -vec3 pixel_vmask_and_gm(vec3 source, float white_reference, float over_white) { -// Simple RGB mask emulation with or without horizontal gap - float ooo = 1.0 - RGB_MASK_STRENGTH; - - // RGB mask: R G B - vec3 m1_rgb = vec3( 1.0 , ooo , ooo ); //col 1 - vec3 m2_rgb = vec3( ooo , 1.0 , ooo ); //col 2 - vec3 m3_rgb = vec3( ooo , ooo , 1.0 ); //col 3 - vec3 gap = vec3( ooo ); - - vec3 m1_gm = vec3( ooo , 1.0 , ooo ); //col 1 - vec3 m2_gm = vec3( 1.0 , ooo , 1.0 ); //col 2 - - - vec3 m1 = (m1_gm * VMASK_USE_GM) + (m1_rgb * (1-VMASK_USE_GM)); - vec3 m2 = (m2_gm * VMASK_USE_GM) + (m2_rgb * (1-VMASK_USE_GM)); - vec3 m3 = m3_rgb; - - - vec3 pixel_out; - vec3 vmasked; - vec4 vec_mod_rgb = vec4(3,1,2,3); - vec4 vec_mod_gm = vec4(2,1,2,0.0); - vec4 vec_mod = (vec_mod_gm * VMASK_USE_GM) + (vec_mod_rgb* (1-VMASK_USE_GM)); - vec_mod=(vec_mod + vec4(VMASK_GAP,0.0,0.0,0.0))* VMASK_DARKLINE_SCALE ; - - - float fcol = vOutputCoord.s * params.OutputSize.x; - if (mod(fcol, vec_mod.x) < vec_mod.y) - vmasked = m1 * source; - else if (mod(fcol, vec_mod.x) < vec_mod.z) - vmasked = m2 * source; - else if ( mod(fcol, vec_mod.x) < vec_mod.w && VMASK_USE_GM < 1.0 ) - vmasked = m3 * source; - else vmasked = gap * source; - - if (over_white == 1.0) pixel_out = vmasked; - else { - white_reference-= over_white; - white_reference= clamp(white_reference,0.0,1.0); - pixel_out= mix(vmasked,source,white_reference); - } - return pixel_out; - } vec3 pixel_vmask_gm(vec3 source, float white_reference, float over_white) { -// Simple RGB mask emulation with or without horizontal gap - float ooo = 1.0 - RGB_MASK_STRENGTH; + // Simple RGB mask emulation with or without horizontal gap + float ggg = 1.0 - RGB_MASK_STRENGTH; + float ooo = max( VMASK_USE_DUMB + 1 - RGB_MASK_STRENGTH, 0.0); //<- make a dumb mask? + // RGB mask: R G B vec3 m1 = vec3( ooo , 1.0 , ooo ); //col 1 vec3 m2 = vec3( 1.0 , ooo , 1.0 ); //col 2 - vec3 gap = vec3( ooo ); - + vec3 gap = vec3( ggg ); + float fcol = vOutputCoord.s * params.OutputSize.x; vec3 pixel_out; vec3 vmasked; - vec3 vec_mod=(vec3(2,1,2) + vec3(VMASK_GAP,0.0,0.0))* VMASK_DARKLINE_SCALE ; - - if (mod(fcol, vec_mod.x) < vec_mod.y) + vec3 vec_mod=(vec3(2,1,2) + vec3(VMASK_GAP * vVmask_gap,0.0,0.0))* VMASK_DARKLINE_SCALE ; + vec_mod = ceil(vec_mod); + + float mod_compare = mod(fcol, vec_mod.x); + + /* + if (mod_compare < vec_mod.y) vmasked = m1 * source; - else if (mod(fcol, vec_mod.x) < vec_mod.z) + else if (mod_compare < vec_mod.z) vmasked = m2 * source; - else + else vmasked = gap * source; - + */ + + //Unbranched previous, same performance. + bool bm1 = (mod_compare < vec_mod.y); + bool bm2 = (mod_compare < vec_mod.z) && !bm1; + bool bgap = !bm2 && !bm1; + vmasked = m1*float(bm1) + m2*float(bm2) + gap*float(bgap); + vmasked = source * vmasked; + if (over_white == 1.0) pixel_out = vmasked; else { white_reference-= over_white; @@ -234,207 +274,148 @@ vec3 pixel_vmask_gm(vec3 source, float white_reference, float over_white) { return pixel_out; } -/*vec3 pixel_darklines_old(vec3 source,float darkline_every, float darkline_trans, - float do_offset, float white_reference,float over_white, vec2 coords) { - // "darklines" are vertical gaps that can be used to emulate aperturegrille - // or slotmasks - // - - float Darkline_part_w = (3.0 - VMASK_USE_GM + VMASK_GAP) * VMASK_DARKLINE_SCALE; - float Darkline_part_w_x2 = Darkline_part_w*2; - - darkline_every *= VMASK_DARKLINE_SCALE; - - if (over_white != 1.0) { - //less effect on bright colors. - darkline_trans+=(white_reference-over_white); - darkline_trans=clamp(darkline_trans,0.0,1.0); - } - - //Slotmask (darklines are drawn with offset) - if (do_offset > 0.0) { - bool odd_line_meno_densa = mod(vFragCoord.y, darkline_every) > VMASK_DARKLINE_SCALE ; - bool odd_line_piu_densa = !(mod(vFragCoord.y, darkline_every/2) < VMASK_DARKLINE_SCALE && odd_line_meno_densa); - bool odd_column = mod(vFragCoord.x + Darkline_part_w , Darkline_part_w_x2) < Darkline_part_w; - bool draw_mask = odd_line_piu_densa && !odd_column || odd_column && odd_line_meno_densa; - - return source * clamp(float(draw_mask),darkline_trans,1.0); - } - - //Aperture grille (darklines are drawn straight) - bool draw_dark = mod(vFragCoord.y, darkline_every) < VMASK_DARKLINE_SCALE; - bool draw_color = !draw_dark; - return source * ( float(draw_color) + float(draw_dark) * darkline_trans ); -}*/ - vec3 pixel_darklines(vec3 source,float darkline_every, float darkline_trans, float do_offset, float white_reference,float over_white, vec2 coords) { - - - float period_x = (3.0 - VMASK_USE_GM + VMASK_GAP) * VMASK_DARKLINE_SCALE; + + float period_x = (3.0 - VMASK_USE_GM + VMASK_GAP * vVmask_gap) * VMASK_DARKLINE_SCALE; float period_y = darkline_every * VMASK_DARKLINE_SCALE; - + vec2 FragCoord = vFragCoord; - if (over_white != 1.0) { //less effect on bright colors. darkline_trans+=(white_reference-over_white); darkline_trans=clamp(darkline_trans,0.0,1.0); } - - + if (do_offset > 0.0) { float column = int(floor(mod(FragCoord.x, period_x*2.0))); if (column < period_x) FragCoord.y+=period_y/2.0; } - + float row = int(floor(mod(FragCoord.y, period_y))); - if (row < VMASK_DARKLINE_SCALE) + if (row < VMASK_DARKLINE_SCALE * vVmask_gap) return source * darkline_trans; else return source; - } - -float scanline_shape(vec2 coords, bool do_slotmask, float lum) { -/* Produces a B/W scanline shape to be multiplicated by the source - * pixel later on to emulate scanline effect. - * scanlines can be drawn on odd and even fields alternating on odd and - * even frames to emulate that aspect of interlacing. - */ +float fn_scanline_mask(vec2 coords, bool do_slotmask, float lum, float min_inLum, float max_inLum) { + /* Produces a B/W scanline shape to be multiplicated by the source + * pixel later on to emulate scanline effect. + * scanlines can be drawn on odd and even fields alternating on odd and + * even frames to emulate that aspect of interlacing. + */ float period = vScanlinePeriod; bool is_interlaced = bool(vIsInterlaced); - bool alternate = bool(vScanlinesAlternate); bool do_flicker = bool(vFlickeringScanlines); + + //since luminosity is used to modulate scanline thickness, we scale it here + //to keep tickness in user defined range: + float lum_scaled = map_range(lum, min_inLum, max_inLum, SCANLINE_MIN, SCANLINE_MAX); - //...to scale scanline tickness: - //float lum_scaled = scale_to_range(lum, SCANLINE_MIN, SCANLINE_MAX); - float lum_scaled = lum * SCANLINE_MAX; - lum_scaled = clamp( lum_scaled, SCANLINE_MIN, SCANLINE_MAX ); - - - - - float angle_base = coords.y * pi * params.OriginalSize.y * period;// + vScanlinePhase; + + float angle_base = coords.y * pi * params.OriginalSize.y * period; float lines = 1.0; + + //1 - Generate base scanline. + //2 - offset them on odd frames if needed (vScanlineAlternateOffset via vertex shader) + //3 - Dont do it when the screen is interlaced and we have to skip drawing scanlines on interlaced screens. + if (!( is_interlaced && SCANLINE_DISABLE_ON_INTERLACE == 1.0 )) { + lines = pow( sin(angle_base + vScanlineAlternateOffset), 2.0); + } + + //If we specified to draw slotmasks alongside the scanlines, but the screen + //is interlaced, fallback to old darklines code to avoid glitches/artifacts. + if ( do_slotmask && is_interlaced ) { + lines = lines * pixel_darklines(vec3(1.0),DARKLINES_PERIOD,1-SCANLINE_SM_STRENGTH, 1.0, 0.0 , 1.0, coords).r; + return lines; + } - if (!( is_interlaced && SCANLINE_DISABLE_ON_INTERLACE == 1.0 )) { - - /*if (alternate) - lines = -sin(angle_base + HALF_PI); - else - lines = sin(angle_base); - */ - //Unbranched the previous if/then/else: - lines = (2*vScanlinesAlternate -1) * sin(angle_base + (vScanlinesAlternate * HALF_PI)) ; - - lines = (lines*lines); - } - - - //Draw the slotmask right here if the height is the same as the scanline. + //Draw a sort of slotmask right here with the same height as the scanline. + //Mitigates moiree and visual artifacts comapred to dumb viewport slotmask. if (do_slotmask) { - if (do_flicker) { - //Fallback to old darklines code to avoid glitches/artifacts. - lines = lines * pixel_darklines(vec3(1.0),DARKLINES_PERIOD,1-SCANLINE_SM_STRENGTH,1.0, 0.0 ,1.0, coords).r; - - } else { - float Darkline_part_w = (3.0 - VMASK_USE_GM + VMASK_GAP) * VMASK_DARKLINE_SCALE; - float Darkline_part_w_x2 = Darkline_part_w*2; - bool odd_column = mod(vFragCoord.x + Darkline_part_w , Darkline_part_w_x2) < Darkline_part_w; - - - if (SCANLINE_SM_TYPE == 1.0) { - // Slotmask is out oh phase every "odd" triple and mixed with - // the straight scanline. - // slotmask strength and stagger are configurable. - // Acceptable values are with stagger around 79 (pi/4) - if (odd_column) { - float phase = pi + SCANLINE_SM_VOFFSET*0.01 * lum_scaled; - float angle_slotmask = angle_base + phase; - float slotmask = sin(angle_slotmask); - slotmask = (slotmask*slotmask); - lines = mix(lines, slotmask, SCANLINE_SM_STRENGTH); - } - } - - else if (SCANLINE_SM_TYPE == 2.0) { - float phase; - //Slotmask is always out of phase by QUARTER_PI - //Every "odd triple" column, it is also out of phase of HALF_PI - //Slotmask is multiplied by original scanline and thinner. - //Only strength parameter is taken into account. - if (odd_column) - phase = period * pi + QUARTER_PI * lum_scaled; - else - phase = period * HALF_PI + QUARTER_PI; + float Darkline_part_w = (3.0 - VMASK_USE_GM + VMASK_GAP) * VMASK_DARKLINE_SCALE; + float Darkline_part_w_x2 = Darkline_part_w*2; + bool odd_column = mod(vFragCoord.x + Darkline_part_w , Darkline_part_w_x2) < Darkline_part_w; + if (SCANLINE_SM_TYPE == 1.0) { + // Slotmask is out oh phase every "odd" triple and mixed with + // the straight scanline. + // slotmask strength and stagger are configurable. + // Acceptable values are with stagger around 79 (pi/4) + if (odd_column) { + float phase = pi + SCANLINE_SM_VOFFSET*0.022 * lum_scaled; float angle_slotmask = angle_base + phase; float slotmask = sin(angle_slotmask); - slotmask = slotmask*slotmask; slotmask = slotmask*slotmask; // eleva alla 4 per renderla sottile. valori maggiori producono moiree. - slotmask = mix(1.0, slotmask, SCANLINE_SM_STRENGTH); // riduci la forza della slotmask - lines = lines * slotmask; + slotmask = (slotmask*slotmask); + lines = mix(lines, slotmask, SCANLINE_SM_STRENGTH); } + } - else if (SCANLINE_SM_TYPE == 3.0) { - // Thinner slotmask screen, no scanlines. - // No parameter taken into account. - if (odd_column) { - float phase = pi + HALF_PI; - float angle_slotmask = angle_base + phase; - float slotmask = sin(angle_slotmask); - slotmask = (slotmask*slotmask); slotmask = (slotmask*slotmask); - lines = slotmask; - } + else if (SCANLINE_SM_TYPE == 2.0) { + float phase; + //Slotmask is always out of phase by QUARTER_PI + //Every "odd triple" column, it is also out of phase of HALF_PI + //Slotmask is multiplied by original scanline and thinner. + //Only strength parameter is taken into account. + if (odd_column) + phase = period * pi + QUARTER_PI * lum_scaled; + else + phase = period * HALF_PI + QUARTER_PI; + + float angle_slotmask = angle_base + phase; + float slotmask = sin(angle_slotmask); + slotmask = slotmask*slotmask; slotmask = slotmask*slotmask; // eleva alla 4 per renderla sottile. valori maggiori producono moiree. + slotmask = mix(1.0, slotmask, SCANLINE_SM_STRENGTH); // riduci la forza della slotmask + lines = lines * slotmask; + } + + else if (SCANLINE_SM_TYPE == 3.0) { + // Thinner slotmask screen, no scanlines. + // No parameter taken into account. + if (odd_column) { + float phase = pi + HALF_PI; + float angle_slotmask = angle_base + phase; + float slotmask = sin(angle_slotmask); + lines = slotmask*slotmask; } + return mix( 1.0, lines * (1-SCANLINE_DARK ) + SCANLINE_DARK, SCANLINE_SM_STRENGTH) ; } } - //Thickness (min): - //lines = pow(lines, 1/(lum_scaled+eps) ); - //lines = pow(lines, 1/(sqrt(lum_scaled) ) ); -//lines = pow(lines, 1/(lum_scaled*lum_scaled+eps) ); + //Morph scanline shape via input luminance + float l = lum_scaled; // (already clamped) + l = pow(l, SCANLINE_MINMAX_GAMMA); + if (lum_scaled <= 0.5) { + float l1 = pow(l, 4) * 15; + lines = pow(lines, 1/sqrt(l1)); + } else { + float l2 = (l-0.5)*2.0; + lines = lines * (1-l2) + l2; + } -//lines = pow( lines , 1/(lum_scaled ) ) ; - -//0.0125 is an anti-moiree measure. - -//lines = pow( max(lines, 0.05), 1/lum_scaled) ; - -//lines = pow(lines, 1/(sqrt(lum_scaled) ) ); - -//lines = pow(clamp(lines + 0.05, 0.0,1.0) , 1/sqrt(lum_scaled)); -//float extra_power_1 = 3.0; - -float extra_power_1 = max(SCANLINE_MAX/3.0, 1.0); -lines = pow(clamp(lines, SCANLINE_DARK * 2.0, 1.0) , 1/(sqrt(lum_scaled*lum_scaled*extra_power_1) ) ); - -//lines = pow(clamp(lines + 0.05, 0.0,1.0) , 1/(sqrt(lum_scaled*lum_scaled*extra_power_1) ) ) * extra_power_1/2.0; + //Above code, unbranched, check if it works. + /* lum_scaled = pow(lum_scaled, SCANLINE_MINMAX_GAMMA); + float l = lum_scaled; // (already clamped) + float l1 = pow(l, 4.0) * 15.0; + float l2 = (l - 0.5) * 2.0; + float under_05 = pow(lines, 1.0 / sqrt(l1)); + float over_05 = lines * (1.0 - l2) + l2; + float threshold_05 = step(0.5, l); + lines = mix(under_05, over_05, threshold_05); + */ - //lines = pow(clamp(lines + 0.05, 0.0,1.0) , 1/(lum_scaled*lum_scaled)); + //Apply min brightness + lines = lines * (1-SCANLINE_DARK ) + SCANLINE_DARK ; - //Thickness (max): - - /*lines = pow(abs(lines), 1/(10*lum_scaled*lum_scaled)); - float clamp_start=0.5; - if (lum_scaled>clamp_start) lines = clamp(lines,(lum_scaled-clamp_start)/(1-clamp_start) ,1.0); //FIXME use step?*/ - -//min-max, ma difficile da gestire con la slotmask. -// float extra_power = 2.0; -// float m = mod(angle_base + (vScanlinesAlternate * HALF_PI), pi); -// lines = exp( -pow((m-(HALF_PI)),2) / ( lum*extra_power ) ) * extra_power; - - - lines = lines * (1-SCANLINE_DARK ) + SCANLINE_DARK ; return lines; } @@ -444,236 +425,94 @@ float get_clamped_white_reference(vec3 pixel_in){ return white_reference; } -vec4 pixel_main_pass(vec2 coords, bool bBorder_needed) { - //Exit if we don't need a border (ambient light/background picture) - //And we are outside the the border (unsure if this double check is good for performance) //FIXME - if (bBorder_needed && - (vTexCoord.x < 0.0 || vTexCoord.x > 1.0 || vTexCoord.y < 0.0 || vTexCoord.y > 1.0)) - return vec4(0.0); - vec3 pixel_in; - vec3 pixel_glowed; - - //Get the first available pixel_in: - //vec2 off=vec2(0.0,+ global.first_passSize.w*0.5); needed - //To be added to the following coords and to halo coords (FIXME: WHY?) - //if drawing scanlines on first pass too) - if (DO_IN_GLOW == 1.0) { - pixel_glowed = texture(in_glow_pass,coords).rgb; - pixel_in = pixel_glowed; - } else { - pixel_in = texture(shift_and_bleed_pass,coords).rgb ; - } +float global_noise_static = 0.0; +float global_noise_ambi = 0.0; - vec3 pixel_out = pixel_in; - float white_reference; - if (VMASK_OVERWHITE+DRKLN_OVERWHITE < 2.0 ) { - white_reference = get_clamped_white_reference(pixel_in); - } - - //Mask and darklines: - if (DO_VMASK_AND_DARKLINES == 1.0 ) { - vec3 pixel_in_compensated = pixel_in; - - pixel_in_compensated = pixel_push_luminance(pixel_in, RGB_MASK_STRENGTH * MASK_COMPENSATION); - - if (RGB_MASK_STRENGTH > 0.0) { - //Use RGB pattern or exploit RGB layout with green and magenta? - if (VMASK_USE_GM < 1.0) - pixel_out = pixel_vmask(pixel_in_compensated, white_reference, VMASK_OVERWHITE); - else - pixel_out = pixel_vmask_gm(pixel_in_compensated, white_reference, VMASK_OVERWHITE); - //Tried to unbranch to no avail (worse performances) - //pixel_out = pixel_vmask_and_gm(pixel_in_compensated, white_reference, VMASK_OVERWHITE); - } +vec3 pixel_backdrop_image() { + vec2 backdrop_offset=vec2(BACKDROP_OFFX,BACKDROP_OFFY); - pixel_out = pixel_push_luminance(pixel_out, DARKLINES_STRENGTH * (1.0/DARKLINES_PERIOD) * MASK_COMPENSATION); - - //Screen lines (slotmask aperture grille) - if ( DARKLINES_STRENGTH > 0.0 ) { - float MYDARKLINES_TRANSPARENCY = 1.0 - DARKLINES_STRENGTH; - pixel_out = pixel_darklines(pixel_out, DARKLINES_PERIOD, MYDARKLINES_TRANSPARENCY, DARKLINES_VOFFSET, white_reference, DRKLN_OVERWHITE, coords); - } + vec2 backdrop_tex_size = textureSize(backdrop, 0); + float backdrop_lod = log2(backdrop_tex_size.y / global.FinalViewportSize.y); - } + vec2 backdrop_coords = get_scaled_coords_aspect( + vOutputCoord+backdrop_offset, + global.FinalViewportSize, + backdrop_tex_size.x/backdrop_tex_size.y, + bool(vIsRotated)); - float lum = clamp(max(max(pixel_out.r,pixel_out.g),pixel_out.b), 0.0,1.0); - - //Halo - vec3 pixel_haloed; - if (DO_HALO == 1.0 ) { - pixel_haloed = texture(halo_pass,coords).rgb; - pixel_out += pixel_haloed * (1 - HALO_VS_SCAN); - } - - /* Non flickering scanlines, Don't do them if - * - User doesn't want scanlines - * - The screen is interlaced and the user doesn't want scanlines on it. - */ - if ( DO_SCANLINES == 1.0 ) { - /* pixel_bleed is the color that will bleed over scanline gap. - * It is selected by the first available one depending on the shader - * features enabled by the user */ - vec3 pixel_bleed; - /*if (DO_HALO == 1.0) - pixel_bleed = pixel_haloed; - else */if (DO_IN_GLOW == 1.0) - pixel_bleed = pixel_glowed; - else - pixel_bleed = pixel_in; - - // Optionally apply a gamma correction to the scanline shape. - if (SCANLINE_COMPENSATION > 0.0) { - float mypow = mix(1.0, (0.33 * SCANLINE_DARK + 0.67), SCANLINE_COMPENSATION); - pixel_out = pow(pixel_out,vec3(mypow)); - } - - //Obtain the scanlines screen by multiplying the scanline shape by the pixel color. - //and emulate the bleeding of the color over the dark part of the scanlined screen. - //float scanline_shape = scanline_shape(coords, SCANLINE_SM_TYPE > 0.0 ); - float lum = max(max(pixel_out.r, pixel_out.g), pixel_out.b); - float scanline_shape = scanline_shape(coords, SCANLINE_SM_TYPE > 0.0, lum ); - - pixel_out = pixel_out * ( scanline_shape + ( pixel_bleed * SCANLINES_BLEEDING * ( 1 - scanline_shape ) )); - - //pixel_out *= scanline_shape; - - } - - - if (DO_HALO == 1.0 ) { - pixel_out += pixel_haloed * HALO_VS_SCAN; - //pixel_out = pixel_out + (pixel_haloed * (1-lum)); - } - - // Apply color correction (in this pass it is just the final output gamma) - if (DO_CCORRECTION == 1.0) pixel_out = pow(max(pixel_out, vec3(0.0)),vec3(GAMMA_OUT)); - - //Out - return vec4(pixel_out,1.0) ; //* border(border_coords); + backdrop_coords=zoom(backdrop_coords, BACKDROP_ZOOM); + return textureLod(backdrop, backdrop_coords, backdrop_lod).rgb; } -float global_noise; - -#ifdef STATIC_SUPPORT_BACKDROP - vec3 pixel_backdrop_image() { - vec2 backdrop_offset=vec2(BACKDROP_OFFX,BACKDROP_OFFY); - - vec2 backdrop_tex_size = textureSize(backdrop, 0); - float backdrop_lod = log2(backdrop_tex_size.y / global.FinalViewportSize.y); - - vec2 backdrop_coords = get_scaled_coords_aspect( - vOutputCoord+backdrop_offset, - global.FinalViewportSize, - backdrop_tex_size.x/backdrop_tex_size.y, - bool(vIsRotated)); - - backdrop_coords=zoom(backdrop_coords, BACKDROP_ZOOM); - return textureLod(backdrop, backdrop_coords, backdrop_lod).rgb; - } -#endif vec4 textureLod_wrap(sampler2D tex, vec2 co, float lod, float wrap_mode) { - /* - // Mirrored repeat, once, useless since is done by default - if (co.x > 1.0 || co.x < 0.0) - co.x = 1- mod(co.x, 1.0); - if (co.y > 1.0 || co.y < 0.0) - co.y = 1- mod(co.y, 1.0); - */ - - if (wrap_mode == 1.0) { - //Clamp to border, black. - bool bOutside = (co.x < 0.0 || co.x > 1.0 || co.y < 0.0 || co.y > 1.0 ) ; - if (bOutside) return vec4(0.0,0.0,0.0,1.0); - } else if (wrap_mode == 2.0) { - //Clamp to edge: - co = clamp(co, 0.00, 1.0); - } else if (wrap_mode == 3.0) { - //Repeat no mirror: - co = mod(co, 1.0); - } - + #ifdef ALLOW_BG_IMAGE_TEXTURE_WRAP_IN_SHADER + /* + // Mirrored repeat, once, useless since is done by default + if (co.x > 1.0 || co.x < 0.0) + co.x = 1- mod(co.x, 1.0); + if (co.y > 1.0 || co.y < 0.0) + co.y = 1- mod(co.y, 1.0); + */ + + if (wrap_mode == 1.0) { + //Clamp to border, black. + bool bOutside = (co.x < 0.0 || co.x > 1.0 || co.y < 0.0 || co.y > 1.0 ) ; + if (bOutside) return vec4(0.0,0.0,0.0,1.0); + } else if (wrap_mode == 2.0) { + //Clamp to edge: + co = clamp(co, 0.00, 1.0); + } else if (wrap_mode == 3.0) { + //Repeat no mirror: + co = mod(co, 1.0); + } + #endif return textureLod(tex, co, lod); } -vec4 pixel_background_image(bool over){ - //return the aspect corrected background image: - vec2 bg_image_offset=vec2(BG_IMAGE_OFFX,BG_IMAGE_OFFY); - if (over) { - vec2 tex_size = textureSize(bg_over, 0); // * BG_ZOOM; - float bg_over_lod = log2(tex_size.y / global.FinalViewportSize.y); - - if (BG_IMAGE_ROTATION > 0.0 || ( BG_IMAGE_ROTATION < 0.0 && bool(vIsRotated) ) ) tex_size.xy = tex_size.yx; - - vec2 back_coords = get_scaled_coords_aspect(vOutputCoord + bg_image_offset, global.FinalViewportSize, tex_size.x/tex_size.y, bool(vIsRotated)); - - if (BG_IMAGE_ROTATION < 0.0 && bool(vIsRotated) ) { - //handle automatic rotation of bg image for rotated games - back_coords.xy = back_coords.yx; - back_coords.y = 1 - back_coords.y; - } else if (BG_IMAGE_ROTATION > 0.0) { - //rotate as user prefs - back_coords.xy = back_coords.yx; - if (BG_IMAGE_ROTATION == 1.0) back_coords.y = 1 - back_coords.y; - if (BG_IMAGE_ROTATION == 2.0) back_coords.x = 1 - back_coords.x; - } - back_coords=zoom(back_coords, BG_IMAGE_ZOOM); - return textureLod_wrap(bg_over, back_coords, bg_over_lod, BG_IMAGE_WRAP_MODE); - } - //under - vec2 tex_size = textureSize(bg_under, 0); // * BG_ZOOM; - if (BG_IMAGE_ROTATION > 0.0) tex_size.xy = tex_size.yx; - float bg_under_lod = log2(tex_size.y / global.FinalViewportSize.y); - vec2 back_coords = get_scaled_coords_aspect(vOutputCoord + bg_image_offset,global.FinalViewportSize, tex_size.x/tex_size.y, bool(vIsRotated)); - if (BG_IMAGE_ROTATION > 0.0) { - back_coords.xy = vec2(back_coords.y, back_coords.x); - if (BG_IMAGE_ROTATION == 1.0) back_coords.y = 1 - back_coords.y; - if (BG_IMAGE_ROTATION == 2.0) back_coords.x = 1 - back_coords.x; - } - back_coords=zoom(back_coords, BG_IMAGE_ZOOM); - return textureLod_wrap(bg_under,back_coords,bg_under_lod, BG_IMAGE_WRAP_MODE); - //return textureLod(bg_under,back_coords,bg_under_lod); -} - -vec3 pixel_border(bool image_over) { - /* Returns the surrounding of the tube/bezel: - * The led lights alone - * the led light "under" a background image (alpha driven) - * black if we need to overlay a game backdrop - */ - #ifdef STATIC_SUPPORT_BACKDROP - return vec3(0.0); - #endif - vec3 pixel_out = vec3(1.0); - if (DO_AMBILIGHT == 1.0) - pixel_out = texture(ambi_temporal_pass, vOutputCoord).rgb + vec3(global_noise); - if (DO_BG_IMAGE == 1.0 && !image_over) { - vec4 bg_image = pixel_background_image(false); - pixel_out = mix(pixel_out,bg_image.rgb,bg_image.a); - } - return pixel_out; -} - - -vec3 pixel_alternate(vec3 source, float whiteness) { +vec3 pixel_alternate(vec3 source, float strength) { + /* + vec3 pixel_strobe = pixel_out.rgb * mod(params.FrameCount, 2); + float max_c = max(pixel_out.r, max(pixel_out.g, pixel_out.b)); + float max_c_adpt = 1 - (max_c * 0.5); + pixel_out.rgb = mix (pixel_out.rgb, pixel_strobe, ALT_BLANK_STRENGTH * max_c_adpt ) ; + */ + // Emulate the low crt persistance by only drawing odd/even lines // on odd/even frames + + + float line = vTexCoord.y * params.OutputSize.y; - vec3 pixel_out = source; + vec3 pixel_out = clamp(source, 0.0, 1.0); float l_period_half = ALT_BLANK_PERIOD / 2; + + + //Use another alg that affects less dark colors for negative strength values. + if (strength < 0.0) { + strength *= -1; + float max_c = max(pixel_out.r, max(pixel_out.g, pixel_out.b)); + float max_c_adpt = 1 - (max_c * 0.5); + strength *= max_c_adpt; + } + + + + + + if (mod(float(params.FrameCount),2.0 ) == 1) { - if (mod(line,ALT_BLANK_PERIOD) > l_period_half) pixel_out=mix(source,vec3(0), whiteness) ; + if (mod(line,ALT_BLANK_PERIOD) > l_period_half) pixel_out=mix(source,vec3(0), strength) ; } else { - if (mod(line,ALT_BLANK_PERIOD) <= l_period_half) pixel_out=mix(source,vec3(0), whiteness) ; + if (mod(line,ALT_BLANK_PERIOD) <= l_period_half) pixel_out=mix(source,vec3(0), strength) ; } return pixel_out; } -#define bezel_luminance bezel.r vec3 bezel_color(float lum) { //Colorize bezel frame vec3 col = vec3(BEZEL_R,BEZEL_G,BEZEL_B) + lum; @@ -683,262 +522,418 @@ vec3 bezel_color(float lum) { } -#define STATIC_BEZEL_USE_MIPMAP 1.0 - -vec3 compose_bezel_over(vec3 full_viewport) { - vec2 coords_for_bezel = vTexCoord; - - if (BEZEL_FRAME_ZOOM != 0.0) - coords_for_bezel = zoomout_coords(coords_for_bezel,-BEZEL_FRAME_ZOOM,1.0); - - /* Bezel image is a fixed png file, and is curved. - * To have a straight bezel, we can "unwarp" it and then curve it again - * Too lame? - float BEZEL_IMG_BORDER_START_X = 120.0/2923.0; //= 0.03; 120 - float BEZEL_IMG_BORDER_END_X = 220.0/2923.0 ;//= 0.2; 220 - - float BEZEL_IMG_BORDER_START_Y = 75.0/2178.0; //= 0.01; 75 - float BEZEL_IMG_BORDER_END_Y = 160.0/2178.0;//= 0.4; 160 - - float BEZEL_IMG_CURVATURE_X = 0.6; - float BEZEL_IMG_CURVATURE_Y = 0.6; - - float min_x = min(coords_for_bezel.x, 1-coords_for_bezel.x); - float min_y = min(coords_for_bezel.y, 1-coords_for_bezel.y); - - - - float kx = smoothstep(BEZEL_IMG_BORDER_START_X, BEZEL_IMG_BORDER_END_X, min(coords_for_bezel.x, 1-coords_for_bezel.x)); - float ky = smoothstep(BEZEL_IMG_BORDER_START_Y, BEZEL_IMG_BORDER_END_Y, min(coords_for_bezel.y, 1-coords_for_bezel.y)); - coords_for_bezel = Warp(coords_for_bezel,-BEZEL_IMG_CURVATURE_X * kx , -BEZEL_IMG_CURVATURE_Y * ky ); - coords_for_bezel = Warp(coords_for_bezel,GEOM_WARP_X * kx , GEOM_WARP_Y * ky ); - */ - - - - - - //No need to draw anything outside this: - if (coords_for_bezel.x < 0 || coords_for_bezel.y < 0 || coords_for_bezel.x > 1.0 || coords_for_bezel.y > 1.0) return full_viewport; - - vec2 coords_for_mirror = coords_for_bezel; - - //Main lut: - vec4 bezel; - #ifdef STATIC_BEZEL_USE_MIPMAP - vec2 bezel_lut_size = textureSize(monitor_body_curved,0); //no need to branch here if we assume straight and curved textures are the same size. //FIXME? - float bezel_frame_lod = log2(bezel_lut_size.y * (BEZEL_FRAME_ZOOM+1.0) /global.FinalViewportSize.y); - if (BEZEL_USE_STRAIGHT < 0.5) - bezel = textureLod(monitor_body_curved,coords_for_bezel,bezel_frame_lod); - else - bezel = textureLod(monitor_body_straight,coords_for_bezel,bezel_frame_lod); - #else - if (BEZEL_USE_STRAIGHT < 0.5) - bezel = texture(monitor_body_curved,coords_for_bezel); - else - bezel = texture(monitor_body_straight,coords_for_bezel); - #endif - -//return mix(bezel.rgb, vec3(kx), 0.5); - //No need to draw anything on full alpha: - if (bezel.a == 0.0) return full_viewport; - - //We use the red component of the bezel to express its luminance (define bezel_luminance bezel.r) - vec3 bezel_colored = bezel_color(bezel_luminance); - - //This is the reflection to be composed over the bezel); - vec3 pixel_mirrored = texture(reflected_blurred_pass2, - coords_for_mirror + random( min(global.FinalViewportSize.z,global.FinalViewportSize.w)*1.5, vTexCoord ) ).rgb; -//return pixel_mirrored; - //Take the reflection modifier from the texture blue component into account; it is/may be used to lower the reflection in the corners. - //float reflection = (reflection_shade * 1.4 - 0.4) * bezel.b ; - //reflection = clamp (reflection, 0.0, 1.0); - float reflection = bezel.b; - //return vec3(reflection); - pixel_mirrored = pixel_mirrored * reflection * BEZEL_REFL_STRENGTH; - //return pixel_mirrored; - vec3 bezel_out = bezel_colored + pixel_mirrored; - - //Mix ambient light over bezel? (branching this is worse) - vec3 ambitemporalpass = texture(ambi_temporal_pass, vOutputCoord).rgb; - ambitemporalpass = max(ambitemporalpass, 0.0); //<-- this to avoid undefined results - vec3 pixel_ambilight = DO_AMBILIGHT * (ambitemporalpass + global_noise); - - - float opacita = bezel.a; - bezel_out = bezel_out + pixel_ambilight * AMBI_OVER_BEZEL * (1 -reflection) * bezel.a; - - //bezel_out = vec3(bezel.a); - - //(1- (max(reflection, lut_hardness), bezel.a)) ; - //We use the green component to express Hardness/Specularity; there the reflection will be completely diffused. - //For the task, we use a mipmap whit adeguate precision. - float lut_hardness = bezel.g; - if (lut_hardness > 0.0) { - vec4 pixel_avglum = texture(avglum_pass,vOutputCoord); - bezel_out = bezel_out + ( ( pixel_avglum.rgb + pixel_avglum.a*0.5) * lut_hardness * 0.57 * BEZEL_REFL_STRENGTH ); - } - - return mix(full_viewport, bezel_out, bezel.a); +float fuzzyrect(vec2 uv, vec2 size, float radius, float blur) { + vec2 hSize = size / 2.0 - radius; + float d = length(max(abs(uv - vec2(0.5)),hSize)-hSize); + return smoothstep(-radius-blur, -radius+blur, -d); } -vec4 pixel_inner_frame(vec2 coords, bool bBorder_needed) { -//This takes care of drawing the main content. - - vec4 pixel_in = pixel_main_pass(coords, bBorder_needed); - vec3 pixel_out = pixel_in.rgb; - vec3 bloomed; +float create_ambi_colorize_shade(vec2 co) { + float blur = AMBI_OVER_BEZEL_SIZE; + vec2 size = vec2(1.0, 2 - AMBI_OVER_BEZEL_AR_CORRECTION)-blur; + float radius = 0.0; - //Mix bloom texture - if (DO_BLOOM == 1.0 ) { - bloomed=texture(bloom_pass_final, coords).rgb ; - - if (BLOOM_BYPASS > 0.5) - pixel_out = bloomed; - else - pixel_out += bloomed; + return 1 - min ( fuzzyrect(co, size, radius, blur) * 2, 1.0); +} + + + +vec2 get_scaled_coords_for_bezel() { + //This function is here because compiler gets mad if i calc coords_for_bezel + //outside the main branch "if DO_BEZEL then compose_bezel_over" + //performances falls down for no apparent reason. + //But still, i need to access it twice in the code. + //So this is a function that ensures me that i always calc it the same way. + + vec2 co = zoomout_coords(vTexCoord,-BEZEL_FRAME_ZOOM,1.0); + + if (DO_TILT == 1.0) + return tilt(co, vIsRotated, vec2(TILT_X, TILT_Y) * TILT_BEZEL_K); + else + return co; +} + + +////////////////////////////////////////////////////////////////////////////////////////////////////// + + +vec4 fn_pixel_fgbg_image(sampler2D smp) { + vec2 fg_image_offset=vec2(BG_IMAGE_OFFX,BG_IMAGE_OFFY); + vec2 tex_size = textureSize(smp, 0); // * BG_ZOOM; + float bg_over_lod = log2(tex_size.y / global.FinalViewportSize.y); + + if (BG_IMAGE_ROTATION > 0.0 || ( BG_IMAGE_ROTATION < 0.0 && bool(vIsRotated) ) ) tex_size.xy = tex_size.yx; + + vec2 back_coords = get_scaled_coords_aspect(vOutputCoord + fg_image_offset, global.FinalViewportSize, tex_size.x/tex_size.y, bool(vIsRotated)); + + if (BG_IMAGE_ROTATION < 0.0 && bool(vIsRotated) ) { + //handle automatic rotation of bg image for rotated games + back_coords.xy = back_coords.yx; + back_coords.y = 1 - back_coords.y; + } else if (BG_IMAGE_ROTATION > 0.0) { + //rotate as user prefs + back_coords.xy = back_coords.yx; + if (BG_IMAGE_ROTATION == 1.0) back_coords.y = 1 - back_coords.y; + if (BG_IMAGE_ROTATION == 2.0) back_coords.x = 1 - back_coords.x; + } + back_coords=zoom(back_coords, BG_IMAGE_ZOOM); + vec4 pixel_bgover = textureLod_wrap(smp, back_coords, bg_over_lod, BG_IMAGE_WRAP_MODE); + return pixel_bgover; +} + + + +vec3 ambi_blend_image(vec4 image, vec3 ambi) { + //mix or add ambient light with image, also allow force colorization in add mode. + if (DO_AMBILIGHT == 0.0) return image.rgb; + + // Fake a transparent image when force colorization is requested + // So that we can use the same code used for alpha blend. + // Also multiply AMBI_BG_IMAGE_FORCE * AMBI_BG_IMAGE_BLEND_MODE to skip + // force colorization when mode blend mode is not "ADD". + float image_alpha_adapted = image.a - (AMBI_BG_IMAGE_FORCE * AMBI_BG_IMAGE_BLEND_MODE); + + image.rgb = (AMBI_BG_IMAGE_BLEND_MODE == 0.0) ? + mix(ambi.rgb, image.rgb, image_alpha_adapted) + : + image.rgb + (ambi.rgb * (1 - image_alpha_adapted)); + + return image.rgb; +} + + +vec3 fn_pixel_content(vec2 coords) { + vec3 pixel_in; + vec3 pixel_glowed; + vec3 pixel_bleed; //pixel_bleed is the color that will bleed over scanline gap. + //Used for SCANLINES_BLEEDING parameter only + + if (DO_IN_GLOW == 1.0) { + pixel_glowed = texture(in_glow_pass,coords).rgb; + pixel_in = pixel_glowed; + } else { + pixel_in = texture(shift_and_bleed_pass,coords).rgb ; + } + pixel_bleed = pixel_in; + + vec3 pixel_out = pixel_in; + float white_reference; + + if (VMASK_OVERWHITE+DRKLN_OVERWHITE < 2.0 ) { + white_reference = get_clamped_white_reference(pixel_in); } - //Black frame insertion - if (DO_ALT_BLANK == 1.0 ) { - pixel_out = pixel_alternate(pixel_out.rgb, ALT_BLANK_STRENGTH ); - } + //Mask and darklines: + if (DO_VMASK_AND_DARKLINES == 1.0 ) { + vec3 pixel_in_compensated = pixel_in; - //vignette and spot - if (DO_VIGNETTE + DO_SPOT >0.0) { - //float in_aspect = get_in_aspect(); + pixel_in_compensated = pixel_push_luminance(pixel_in, RGB_MASK_STRENGTH * MASK_COMPENSATION); - if (DO_VIGNETTE == 1.0) { - float dist = length(vec2((coords.x-0.5)*vIn_aspect,coords.y-0.5)); - float vignette = smoothstep(V_SIZE,0.0,dist)*V_POWER; - //float vignette = vV_POWER * (vV_SIZE + 16.0* coords.x*coords.y*(1.0-coords.x)*(1.0-coords.y)); - //vignette = min(vignette,99999.0); //<--- big wtf here, why is this needed? - ////...see: https://github.com/kokoko3k/koko-aio-slang/issues/3 - pixel_out = pixel_out * vignette; + if (RGB_MASK_STRENGTH > 0.0) { + //Use RGB pattern or exploit RGB layout with green and magenta? + if (VMASK_USE_GM < 1.0) + pixel_out = pixel_vmask(pixel_in_compensated, white_reference, VMASK_OVERWHITE); + else + pixel_out = pixel_vmask_gm(pixel_in_compensated, white_reference, VMASK_OVERWHITE); + //Tried to unbranch to no avail (worse performances) + //pixel_out = pixel_vmask_and_gm(pixel_in_compensated, white_reference, VMASK_OVERWHITE); } - if (DO_SPOT == 1.0) { - float dist = length(vec2((coords.x-0.5)*vIn_aspect,coords.y-0.5)+spot_offset); + pixel_out = pixel_push_luminance(pixel_out, DARKLINES_STRENGTH * (1.0/DARKLINES_PERIOD) * MASK_COMPENSATION); + + //Screen lines (slotmask aperture grille) + if ( DARKLINES_STRENGTH > 0.0 ) { + float MYDARKLINES_TRANSPARENCY = 1.0 - DARKLINES_STRENGTH; + pixel_out = pixel_darklines(pixel_out, DARKLINES_PERIOD, MYDARKLINES_TRANSPARENCY, DARKLINES_VOFFSET, white_reference, DRKLN_OVERWHITE, coords); + } + + } + + + //Scanlines (non-flickering) + float scanline_mask = 1.0; + if ( DO_SCANLINES == 1.0 ) { + //Obtain a scanlined screen by multiplying the scanline mask and the pixel color. + + float lum = max(max(pixel_out.r, pixel_out.g), pixel_out.b); + + //The maximum possible brightness of the input color modified by glow,contrast and brightness. + float max_inLum = vMax_inLum; + float min_inLum = 0.0; + scanline_mask = fn_scanline_mask(coords, SCANLINE_SM_TYPE > 0.0, lum, min_inLum, max_inLum ); + pixel_out = min(pixel_out, 1.0) * ( scanline_mask + ( pixel_bleed * SCANLINES_BLEEDING * ( 1 - scanline_mask ) )); + } + + + //Halo + vec3 pixel_haloed = vec3(0.0);; + + if (DO_HALO == 1.0 ) { + pixel_haloed = texture(halo_pass,coords).rgb; + //Halo only on scanlines: + pixel_out += pixel_haloed * scanline_mask ; + //Halo over scanlines gap too: + pixel_out += pixel_haloed * (HALO_VS_SCAN) * (1 - scanline_mask) ; + + } + + // Apply gamma out: + if (DO_CCORRECTION == 1.0) + pixel_out = pow(max(pixel_out, vec3(0.0)),vec3(GAMMA_OUT)); + + //Bloom + if (DO_BLOOM == 1.0 ) { + vec3 bloomed=texture(bloom_pass_final, coords).rgb ; + pixel_out = bloomed + float(BLOOM_BYPASS < 0.5) * pixel_out; + } + + //Vignette + if (DO_VIGNETTE == 1.0) { + float dist = length(vec2((coords.x-0.5)*vIn_aspect, coords.y-0.5)); + float vignette = smoothstep(V_SIZE,0.0,dist)*V_POWER; + pixel_out = pixel_out * vignette + global_noise_static; + } + + //Spot + if (DO_SPOT == 1.0) { + float dist = length(vec2((coords.x-0.5)*vIn_aspect, coords.y-0.5)+spot_offset); float spot = smoothstep(S_SIZE,0.0,dist)*S_POWER; - //vec2 scoords = clamp(coords + spot_offset, 0.0,1.0); - //float spot = vS_POWER * (vS_SIZE + 16.0*scoords.x*scoords.y*(1.0-scoords.x)*(1.0-scoords.y)); - pixel_out = pixel_out + spot; - } - //pixel_out += global_noise; + pixel_out = pixel_out + spot + (global_noise_static * (1 - DO_VIGNETTE)); } - - //smooth border (edge) - float border_inner_frame = 1.0; - if (DO_BEZEL==1.0 || DO_CURVATURE == 1.0) - border_inner_frame = border(coords); - - float pixel_out_alpha = pixel_in.a * border_inner_frame; - - //Out - return vec4(pixel_out,pixel_out_alpha) * border_inner_frame; + + //Black frame insertion, made static, enable it in config.inc. + #ifdef ALLOW_ALT_BLANK + if (DO_ALT_BLANK == 1.0 ) { + pixel_out.rgb = pixel_alternate(pixel_out.rgb, ALT_BLANK_STRENGTH ); + //pixel_out.rgb += vec3(random_fast(ALT_BLANK_STRENGTH, vTexCoord * mod(params.FrameCount, 2) )); + } + #endif + + return pixel_out; } -vec4 main_wrap(vec2 coords){ - /* Handle inner border and outer border, not bezel */ - if (DO_VIGNETTE + DO_SPOT + DO_AMBILIGHT >0.0) global_noise = random(NOISEPOWER, vTexCoord * params.FrameCount); +vec4 fn_pixel_bezel(vec2 coords_for_bezel, vec2 coords_for_mirror, float nightify_str) { - //Just do pixel_inner_frame() and exit when there is no need to paint border. - if (!border_needed()) return pixel_inner_frame(coords, false); + //Can we skip Blank outside border and inner blank tube? + vec4 inner_blank_rect = vec4(1-BEZEL_TUBE_BLANK_SIZE, 1-BEZEL_TUBE_BLANK_SIZE, BEZEL_TUBE_BLANK_SIZE, BEZEL_TUBE_BLANK_SIZE); + if (is_first_outside_rect(coords_for_bezel, RECT01) || + is_first_inside_rect(coords_for_bezel, inner_blank_rect) + ) return vec4(0.0); - //From now on, we need a border. - bool bIs_outer_frame = ((vTexCoord.x < 0.0) || (vTexCoord.x > 1.0)); + vec4 bezel_in; + //Sample main bezel texture, Do we want mipmaps? + #ifdef STATIC_BEZEL_USE_MIPMAP + vec2 bezel_lut_size = textureSize(monitor_body_curved,0); //no need to branch here if we assume straight and curved textures are the same size. //FIXME? + float bezel_frame_lod = log2(bezel_lut_size.y * (BEZEL_FRAME_ZOOM+1.0) /global.FinalViewportSize.y); + if (BEZEL_USE_STRAIGHT < 0.5) + bezel_in = textureLod(monitor_body_curved,coords_for_bezel,bezel_frame_lod); + else + bezel_in = textureLod(monitor_body_straight,coords_for_bezel,bezel_frame_lod); + #else + if (BEZEL_USE_STRAIGHT < 0.5) + bezel_in = texture(monitor_body_curved,coords_for_bezel); + else + bezel_in = texture(monitor_body_straight,coords_for_bezel); + #endif + - //Handle outer frame cases - //if we want ambilights in the outer frame, draw it and return - if (bIs_outer_frame) - return vec4(pixel_border(BG_IMAGE_OVER == 1.0),1.0); + //Exit if the bezel is completely transparent (the tube) + if (bezel_in.a == 0.0) return vec4(0.0); + + //Colorize the bezel (bezel.r expresses the luminance) + vec3 bezel_out = bezel_color(bezel_in.r); + bezel_out.rgb = fn_pixel_nightify(bezel_out.rgb, nightify_str ); + + float lut_specular = bezel_in.g * BEZEL_SPCL_STRENGTH; + float reflection_modifier = 0.0; - //But if it is just outer frame, just make it black. - if (bIs_outer_frame) return vec4(0.0); + //Reflections, can be skipped if blue channel is 0: + if (bezel_in.b > 0.0) { + //Reflections: Calculate the bezel roughness to apply to the reflecting area. (bezel_in.g expresses the specularity) + float roughness = random_fast( 1/1080.0 * BEZEL_ROUGHNESS, vTexCoord ); + roughness *= (1 - min(lut_specular * 10, 1.0)); // <-roughness over specular area looks bad. + + //Reflections: + reflection_modifier = bezel_in.b; //bezel_in.b expresses how much the area is reflective + + //Sample the reflection pass with small offset to simulate the roughness + vec4 pixel_mirrored = texture(reflected_blurred_pass, coords_for_mirror + roughness); + float fcorners_shade = 1 - corners_shade(coords_for_bezel, 1.0) * BEZEL_CORNER_DARK; + + //Show less reflections in the corners + pixel_mirrored.rgb *= fcorners_shade; + //Push it over the specular areas and apply the reflection modifier + pixel_mirrored.rgb = pixel_mirrored.rgb * (1 + lut_specular); - //Handle inner frame cases - vec4 vPixel_inner_frame = pixel_inner_frame(coords, true); - //mix ambilight in the inner frame too, as curvature could shrink into the inner frame. - bool draw_border = true; - //Not painting ambilights here is the best way to cheaply draw a border around the frame - if (DO_BEZEL == 1.0) { - vec2 vTexCoord_zoomout = zoomout_coords(vTexCoord, -BEZEL_INNER_ZOOM , 1.0); - float border_start = 1-BEZEL_IMAGE_BORDER; - //Not using curved coords here because crazy things would happen with vertical games - draw_border = vTexCoord_zoomout.x < border_start || vTexCoord_zoomout.x > BEZEL_IMAGE_BORDER || - vTexCoord_zoomout.y < border_start || vTexCoord_zoomout.y > BEZEL_IMAGE_BORDER ; - } - if (draw_border) - return vec4(mix(pixel_border(BG_IMAGE_OVER == 1.0).rgb,vPixel_inner_frame.rgb,min(vPixel_inner_frame.a*1.5,1.0)),vPixel_inner_frame.a); - //return vec4(1.0,0.0,0.0,1.0); + //Apply reflections + bezel_out += (pixel_mirrored.rgb * reflection_modifier); + } - //Last case, inner border without ambilight: - return vPixel_inner_frame; + //Mix ambient light over bezel? (branching this is worse) + vec3 ambitemporalpass = texture(ambi_temporal_pass, vOutputCoord ).rgb; + ambitemporalpass = max(ambitemporalpass, 0.0); //<-- antiglitch. Needed to avoid undefined variable on vulkan. + vec3 pixel_ambilight = DO_AMBILIGHT * ( ambitemporalpass + global_noise_ambi); + + //Create a shaded box to apply ambilight on external borders only + float ambi_colorize_shade = create_ambi_colorize_shade(coords_for_bezel); + bezel_out = bezel_out + (AMBI_OVER_BEZEL * pixel_ambilight * bezel_in.a * ambi_colorize_shade * (1-reflection_modifier)); + + //Diffuse the light over specular areas, we use a mipmap with low precision. + if (lut_specular > 0.0) { + vec4 pixel_avglum = texture(avglum_pass, coords_for_mirror); + bezel_out = bezel_out + (pixel_avglum.rgb * lut_specular) ; + } + + return vec4(bezel_out, bezel_in.a); } void main() { + vec3 pixel_out = vec3(0.0); - vec2 coords = vTexCoord; + float canvas_busy = 0.0; //<-- this allow for paint over not painted areas (spares gpu cycles) - //Luminosity dependant zoom - if (DO_DYNZOOM == 1.0) { - //float zoomin = 1.0 + (texture(bloom_pass_final, coords ).a/ DYNZOOM_FACTOR * 80.0); <<-- funny. - //float dynzoom = 1.0 + (texture(avglum_pass, vec2(0.75,0.75) ).a/ DYNZOOM_FACTOR); - float dynzoom = get_dyn_zoom(avglum_pass); - coords = zoom(coords, dynzoom); - } - - //Scale coords according to bezel settings? - if (DO_BEZEL == 1.0) { - coords = zoomout_coords(coords, -BEZEL_INNER_ZOOM , 1.0); - coords = clamp(coords, 0.0,1.0); - } - - //Curvature - if (DO_CURVATURE == 1.0) { - if ((GEOM_WARP_X > 0.0) || (GEOM_WARP_Y > 0.0)) - coords = Warp_fast(coords, vWarp_vexp, vWarp_arg2); + //Calc a random noise if we need debanding + if (DO_VIGNETTE + DO_SPOT + DO_AMBILIGHT >0.0) { + //Generate random noise. + //global_noise = random(NOISEPOWER, vTexCoord * vDynamicSeed); + //global_noise_ambi = global_noise * NOISEPOWER_AMBI_MUL; - } - - //"Just" handle inner and outer frame here: - vec4 pixel_out = main_wrap(coords); + //The following are faster versions, the dynamic one needs a seed that changes over time + //Calculated in Vertex shader for speed. + global_noise_ambi = random_fast(NOISEPOWER * NOISEPOWER_AMBI_MUL, vTexCoord * vDynamicSeed ); + global_noise_static = random_fast(NOISEPOWER, vTexCoord); + } + + + //Calc initial content coords + vec2 co_content = vTexCoord; + if (DO_CURVATURE == 1.0 && ((GEOM_WARP_X != 0.0) || (GEOM_WARP_Y != 0.0))) { + co_content = Warp_fast(co_content, vWarp_vexp, vWarp_arg2, GEOM_CUT_EARS); + //co_content = Warp(co_content, GEOM_WARP_X, GEOM_WARP_Y); + } + + + //Tilt? + if (DO_TILT == 1.0) + co_content = tilt(co_content, vIsRotated, vec2(TILT_X, TILT_Y)); -#ifdef STATIC_SUPPORT_BACKDROP - pixel_out += vec4(pixel_backdrop_image(), 1.0); -#endif + //Precalc Bezel coords, since it modifies content coords. + vec2 co_bezel = vec2(0.0); + vec2 co_mirror; + if (DO_BEZEL == 1.0) { + co_content = zoomout_coords(co_content, -vBEZEL_INNER_ZOOM_adapted , 1.0); + co_mirror = zoom(co_content, 1/BEZEL_REFL_ZOOMOUT_ROOM); + co_bezel = get_scaled_coords_for_bezel(); + } + + //Apply other content coords modifiers + if (DO_GAME_GEOM_OVERRIDE == 1.0) + co_content = content_geom_override(co_content, GAME_GEOM_ASPECT, vIn_aspect, GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM); + + if (DO_DYNZOOM == 1.0) + co_content = zoom(co_content, get_dyn_zoom(avglum_pass) ); - //Draw bezel - if (DO_BEZEL == 1.0) { - pixel_out = vec4(compose_bezel_over(pixel_out.rgb),1.0); - } + //Create an alpha mask to write content into, it holds opacity info that will be used to compose.: + if (DO_CURVATURE == 1.0) { + canvas_busy = fn_border(co_content); + } else { + canvas_busy = float(is_first_inside_rect(co_content, RECT01)); //FIXME: is step() faster? + } - //Draw an image "Over" the bezel with an hole inside by the alpha channel - if (DO_BG_IMAGE == 1.0 && BG_IMAGE_OVER==1.0) { - vec4 bg_image = pixel_background_image(true); - pixel_out = mix(pixel_out,bg_image,bg_image.a); - } + + //Draw content only over the alpha mask, spare gpu cycles. + if (canvas_busy > 0.0) + pixel_out = fn_pixel_content(co_content) * canvas_busy; + + + //Draw Bezel + vec4 pixel_bezel; + //SKIP LOGIC is inside fn_pixel_bezel + if (DO_BEZEL == 1.0) { + pixel_bezel = fn_pixel_bezel(co_bezel, co_mirror, BG_IMAGE_NIGHTIFY); + //If we used a smooth_border, canvas_busy is it, but since the content is in the bezel, + //we can safely use it to smooth/darken the game border + pixel_out *= canvas_busy; + pixel_out = mix(pixel_out, pixel_bezel.rgb, pixel_bezel.a); + + //Update alpha mask. + //We can't use the bezel alpha channel to update the alpha mask since it is transparent ù + //on the tube and we don't want to paint anything there, so use a dumb rect and add it to canvas_busy: + float rect_bezel = float(is_first_inside_rect(co_bezel, vec4(BEZEL_SHADOW_SIZE, BEZEL_SHADOW_SIZE, 1.0 - BEZEL_SHADOW_SIZE, 1.0 - BEZEL_SHADOW_SIZE))); + canvas_busy = max(pixel_bezel.a, rect_bezel); + //FragColor = vec4(canvas_busy); return; // <- uncomment to debug BEZEL_SHADOW_SIZE + } + + + //The following funcs have to paint in the outer border + vec3 pixel_ambi = vec3(0.0); + vec3 pixel_under_content = vec3(0.0); + if ( canvas_busy < 1.0) { + + //Ambient light + if (DO_AMBILIGHT == 1.0) { + vec2 co_ambi = vOutputCoord; + pixel_ambi = texture(ambi_temporal_pass, co_ambi).rgb; + pixel_ambi += global_noise_ambi * (20 * (3.0-(pixel_ambi.r+pixel_ambi.g+pixel_ambi.b))) ; + pixel_under_content = pixel_ambi; + } + + //Background image: + if (DO_BG_IMAGE == 1.0 && BG_IMAGE_OVER == 0.0) { + vec4 pixel_bg_image = fn_pixel_fgbg_image(bg_under); + pixel_bg_image.rgb = fn_pixel_nightify(pixel_bg_image.rgb, BG_IMAGE_NIGHTIFY ); + pixel_bg_image.rgb = ambi_blend_image(pixel_bg_image, pixel_ambi); + pixel_under_content = pixel_bg_image.rgb; + } + + } + + + //Smooth the image corners: canvas_busy (the alpha mask) is a white rect with shaded borders. + pixel_out = mix (pixel_under_content, pixel_out, canvas_busy); + + + //Backdrop + if (DO_BACKDROP == 1.0) + pixel_out += pixel_backdrop_image(); + + + //Foreground image + if (DO_BG_IMAGE + BG_IMAGE_OVER == 2.0) { + vec4 pixel_fg_image = fn_pixel_fgbg_image(bg_over); + pixel_fg_image.rgb = fn_pixel_nightify(pixel_fg_image.rgb, BG_IMAGE_NIGHTIFY ); + + pixel_out = mix(pixel_out, pixel_fg_image.rgb, pixel_fg_image.a); + + if (DO_AMBILIGHT + AMBI_BG_IMAGE_BLEND_MODE == 2.0) { + vec3 pixel_ambi_local = texture(ambi_temporal_pass, vOutputCoord ).rgb; + pixel_ambi_local = DO_AMBILIGHT * (pixel_ambi_local + global_noise_ambi); + pixel_ambi_local = max(pixel_ambi_local, 0.0); //<-- antiglitch. Needed to avoid undefined variable on vulkan. + float ambi_mask = create_ambi_colorize_shade(co_bezel); + float fg_image_alpha_adapted = max(pixel_fg_image.a - AMBI_BG_IMAGE_FORCE, 0.0); + pixel_out = pixel_out + (pixel_ambi_local.rgb * (ambi_mask) * (1- fg_image_alpha_adapted)); + } + } + + //For debug purposes: //quad split screen - //if ( (vOutputCoord.x < 0.5 && vOutputCoord.y > 0.5) || (vOutputCoord.x > 0.5 && vOutputCoord.y < 0.5) ) pixel_out = texture(first_pass,vOutputCoord); + //if ( (vOutputCoord.x < 0.5 && vOutputCoord.y > 0.5) || (vOutputCoord.x > 0.5 && vOutputCoord.y < 0.5) ) pixel_out = texture(first_pass,vOutputCoord).rgb; //split screen - //if (vTexCoord.y < 0.5) pixel_out = texture(first_pass,vTexCoord); - //pixel_out = texture(avglum_pass,vTexCoord); - - //vec4 pixel_mirrored = texture(reflected_blurred_pass2,vTexCoord); - //pixel_out = pixel_mirrored; + //if (vTexCoord.y < 0.5) pixel_out = texture(first_pass,vTexCoord).rgb; + //pixel_out = texture(reflected_blurred_pass, vTexCoord).rgb; + + + FragColor = vec4(pixel_out, 1.0); + + //FragColor = vec4(texture( reflected_blurred_pass, co_mirror).a); - - FragColor = pixel_out; - - //FragColor = vec4(blur_shade(vTexCoord) ); - - //FragColor = vec4(random(1.0, vTexCoord * params.FrameCount)); } + diff --git a/bezel/koko-aio/shaders/first_pass.slang b/bezel/koko-aio/shaders/first_pass.slang index 3ea31d0..7584095 100644 --- a/bezel/koko-aio/shaders/first_pass.slang +++ b/bezel/koko-aio/shaders/first_pass.slang @@ -4,7 +4,9 @@ #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 vDynamicSeed; #include "includes/functions.include.slang" @@ -12,12 +14,17 @@ layout(location = 0) out vec2 vTexCoord; void main() { gl_Position = global.MVP * Position; vTexCoord = TexCoord; + + //Generate a seed that changes over time for temporal random noise + vDynamicSeed = mod(params.FrameCount, 120.0001); } #pragma stage fragment layout(location = 0) in vec2 vTexCoord; -layout(location = 0) out vec4 FragColor; +layout(location = 1) in float vDynamicSeed; + +layout(location = 0) out vec4 FragColor; layout(set = 0, binding = 2) uniform sampler2D Source; @@ -45,71 +52,80 @@ vec3 pixel_flickering() { * to see the effect (the lcd panel would just mix the pixels by itself (meh). */ + vec3 pixel_cur = texture(Source,vTexCoord).rgb; float mymod = params.FrameCount % 3; if (mymod == 0.0) return pixel_cur; float line_tick = (params.OriginalSize.y > MIN_LINES_INTERLACED ) ? 1 : 2 ; - vec3 flickline; if (mymod == 1.0 ) flickline = texture(Source, vTexCoord + vec2(0.0,params.OriginalSize.w/line_tick)).rgb; else if (mymod == 2.0) flickline = texture(Source, vTexCoord - vec2(0.0,params.OriginalSize.w/line_tick)).rgb; - float lumdiff = (flickline.r+flickline.g+flickline.b)/3.0 - - (pixel_cur.r+pixel_cur.g+pixel_cur.b)/3.0; + float lumdiff = abs(flickline.r + flickline.g + flickline.b - pixel_cur.r - pixel_cur.g - pixel_cur.b); + + lumdiff = min(lumdiff * SCANLINE_FLICKERING_POWER, 1.0); + return mix(pixel_cur,flickline,lumdiff); + - if (lumdiff > 0.0) { - lumdiff = scale_to_range(lumdiff,0.0,SCANLINE_FLICKERING_POWER); - return mix(pixel_cur,flickline,lumdiff); - } else { - return pixel_cur; - } } +vec3 colorwheel(vec2 uv){ + float timeoffset = params.FrameCount / 120.0; + vec2 uvc = -1.0 * ((2.0 * uv) - 1.0); + float dist = length(uvc); + float ang = (atan(uvc.y, uvc.x) + pi) / (2.0 * pi) - timeoffset; + ang = mod(ang, 1.0); + vec3 colHSV = vec3(ang, 1.0, dist); + return hsv2rgb(colHSV); +} + void debug() { //Just test patterns here vec3 pixel_debug; - //Use one of the following to debug: - //pixel_debug=vec3(abs(sin(params.FrameCount/3.14/5.0))); //white fade - //pixel_debug=vec3(abs(sin(params.FrameCount/3.14/20)),0.0,0.0); //red fade - //pixel_debug=vec3(0.9); - //pixel_debug=vec3(0.0,1.0,0.0); - //pixel_debug=vec3(0.38,0.0,1.0)*vTexCoord.x; - //pixel_debug=vec3(vTexCoord.x); //H bw gradient - pixel_debug=vec3(floor(vTexCoord.x*16)/16); //H bw gradient 16gray - //pixel_debug=vec3(floor(vTexCoord.x*64)/64); //H bw gradient 64gray - //pixel_debug=vec3(floor(vTexCoord.x*128)/128); //H bw gradient 128gray - //pixel_debug=vec3(floor(vTexCoord.x*256)/256); //H bw gradient 256gray - //pixel_debug=vec3(1,0,0,0)*floor(vTexCoord.x*64)/64; //H red gradient 64 - // float blink_time = 20; - // if (mod(params.FrameCount,blink_time*2) < blink_time) pixel_debug=vec3(0.2) ; else pixel_debug=vec3(1.0); - //FragColor = vec4(color_tools(pixel_debug).rgb,1.0); - //White circle, blinking - /* float blink_time = 20; - vec2 center = vTexCoord - vec2(0.5,0.5); - float radius = 0.1; - pixel_debug = vec3(1 - step(radius, length(center))); - pixel_debug *= float((mod(params.FrameCount,blink_time*2) < blink_time)); - */ - - - FragColor = vec4(pixel_debug,1.0); + //pixel_debug=vec3(abs(sin(params.FrameCount/3.14/5.0))); //white fade + + //pixel_debug=vec3(abs(sin(params.FrameCount/3.14/20)),0.0,0.0); //red fade + + pixel_debug=vec3(1.0); + + //pixel_debug=vec3(0.0,1.0,0.0); + + //pixel_debug=vec3(0.38,0.0,1.0)*vTexCoord.x; + + //pixel_debug=vec3(vTexCoord.x); //H bw gradient + + //pixel_debug=vec3(floor(vTexCoord.x*16)/16); //H bw gradient 16gray + + //pixel_debug=vec3(floor(vTexCoord.x*64)/64); //H bw gradient 64gray + + //pixel_debug=vec3(floor(vTexCoord.x*128)/128); //H bw gradient 128gray + + //pixel_debug=vec3(floor(vTexCoord.x*256)/256); //H bw gradient 256gray + + //pixel_debug=vec3(1,0,0)*floor(vTexCoord.x*64)/64; //H red gradient 64 + + // float blink_time = 20; + // if (mod(params.FrameCount,blink_time*2) < blink_time) pixel_debug=vec3(0.2) ; else pixel_debug=vec3(1.0); + + //White circle, blinking + /* float blink_time = 20; + vec2 center = vTexCoord - vec2(0.5,0.5); + float radius = 0.1; + pixel_debug = vec3(1 - step(radius, length(center))); + pixel_debug *= float((mod(params.FrameCount,blink_time*2) < blink_time)); + */ + + //pixel_debug = colorwheel(vTexCoord); + FragColor = vec4(pixel_debug,1.0); } void main() { - /*vec4 pixel_debug=texture(Source,vTexCoord); - float mymod = int(mod(vTexCoord.y * params.OutputSize.y , 2.0 )) ; - pixel_debug.a *= float( (mymod != 0.0) ) ; - FragColor = pixel_debug; - return; - */ - - //debug(); return; /* since flickering code needs @@ -120,8 +136,6 @@ void main() { and outside id when we dont. */ - - vec3 pixel_out; if (DO_SCANLINES == 0.0) pixel_out = texture(Source, vTexCoord).rgb; @@ -134,7 +148,7 @@ void main() { if (DO_RF_NOISE > 0.0) { - vec3 noise = vec3(random(RF_NOISE_STRENGTH, vTexCoord * params.FrameCount)); + vec3 noise = vec3(random_fast(RF_NOISE_STRENGTH, vTexCoord * vDynamicSeed)); pixel_out += noise; } diff --git a/bezel/koko-aio/shaders/in_glow_y.slang b/bezel/koko-aio/shaders/in_glow_y.slang index 6563a41..5a5e7d3 100644 --- a/bezel/koko-aio/shaders/in_glow_y.slang +++ b/bezel/koko-aio/shaders/in_glow_y.slang @@ -106,7 +106,9 @@ void main() { pixel_glowed = texture(shift_and_bleed_pass,vTexCoord).rgb * IN_GLOW_POWER; //(Source, IN_GLOW_POWER, IN_GLOW_GAMMA, vTexCoord) ; } else { pixel_glowed = blur9_y(Source, vTexCoord, params.SourceSize.xy, vIN_GLOW_H) * IN_GLOW_POWER; - if (IN_GLOW_BIAS < IN_GLOW_BIAS_MAX && (IN_GLOW_W < GLOW_SHARP_MAX || IN_GLOW_H < GLOW_SHARP_MAX) ) { + if (IN_GLOW_BIAS < IN_GLOW_BIAS_MAX && + (IN_GLOW_W < GLOW_SHARP_MAX || IN_GLOW_H < GLOW_SHARP_MAX) && + (IN_GLOW_SHOW_ARTF_MASK < 0.5) ) { pixel_glowed = glow_blur_bias(shift_and_bleed_pass, vTexCoord, pixel_glowed, IN_GLOW_BIAS); //pixel_glowed = antialias_blur_bias(shift_and_bleed_pass, vTexCoord, pixel_glowed, IN_GLOW_BIAS); } diff --git a/bezel/koko-aio/shaders/includes/functions.include.slang b/bezel/koko-aio/shaders/includes/functions.include.slang index 84218ea..0b691a4 100644 --- a/bezel/koko-aio/shaders/includes/functions.include.slang +++ b/bezel/koko-aio/shaders/includes/functions.include.slang @@ -1,5 +1,71 @@ +// mix_step returns a or b, depending on the mix value. +// mix is supposed to have just 2 values, 1.0 or 0.0; + vec2 mix_step(vec2 a, vec2 b, float mix){ + return (a * (1 - mix)) + + (b * mix) ; + } + vec3 mix_step(vec3 a, vec3 b, float mix){ + return (a * (1 - mix)) + + (b * mix) ; + } + vec4 mix_step(vec4 a, vec4 b, float mix){ + return (a * (1 - mix)) + + (b * mix) ; + } + float mix_step(float a, float b, float mix){ + return (a * (1 - mix)) + + (b * mix) ; + } +//REFLECTION RELATED START + float circle_smooth(vec2 coords, vec2 middle, float f_radius, float FALLOFF) { + //Draw a circle with smoothed borders: + float fdistance=distance(middle, vec2(coords.x, coords.y)); + float circle = (1-smoothstep(f_radius-FALLOFF, f_radius+FALLOFF, fdistance)); + return circle; + } + + float square_smooth(vec2 co, vec2 corner, float size, float smoothshade) { + //Draws a square with smooth borders: + vec4 rect = vec4(corner.x, corner.y, corner.x+size, corner.y+size); + vec2 hv = smoothstep(rect.xy - smoothshade, rect.xy, co) * smoothstep(co - smoothshade, co, rect.zw); + return hv.x * hv.y; + } + + float corners_shade(vec2 co, float size_multiplier){ + //Draws 4 smooth squares or circles in the corners. + //They are intended to modulate the blur radius and the strength of the reflection. + + /* + vec4 circles; + float circle_radius = size; //0.13? + float circle_falloff = smoothsize; //0.05? + float circle_power =2.0; + circles.x = circle_smooth(co, vec2(0.0,0.0), circle_radius, circle_falloff) * circle_power; + circles.y = circle_smooth(co, vec2(0.0,1.0), circle_radius, circle_falloff) * circle_power; + circles.z = circle_smooth(co, vec2(1.0,0.0), circle_radius, circle_falloff) * circle_power; + circles.w = circle_smooth(co, vec2(1.0,1.0), circle_radius, circle_falloff) * circle_power; + + float circle = max(max(max(circles.x, circles.y), circles.z), circles.w); + circle = min(circle, 1.0); + circle = 1-circle; + + return circle; + */ + vec4 squares; + float squaresize = BEZEL_REFL_CORNER_BLANK_SIZE * size_multiplier; + float squarefade = BEZEL_REFL_CORNER_BLANK_SHADE * size_multiplier; + //(vec2 co, vec2 corner, float size, float smoothshade) { + squares.x = square_smooth(co, vec2(0.0,0.0), squaresize, squarefade); + squares.y = square_smooth(co, vec2(1.0 - squaresize, 0.0), squaresize, squarefade); + squares.z = square_smooth(co, vec2(0.0, 1-squaresize), squaresize, squarefade); + squares.w = square_smooth(co, vec2(1-squaresize, 1-squaresize), squaresize, squarefade); + return max(max(max(squares.x, squares.y), squares.z), squares.w); + } +//REFLECTION RELATED ENDS + + vec3 pixel_push_luminance(vec3 c, float strength) { //if (strength == 0.0) return c; //lighter without the check. float whiteness = max(max(c.r, c.g), c.b); @@ -15,7 +81,7 @@ vec3 apply_fuzzy_main_pass(vec3 color) { if (DO_HALO == 1.0) color += pow(color,vec3(HALO_GAMMA))*HALO_POWER; if (DO_SCANLINES == 1.0) - color *= mix(0.5 + (SCANLINE_DARK*0.5), 1.0, SCANLINE_COMPENSATION); + color *= 0.5 + (SCANLINE_DARK*0.5); if (DO_CCORRECTION == 1.0) color = pow(color, vec3(GAMMA_OUT)); if (DO_VIGNETTE == 1.0) @@ -24,6 +90,7 @@ vec3 apply_fuzzy_main_pass(vec3 color) { } + vec2 offsets_from_float(float in_param, int range){ return vec2( (int(in_param) % range) - range*0.5, @@ -58,12 +125,21 @@ vec2 zoom(vec2 in_coords, float zoom_factor) { return (in_coords/zoom_factor)-off; } +float zoom1D(float in_coord, float zoom_factor) { + float off = 1.0/(zoom_factor*2.0) - 0.5; + return (in_coord/zoom_factor)-off; +} + vec2 zoomxy(vec2 in_coords, vec2 zoom_factor) { vec2 off = 1.0/(zoom_factor*2.0) - 0.5; return (in_coords/zoom_factor)-off; } vec2 zoomout_coords(vec2 in_coords, float zoom_out, float aspect) { + // to convert to standard zoom: + // zoomout_coords(x) = zoom( 1/(x+1) ); + + vec2 zoom = vec2( 1 + zoom_out, 1 + (zoom_out * aspect) ); @@ -97,8 +173,25 @@ vec2 scale_to_range_vec2(vec2 x, float dmin, float dmax) { return ( (dmax-dmin) * x ) + dmin; } -#define RND_A 12.9898 -#define RND_B 78.233 +float map_range(float value, float min_in, float max_in, float min_out, float max_out) { + //Scales value in [min_in - max_in] to [min_out - max_out] + return min_out + (value - min_in) * (max_out - min_out) / (max_in - min_in); +} + + +vec3 apply_contrast_brightness(vec3 c, float contrast, float brightness) { + return scale_to_range_vec3(c, -contrast, 1+contrast) + brightness; +} + +float apply_contrast_brightness(float c, float contrast, float brightness) { + return scale_to_range(c, -contrast, 1+contrast) + brightness; +} + +float round_step(float f, float p) { + return floor(f*p)/p; +} + +#define VEC2_RND_A_B vec2(12.9898, 78.233) #define RND_C 43758.5453 float random(float power, vec2 seed) { @@ -106,27 +199,36 @@ float random(float power, vec2 seed) { //https://github.com/svofski/CRT //Copyright (c) 2016, Viacheslav Slavinsky //All rights reserved. - float dt = dot(seed.xy, vec2(RND_A, RND_B)); + float dt = dot(seed.xy, VEC2_RND_A_B); float sn = mod(dt,3.14); float noise_out = fract(sin(sn) * RND_C); - //noise_out = clamp(noise_out, -power, power); + + noise_out = scale_to_range(noise_out, -power, power); + return noise_out; +} + +//The following produces weird results when with dynamic seed like framecount. +float random_fast(float power, vec2 seed) { + float noise_out = fract(sin(dot(seed.xy, VEC2_RND_A_B)) * RND_C); noise_out = scale_to_range(noise_out, -power, power); return noise_out; } + //CURVATURE #define corner_aspect vec2(1.0, 0.75) + float fn_border(vec2 coord) { + coord = (coord - vec2(0.5)) + vec2(0.5, 0.5); + coord = min(coord, vec2(1.0) - coord) * corner_aspect; + vec2 cdist = vec2(GEOM_CORNER_SIZE); + coord = (cdist - min(coord, cdist)); + float dist = sqrt(dot(coord, coord)); + return clamp((cdist.x - dist)*GEOM_CORNER_SMOOTH, 0.0, 1.0); + } + float border(vec2 coord) { - //if (GEOM_CORNER_SIZE < 0.02) { - /*float fout = float(coord.x > 0.0 && - coord.y > 0.0 && - coord.x < 1.0 && - coord.y < 1.0 - ); - return fout; - //}*/ coord = (coord - vec2(0.5)) + vec2(0.5, 0.5); coord = min(coord, vec2(1.0) - coord) * corner_aspect; vec2 cdist = vec2(GEOM_CORNER_SIZE); @@ -151,7 +253,9 @@ float random(float power, vec2 seed) { // Transform coordinates to range [-1, 1] uv = uv * 2.0 - 1.0; vec2 pow_exp = 1.0/(1.0+vec2(wx, wy) * 0.2 ) ; - float curvedCoordsDistance = length(uv); + //float curvedCoordsDistance = length(uv); + float curvedCoordsDistance = sqrt(uv.x*uv.x+uv.y*uv.y); + curvedCoordsDistance = clamp(curvedCoordsDistance, 0.0, 1.4142); vec2 pow_base = vec2(1.0-(curvedCoordsDistance/1.4142135623730950488016887242097)); pow_base = abs(pow_base); // <-- this way intel and nvidia (probably amd) acts the same. uv /= curvedCoordsDistance; @@ -160,15 +264,45 @@ float random(float power, vec2 seed) { // Transform coordinates back to [0, 1] return uv* 0.5 + 0.5; } + - vec2 Warp_fast(vec2 uv, vec2 v_exp, vec2 arg2) { + +vec2 Warp_try(vec2 pos, float warpX, float warpY) { + +/* float dist = length(pos-vec2(0.5))*10; + float c = 1 - clamp(dist, 0.0,1.0); + pos=zoom(pos, c); + return pos; + + pos=zoom(pos, 1.006); + */ + float k=0.5; //0.1 + warpX*=k; + warpY*=k; + + //pos.x=zoom1D(pos.x, 1+warpX*0.16); + float powexp = 1.8; + pos = pos*2.0-1.0; + pos *= vec2(1.0 + pow(pos.y, powexp)*warpX, 1.0 + pow(pos.x, powexp)*warpY); + + return pos*0.5 + 0.5; + + + + +} + + vec2 Warp_fast(vec2 uv, vec2 v_exp, vec2 arg2, float cut_ears) { /*This version is exact and faster than the other implementation, * Just because it needs precalculed arguments that can live in * vertex shader */ // Transform coordinates to range [-1, 1] uv = uv * 2.0 - 1.0; - float curvedCoordsDistance = length(uv); + //float curvedCoordsDistance = length(uv); + + float curvedCoordsDistance = sqrt(uv.x*uv.x+uv.y*uv.y); + curvedCoordsDistance = min(curvedCoordsDistance, cut_ears); vec2 pow_base = vec2(1.0-(curvedCoordsDistance/1.4142)); pow_base = abs(pow_base); // <-- this way intel and nvidia (probably amd) acts the same. uv /= curvedCoordsDistance; @@ -203,7 +337,7 @@ float random(float power, vec2 seed) { #ifdef STATIC_SUPPORT_BACKDROP return true; #else - return (DO_AMBILIGHT + DO_BG_IMAGE > 0.0); + return (DO_AMBILIGHT + DO_BG_IMAGE + DO_BACKDROP > 0.0); #endif } @@ -286,6 +420,70 @@ float random(float power, vec2 seed) { return scale_coord; } + vec2 integer_scale(vec2 in_coords, float target_aspect, bool is_rotated) { + vec2 izoom; + + float raw_in_aspect = params.OriginalSize.x/params.OriginalSize.y; + float adapted_aspect = target_aspect /raw_in_aspect; + in_coords.x = zoom1D(in_coords.x, adapted_aspect); + + if (!is_rotated) { + //This is 1X integer zoom: + izoom = params.OriginalSize.xy / global.FinalViewportSize.xy; + //Find the maximum zoom allowed + float int_zoom = floor(global.FinalViewportSize.y / params.OriginalSize.y ); + int_zoom = clamp(int_zoom, 1.0, GAME_GEOM_INT_SCALE_MAX); + izoom *= int_zoom; + } else { + izoom = params.OriginalSize.xy / global.FinalViewportSize.yx; + float int_zoom = floor(global.FinalViewportSize.y / (params.OriginalSize.x*adapted_aspect) ); + int_zoom = clamp(int_zoom, 1.0, GAME_GEOM_INT_SCALE_MAX); + izoom *= int_zoom; + } + return zoomxy(in_coords, izoom); + } + + float get_BEZEL_INNER_ZOOM() { + /*if (GAME_GEOM_INT_SCALE == 1.0 && DO_GAME_GEOM_OVERRIDE == 1.0) + return 0.0; + else + return BEZEL_INNER_ZOOM; + */ + //unbranched versions: + return BEZEL_INNER_ZOOM * (1 - DO_GAME_GEOM_OVERRIDE * GAME_GEOM_INT_SCALE); + + //117.2 + //return BEZEL_INNER_ZOOM * float( GAME_GEOM_INT_SCALE != 1.0 || DO_GAME_GEOM_OVERRIDE != 1.0 ); + } + + bool do_integer_scale() { + return DO_GAME_GEOM_OVERRIDE == 1.0 && GAME_GEOM_INT_SCALE == 1.0; + } + + + vec2 content_geom_override(vec2 co, float aspect, float in_aspect, float vshift, float hshift, float out_zoom){ + //Aspect + //float bUse_original_aspect = float(aspect < 0.01); + float bUse_custom_aspect = step(0.01, aspect); + + float scale_y; + /*if (aspect > 0.01) + scale_y = aspect/in_aspect; + else + scale_y = 1.0; + */ + //Unbranched previous: + scale_y = mix_step(1.0, aspect/in_aspect, bUse_custom_aspect ); + + float offset_y = (0.5 * scale_y ) - 0.5 ; + co.y = co.y*scale_y - offset_y; + //shift + co.y -= vshift/10.0; + co.x -= hshift/10.0; + //zoom + return zoom(co, out_zoom); + } + //Blur/Glow vec3 glow_dumb(sampler2D in_texture, float glow_power, float gamma, vec2 coords) { return pow( texture(in_texture, coords).rgb, vec3(gamma) ) * glow_power; @@ -419,6 +617,65 @@ float rgb_to_gray(vec3 rgb) { } */ + +vec3 hsv2rgb(vec3 c){ + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); +} + +#define eps10 1.0e-10 +vec3 rgb2hsv(vec3 c){ + vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); + vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); + + float d = q.x - min(q.w, q.y); + return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + eps10)), d / (q.x + eps10), q.x); +} + float get_dyn_zoom(sampler2D tex) { return 1.0 + (texture(tex, vec2(0.75,0.75) ).a/ DYNZOOM_FACTOR) ; } + + +vec2 tilt(vec2 co, float is_rotated, vec2 tilt) { + + vec2 r_tilt = vec2( mix_step(tilt.x, tilt.y, is_rotated), + mix_step(tilt.y, -tilt.x, is_rotated) +); + + vec2 tilt_min = 1 - r_tilt; + vec2 tilt_max = 1 + r_tilt; + + // X Tilt + float tilt_x_range = scale_to_range(co.y, tilt_min.x, tilt_max.x); + co = vec2( zoom1D(co.x, tilt_x_range), + zoom1D(co.y, tilt_x_range) + ); + + // Y Tilt + float tilt_y_range = scale_to_range(co.x, tilt_min.y, tilt_max.y); + co = vec2( zoom1D(co.x, tilt_y_range), + zoom1D(co.y, tilt_y_range) + ); + + // Aply FOV; + vec2 fov = mix(vec2(1.0), vec2(TILT_FOV), abs( tilt.xy )); + co = zoomxy(co, mix_step(fov.yx, fov.xy, is_rotated)); + + co.xy += mix_step(tilt.yx, -tilt.xy, is_rotated) * 0.4; + + return co; + +} + +bool is_first_outside_rect(vec2 point, vec4 rect) { + return (point.x < rect.x || point.x > rect.z || + point.y < rect.y || point.y > rect.w) ; +} + +bool is_first_inside_rect(vec2 point, vec4 rect) { + return (point.x >= rect.x && point.x < rect.z && + point.y >= rect.y && point.y < rect.w) ; +} diff --git a/bezel/koko-aio/shaders/ntsc_pass.slang b/bezel/koko-aio/shaders/ntsc_pass.slang index 7865b16..d359625 100644 --- a/bezel/koko-aio/shaders/ntsc_pass.slang +++ b/bezel/koko-aio/shaders/ntsc_pass.slang @@ -98,6 +98,7 @@ layout(location = 4) in float vNTSC_weights[NTSC_FILTER_WIDTH_MAX]; layout(location = 0) out vec4 FragColor; layout(set = 0, binding = 2) uniform sampler2D Source; +//layout(set = 0, binding = 3) uniform sampler2D ntsc_passFeedback; // Colorspace conversion matrix for YIQ-to-RGB @@ -111,17 +112,6 @@ const mat3 RGB2YIQ = mat3( 0.1140, -0.3216, 0.3114); - -#define eps10 1.0e-10 -vec3 rgb2hsv(vec3 c){ - vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); - vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); - vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); - - float d = q.x - min(q.w, q.y); - return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + eps10)), d / (q.x + eps10), q.x); -} - #define pi10 pi*10 #define PHASE_SHIFT_FOR_BLUR_K pi/3 vec4 ntscdec(vec2 uv) { @@ -160,8 +150,10 @@ vec4 ntscdec(vec2 uv) { return vec4(YIQ_result * YIQ2RGB, artifacts_mask); } -#define W vec3(0.2125, 0.7154, 0.0721) + + +#define W vec3(0.2125, 0.7154, 0.0721) vec3 color_tools(vec3 pixel_out) { //Apply color corrections to input signal. @@ -176,7 +168,7 @@ vec3 color_tools(vec3 pixel_out) { //Modify contrast and brightness if (CONTRAST != 0.0 || BRIGHTNESS != 0.0) - pixel_out.rgb = scale_to_range_vec3(pixel_out.rgb, -CONTRAST, 1+CONTRAST) + BRIGHTNESS; + pixel_out.rgb = apply_contrast_brightness(pixel_out.rgb, CONTRAST, BRIGHTNESS); //Modify color temperature if (TEMPERATURE != 6500.0) pixel_out.rgb = pixel_out.rgb * vTemperature_rgb; @@ -210,7 +202,9 @@ void main() { pixel_out = pixel_out_vec4.rgb; artifacts = pixel_out_vec4.a; - + //artifacts = mix(artifacts, texture(ntsc_passFeedback, vTexCoord).a, 0.5); <-- this helps +//FragColor = vec4(artifacts); return; + /* //artifacts = pow(artifacts, IN_GLOW_NTSC_ARTF_TRSH * 8.0); artifacts = artifacts * IN_GLOW_NTSC_ARTF_MULT; @@ -225,6 +219,10 @@ void main() { if (DO_CCORRECTION == 1.0) pixel_out = color_tools(pixel_out); + + + + FragColor = vec4(pixel_out, artifacts); diff --git a/bezel/koko-aio/shaders/reflection_blur.slang b/bezel/koko-aio/shaders/reflection_blur.slang new file mode 100644 index 0000000..3da8b44 --- /dev/null +++ b/bezel/koko-aio/shaders/reflection_blur.slang @@ -0,0 +1,89 @@ +#version 450 +#include "config.inc" + +#pragma stage vertex +layout(location = 0) in vec4 Position; +layout(location = 1) in vec2 TexCoord; + +layout(location = 0) out vec2 vTexCoord; + +#include "includes/functions.include.slang" + +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 = 1) uniform sampler2D Source; +layout(set = 0, binding = 2) uniform sampler2D first_pass; + +#include "includes/functions.include.slang" + + +float borders_gradient(vec2 co, float smoothness) { + //Draws a square with smooth borders: + float size = 1.0; + vec4 rect = vec4(0.0+smoothness, 0.0+smoothness, size - smoothness, size - smoothness); + vec2 hv = smoothstep(rect.xy - smoothness, rect.xy, co) * smoothstep(co - smoothness, co, rect.zw); + return hv.x * hv.y; +} + +void main() { + + if (DO_BEZEL == 0.0) return; + + + //Zoom out the image coordinates by the bezel border size to make room for reflections: + vec2 coords = zoom(vTexCoord, BEZEL_REFL_ZOOMOUT_ROOM); + + //Skip unuseful pixels + float skip_border = BEZEL_REFL_SKIP_SIZE; + if (coords.x > skip_border && coords.x < 1.0 - skip_border && + coords.y > skip_border && coords.y < 1.0 - skip_border ) { + FragColor = vec4(0.0); + return; + } + + //Create a gradient near borders to modulate between blurrend and sharp refection. + float smoothness = 0.11; + float shade_sharp_blur = borders_gradient(vTexCoord, smoothness); + shade_sharp_blur = 1 - (shade_sharp_blur + BEZEL_RFL_BLR_SHD); //Modulates between sharp and blur via user parameter + + //Create gradients in the corners to blur more more near corners: + #define CORNER_BLURRINESS 0.6 + float fcorners_shade = corners_shade(vTexCoord, 0.9) * CORNER_BLURRINESS; + shade_sharp_blur = max(fcorners_shade, shade_sharp_blur); + + //Sample a lod and the next integer one, then do a linear smapling between them + //to blur the reflections as they goes far from the tube. + float shade_sharp_blur_adapted = shade_sharp_blur * 5.5; + float lod0 = floor(shade_sharp_blur_adapted); + float lod1 = lod0 + 1; + vec3 s1 = textureLod( Source, coords, lod0).rgb; + vec3 s2 = textureLod( Source, coords, lod1).rgb; + float lodmix = fract(shade_sharp_blur_adapted); + vec3 pixel_out = mix(s1, s2, lodmix) * BEZEL_REFL_STRENGTH; + + //Next simulate a diffused light + vec3 pixel_diffused = textureLod( first_pass, coords, 6.0).rgb; + pixel_out = mix( pixel_out, pixel_diffused, BEZEL_DIFFUSION_STR); + + + //multiply the blurred image by the corner shade so that reflections will not be visible in the corners. + //This has been moved to final pass because it didn't worked well with curvature + //at 0.0 inner zoom level. + //pixel_out = pixel_out * (1 - fcorners_shade); + + pixel_out = apply_fuzzy_main_pass(pixel_out); + + FragColor = vec4(pixel_out, 1.0); + +} + + + diff --git a/bezel/koko-aio/shaders/reflection_blur_pre.slang b/bezel/koko-aio/shaders/reflection_blur_pre.slang new file mode 100644 index 0000000..bdcf6ee --- /dev/null +++ b/bezel/koko-aio/shaders/reflection_blur_pre.slang @@ -0,0 +1,61 @@ +#version 450 +#include "config.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 vCoordsAdapted; + +#include "includes/functions.include.slang" + +void main() { + gl_Position = global.MVP * Position; + vTexCoord = TexCoord; + vCoordsAdapted = vTexCoord; + //override aspect? + if (DO_GAME_GEOM_OVERRIDE > 0.5) + vCoordsAdapted = content_geom_override(vCoordsAdapted, GAME_GEOM_ASPECT, get_in_aspect(), GAME_GEOM_VSHIFT, GAME_GEOM_HSHIFT, GAME_GEOM_ZOOM); + + vCoordsAdapted = zoomout_coords( vCoordsAdapted, BEZEL_RFL_ZOOM, 1.0); +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 1) in vec2 vCoordsAdapted; + +layout(location = 0) out vec4 FragColor; + +layout(set = 0, binding = 1) uniform sampler2D first_pass; +layout(set = 0, binding = 2) uniform sampler2D avglum_pass; + +#include "includes/functions.include.slang" + +void main() { + + if (DO_BEZEL == 0.0) return; + + float skip_border = BEZEL_REFL_SKIP_SIZE; + if (vTexCoord.x > skip_border && vTexCoord.x < 1.0 - skip_border && + vTexCoord.y > skip_border && vTexCoord.y < 1.0 - skip_border ) { + return; + } + + vec2 coords = vCoordsAdapted; + + if (DO_DYNZOOM == 1.0) + coords = zoom(coords, get_dyn_zoom(avglum_pass)); + + //eventually return black pixel + if (coords.y < 0.0 || coords.y > 1.0 || coords.x < 0.0 || coords.x > 1.0) { + FragColor = vec4(0.0); + return; + } + + + FragColor = texture(first_pass, coords); +} + + + diff --git a/bezel/koko-aio/shaders/reflection_blur_x.slang b/bezel/koko-aio/shaders/reflection_blur_x.slang deleted file mode 100644 index a3a446c..0000000 --- a/bezel/koko-aio/shaders/reflection_blur_x.slang +++ /dev/null @@ -1,231 +0,0 @@ -#version 450 -#include "config.inc" - -#pragma stage vertex -layout(location = 0) in vec4 Position; -layout(location = 1) in vec2 TexCoord; -layout(location = 1) out vec2 vWarp_vexp; -layout(location = 2) out vec2 vWarp_arg2; -layout(location = 0) out vec2 vTexCoord; - -#include "includes/functions.include.slang" - -void main() { - gl_Position = global.MVP * Position; - vTexCoord = TexCoord; - //Precalc some Curvature/Warp values: - vWarp_vexp = 1.0/ (1 + (vec2(GEOM_WARP_X, GEOM_WARP_Y) * 0.2)) ; - vWarp_arg2 = 1.0 - pow(vec2(0.29289321881345247559915563789515), vWarp_vexp ); - - if (DO_BEZEL > 0.5) - vTexCoord = zoom(TexCoord, BEZEL_REFL_ZOOM); -} - -#pragma stage fragment -layout(location = 0) in vec2 vTexCoord; -layout(location = 1) in vec2 vWarp_vexp; -layout(location = 2) in vec2 vWarp_arg2; -layout(location = 0) out vec4 FragColor; - -layout(set = 0, binding = 1) uniform sampler2D first_pass; -layout(set = 0, binding = 2) uniform sampler2D avglum_pass; - -#define SourceTexture first_pass -#define SourceTextureSize global.first_passSize - -#include "includes/functions.include.slang" - -#define c_tolerance 0.051 - -vec3 texture_clamp_to_border(sampler2D tex, vec2 coords, float lod) { - //This emulates clamp to border: - if (coords.x < 0.0 || coords.x > 1.0 || coords.y < 0.0 || coords.y > 1.0) - return vec3(0.0); - else - return textureLod( tex, coords, lod).rgb ; -} - - -vec3 blur_unroll_clamp_to_border(float Size, vec2 co, float lod, float coords_crop_point) { - //Blur the image along x axis and emulate a clamp_to_border when outside the [0..1] range - //FIXME: coords_crop_point are not taken into account? CHECKME if you ever use this. - Size = Size * NEW_SCALEMOD_X; //<- so that blur size doesn't depend on output resolution - vec3 color; - vec2 d = SourceTextureSize.zw * Size; - color = texture_clamp_to_border( SourceTexture, co + d * vec2(-1.0, 1.0 ) ,lod).rgb; - color += texture_clamp_to_border( SourceTexture, co + d * vec2( 1.0, 1.0 ) ,lod).rgb; - color += texture_clamp_to_border( SourceTexture, co + d * vec2(-1.0, -1.0 ) ,lod).rgb; - color += texture_clamp_to_border( SourceTexture, co + d * vec2( 1.0, -1.0 ) ,lod).rgb; - return color / 4.0; -} - -vec3 blur_unroll(float Size, vec2 co, float lod) { - //Blurs the image along x axis - Size = Size * NEW_SCALEMOD_X; //<- so that blur size doesn't depend on output resolution - vec3 color; - vec2 d = SourceTextureSize.zw * Size; - color = textureLod( SourceTexture, co + d * vec2(-1.0, 1.0 ) ,lod).rgb; - color += textureLod( SourceTexture, co + d * vec2( 1.0, 1.0 ) ,lod).rgb; - color += textureLod( SourceTexture, co + d * vec2(-1.0, -1.0 ) ,lod).rgb; - color += textureLod( SourceTexture, co + d * vec2( 1.0, -1.0 ) ,lod).rgb; - return color / 4.0; -} - -vec2 mirrored_repeat(vec2 co, float crop) { - //Do a coords mirrored repeat with the mirror axis - //shifted by a "crop" amount. - //Don't try to unbranch me, it is a matter of 1/1000. - float cmin = 0.0 + crop ; - float cmax = 1.0 - crop ; - if (co.x < cmin ) - co.x = 2*cmin - co.x; - if (co.y < cmin) - co.y = 2*cmin - co.y; - if (co.x > cmax ) - co.x = 2*cmax - co.x; - if (co.y > cmax ) - co.y = 2*cmax - co.y; - return co; -} - -float circle_smooth(vec2 coords, vec2 middle, float f_radius, float FALLOFF) { - //Draw a circle with smoothed borders: - float fdistance=distance(middle, vec2(coords.x, coords.y)); - float circle = (1-smoothstep(f_radius-FALLOFF, f_radius+FALLOFF, fdistance)); - return circle; -} - -float square_smooth(vec2 co, vec2 corner, float size, float smoothshade) { - //Draws a square with smooth borders: - vec4 rect = vec4(corner.x, corner.y, corner.x+size, corner.y+size); - vec2 hv = smoothstep(rect.xy - smoothshade, rect.xy, co) * smoothstep(co - smoothshade, co, rect.zw); - return hv.x * hv.y; -} - -float corners_shade(vec2 co, float size, float smoothsize){ - //Draws 4 smooth squares or circles in the corners. - //They are intended to modulate the blur radius and the strength of the reflection. - - /* - vec4 circles; - float circle_radius = size; //0.13? - float circle_falloff = smoothsize; //0.05? - float circle_power =2.0; - circles.x = circle_smooth(co, vec2(0.0,0.0), circle_radius, circle_falloff) * circle_power; - circles.y = circle_smooth(co, vec2(0.0,1.0), circle_radius, circle_falloff) * circle_power; - circles.z = circle_smooth(co, vec2(1.0,0.0), circle_radius, circle_falloff) * circle_power; - circles.w = circle_smooth(co, vec2(1.0,1.0), circle_radius, circle_falloff) * circle_power; - - float circle = max(max(max(circles.x, circles.y), circles.z), circles.w); - circle = min(circle, 1.0); - circle = 1-circle; - - return circle; - */ - vec4 squares; - float squaresize = size; - float squarefade = smoothsize; - //(vec2 co, vec2 corner, float size, float smoothshade) { - squares.x = square_smooth(co, vec2(0.0,0.0), squaresize, squarefade); - squares.y = square_smooth(co, vec2(1.0 - squaresize, 0.0), squaresize, squarefade); - squares.z = square_smooth(co, vec2(0.0, 1-squaresize), squaresize, squarefade); - squares.w = square_smooth(co, vec2(1-squaresize, 1-squaresize), squaresize, squarefade); - return max(max(max(squares.x, squares.y), squares.z), squares.w); -} - -float borders_gradient(vec2 co, float foffset) { - // Create a b/w shade near the borders that will be used to - // Modulate from sharp reflections to blur reflections. - vec4 shades; - shades.x = abs( co.x - foffset ); - shades.y = abs( 1 - co.x - foffset ); - shades.z = abs( co.y - foffset ); - shades.w = abs( 1 - co.y - foffset ); - return min(min(min(shades.x, shades.y), shades.z), shades.w); -} - - - -void main() { - if (DO_BEZEL == 0.0) return; - - //Zoom out the image coordinates by the bezel border size to make room for reflections: - vec2 coords = zoomout_coords(vTexCoord, BEZEL_BORDER_SIZE, 1.0); - vec2 coords_zoomedout = coords; - - //This skip condition will be used to spped-up processing by discarding unuseful pixels. - //the c_tolerance parameter is a safe measure /FIXME: for what? - bool skip_condition = (coords.x < 1.0 - c_tolerance && coords.x > c_tolerance && - coords.y < 1.0 - c_tolerance && coords.y > c_tolerance ) ; - - - //Mark the pixel as not useful, so that the next pass will be aware of it and skip rendering too: - if (skip_condition) { - FragColor = mark_useless(vec3(0.0)); - return; - } - - //If coords needs to be curved, do it now: - if (DO_CURVATURE == 1.0 && ( GEOM_WARP_X > 0.0 || GEOM_WARP_Y > 0.0) ) { - coords = Warp_fast(coords, vWarp_vexp, vWarp_arg2); //coords_curved = Warp(coords_curved,GEOM_WARP_X,GEOM_WARP_Y); - } - - - //Since we will use a mirrored_repeat trick to simulate reflections, we need to know - //where the mirror axis is. - //The mirror axis position may depend on the dynamic zoom level - //(the feature that zooms the image in when it is bright) - float coords_crop_point = 0.0; - if (DO_DYNZOOM == 1.0) { - //Crop coordinates to move the mirror axes - float dyn_zoom = get_dyn_zoom(avglum_pass); - coords_crop_point = (dyn_zoom - 1.0) * 0.5; - //Zoom image coords to align it - coords = zoom(coords, dyn_zoom); - } - coords_crop_point += BEZEL_RFL_OFFSET; // <- Adding the user offset - - //Mirror repeat the image by taking the crop point (mirror axis offset) into account: - coords = mirrored_repeat(coords, coords_crop_point); - - - //Create gradients in the corners to fadeout reflections and to blur more near them: - float fcorners_shade = corners_shade(vTexCoord, BEZEL_REFL_CORNER_BLANK_SIZE, BEZEL_REFL_CORNER_BLANK_SHADE); - - - //Create a gradient near borders to modulate between blurrend and sharp refection. - //This also goes into output alpha channel to make the next pass aware of it. - float shade_sharp_blur = borders_gradient(coords, coords_crop_point); - shade_sharp_blur = shade_sharp_blur * 1/(BEZEL_BORDER_SIZE * 0.3) ; - shade_sharp_blur = shade_sharp_blur - BEZEL_RFL_BLR_SHD; //Modulates between sharp and blur via user parameter - - - //Also modulate in the corners via fcorners_shade (fcorners_shade - shade_sharp_blur = max(fcorners_shade, shade_sharp_blur); - - - //Clamp to min 0.01 because anything lower will cause the next pass to think the pixel is useless. - shade_sharp_blur = max(shade_sharp_blur, 0.01); - //shade_sharp_blur = clamp(shade_sharp_blur, 0.01, 1.0); - - - //blur the reflection along x axis: - vec3 pixel_out = blur_unroll(BEZEL_REFL_BLUR_MAX * shade_sharp_blur, coords, 2.0); - // I tried, instead of simple blur_unroll() to take a black border into account ( blur_unroll_clamp_to_border() ) - // to emulate the reflection of black border into the main content - // when it is smaller than the bezel, but due to the low resolution of this pass, the results are bad: - // vec3 pixel_out = blur_unroll_clamp_to_border(BEZEL_REFL_BLUR_MAX * shade_sharp_blur, coords, 2.0, coords_crop_point); - - - //multiply the blurred image by the corner shade so that reflections will not be visible in the corners. - pixel_out = pixel_out * (1 - fcorners_shade); - - - // Finally, output the blurred image and put the sharp to blurred gradient in the alpha channel - // to be used by the next blur-y pass too to modulate the blur radius. - FragColor = vec4(apply_fuzzy_main_pass(pixel_out), shade_sharp_blur); - -} - - - diff --git a/bezel/koko-aio/shaders/reflection_blur_y.slang b/bezel/koko-aio/shaders/reflection_blur_y.slang deleted file mode 100644 index f5cfca0..0000000 --- a/bezel/koko-aio/shaders/reflection_blur_y.slang +++ /dev/null @@ -1,81 +0,0 @@ -#version 450 -#include "config.inc" - -#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; - - -#include "includes/functions.include.slang" - -#define SourceTexture Source -#define SourceTextureSize params.SourceSize - -#define b_offset_x -0.05 -#define Pi2 6.28318530717959 -vec3 blur(float Quality, float Directions, float Size, vec2 co) { - Size = Size * NEW_SCALEMOD_Y; - vec4 iResolution = SourceTextureSize; - vec2 Radius = Size/iResolution.xy ; - vec3 color = vec3(0.0,0.0,0.0); - vec3 lookup = vec3(0.0,0.0,0.0); - float steps=0.0; - for( float d=0.0; d 0.5) pixel_out = pow(pixel_out, vec3(IN_GLOW_GAMMA)); - + FragColor = vec4(pixel_out,pixel_alpha_ntsc_artifacts); - return; + } diff --git a/bezel/koko-aio/textures/background_over.png b/bezel/koko-aio/textures/background_over.png index 40f9263..964265d 100644 Binary files a/bezel/koko-aio/textures/background_over.png and b/bezel/koko-aio/textures/background_over.png differ diff --git a/bezel/koko-aio/textures/monitor_body_curved.png b/bezel/koko-aio/textures/monitor_body_curved.png index 3ef63aa..c09a9bb 100644 Binary files a/bezel/koko-aio/textures/monitor_body_curved.png and b/bezel/koko-aio/textures/monitor_body_curved.png differ diff --git a/bezel/koko-aio/textures/monitor_body_straight.png b/bezel/koko-aio/textures/monitor_body_straight.png index 327a7d5..9b6fec1 100644 Binary files a/bezel/koko-aio/textures/monitor_body_straight.png and b/bezel/koko-aio/textures/monitor_body_straight.png differ diff --git a/bezel/koko-aio/tv-BASE.slangp b/bezel/koko-aio/tv-BASE.slangp index 3a940e5..1b9fb63 100644 --- a/bezel/koko-aio/tv-BASE.slangp +++ b/bezel/koko-aio/tv-BASE.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -196,7 +196,8 @@ SAT_BLEED_PAL = "1.000000" SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" -OFFSET_STRENGTH = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -217,19 +218,23 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" GEOM_WARP_X = "0.475000" GEOM_WARP_Y = "0.500000" +GEOM_CORNER_SIZE = "0.010000" GEOM_CORNER_SMOOTH = "200.000000" BEZEL_INNER_ZOOM = "-0.160000" -BEZEL_IMAGE_BORDER = "1.020000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/tv-NTSC-1-classic_take.slangp b/bezel/koko-aio/tv-NTSC-1-classic_take.slangp index 5b7ae14..7748c84 100644 --- a/bezel/koko-aio/tv-NTSC-1-classic_take.slangp +++ b/bezel/koko-aio/tv-NTSC-1-classic_take.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -194,43 +194,47 @@ TEMPERATURE = "7000.000000" GAMMA_OUT = "0.560000" DO_NTSC_ARTIFACTS = "1.000000" DO_SAT_BLEED = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" -IN_GLOW_POWER = "1.650000" +IN_GLOW_POWER = "1.500000" IN_GLOW_GAMMA = "2.000000" IN_GLOW_W = "1.000000" IN_GLOW_H = "2.000000" DO_VMASK_AND_DARKLINES = "1.000000" RGB_MASK_STRENGTH = "1.000000" VMASK_USE_GM = "1.000000" -VMASK_GAP = "1.000000" -DARKLINES_STRENGTH = "0.600000" -DARKLINES_PERIOD = "4.000000" +DARKLINES_STRENGTH = "1.000000" DO_HALO = "1.000000" HALO_POWER = "0.500000" HALO_W = "3.500000" HALO_H = "3.500000" HALO_GAMMA = "1.300000" -HALO_VS_SCAN = "0.300000" +HALO_VS_SCAN = "0.900000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.050000" -SCANLINE_MAX = "4.100000" -SCANLINE_DARK = "0.100000" +SCANLINE_MIN = "0.200000" +SCANLINE_MAX = "1.000000" SCANLINE_SM_VOFFSET = "70.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.550000" BLOOM_EYE_ADPT_SRT = "0.800000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-NTSC-1-selective-classic_take.slangp b/bezel/koko-aio/tv-NTSC-1-selective-classic_take.slangp index cd2688c..ebce60b 100644 --- a/bezel/koko-aio/tv-NTSC-1-selective-classic_take.slangp +++ b/bezel/koko-aio/tv-NTSC-1-selective-classic_take.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -193,47 +193,52 @@ BRIGHTNESS = "0.050000" TEMPERATURE = "7000.000000" GAMMA_OUT = "0.560000" DO_NTSC_ARTIFACTS = "1.000000" +NTSC_FILTER_WIDTH = "13.000000" NTSC_FILTER_FC = "0.000000" DO_SAT_BLEED = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" -IN_GLOW_POWER = "1.650000" +IN_GLOW_POWER = "1.500000" IN_GLOW_GAMMA = "2.000000" IN_GLOW_W = "1.000000" IN_GLOW_H = "2.000000" IN_GLOW_NTSC_ARTF_MULT = "1.000000" -IN_GLOW_NTSC_ARTF_TRSH = "0.000000" +IN_GLOW_NTSC_ARTF_TRSH = "0.150000" DO_VMASK_AND_DARKLINES = "1.000000" RGB_MASK_STRENGTH = "1.000000" VMASK_USE_GM = "1.000000" -VMASK_GAP = "1.000000" -DARKLINES_STRENGTH = "0.600000" -DARKLINES_PERIOD = "4.000000" +DARKLINES_STRENGTH = "1.000000" DO_HALO = "1.000000" HALO_POWER = "0.500000" HALO_W = "3.500000" HALO_H = "3.500000" HALO_GAMMA = "1.300000" -HALO_VS_SCAN = "0.300000" +HALO_VS_SCAN = "0.900000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.050000" -SCANLINE_MAX = "4.100000" -SCANLINE_DARK = "0.100000" +SCANLINE_MIN = "0.200000" +SCANLINE_MAX = "1.000000" SCANLINE_SM_VOFFSET = "70.000000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.550000" BLOOM_EYE_ADPT_SRT = "0.800000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-NTSC-1-selective.slangp b/bezel/koko-aio/tv-NTSC-1-selective.slangp index 321721f..fcaa4f0 100644 --- a/bezel/koko-aio/tv-NTSC-1-selective.slangp +++ b/bezel/koko-aio/tv-NTSC-1-selective.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -191,15 +191,21 @@ LUMINANCE = "0.200000" TEMPERATURE = "7000.000000" GAMMA_OUT = "0.560000" DO_NTSC_ARTIFACTS = "1.000000" +NTSC_FILTER_WIDTH = "13.000000" NTSC_FILTER_FC = "0.000000" DO_SAT_BLEED = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "2.000000" IN_GLOW_GAMMA = "2.000000" IN_GLOW_W = "1.000000" IN_GLOW_H = "1.000000" IN_GLOW_NTSC_ARTF_MULT = "1.000000" -IN_GLOW_NTSC_ARTF_TRSH = "0.000000" +IN_GLOW_NTSC_ARTF_TRSH = "0.150000" DO_VMASK_AND_DARKLINES = "1.000000" RGB_MASK_STRENGTH = "1.000000" VMASK_USE_GM = "1.000000" @@ -219,17 +225,19 @@ DO_BLOOM = "1.000000" BLOOM_MIX = "0.550000" BLOOM_EYE_ADPT_SRT = "0.800000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-NTSC-1.slangp b/bezel/koko-aio/tv-NTSC-1.slangp index 60798d2..2115042 100644 --- a/bezel/koko-aio/tv-NTSC-1.slangp +++ b/bezel/koko-aio/tv-NTSC-1.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -192,6 +192,11 @@ TEMPERATURE = "7000.000000" GAMMA_OUT = "0.560000" DO_NTSC_ARTIFACTS = "1.000000" DO_SAT_BLEED = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "2.000000" IN_GLOW_GAMMA = "2.000000" @@ -216,17 +221,19 @@ DO_BLOOM = "1.000000" BLOOM_MIX = "0.550000" BLOOM_EYE_ADPT_SRT = "0.800000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-NTSC-2.slangp b/bezel/koko-aio/tv-NTSC-2.slangp index 17b7c54..2d5fb0f 100644 --- a/bezel/koko-aio/tv-NTSC-2.slangp +++ b/bezel/koko-aio/tv-NTSC-2.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -193,6 +193,11 @@ GAMMA_OUT = "0.560000" DO_NTSC_ARTIFACTS = "1.000000" NTSC_PHASE_SHIFT = "1.000000" DO_SAT_BLEED = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" IN_GLOW_POWER = "2.000000" IN_GLOW_GAMMA = "2.000000" @@ -217,17 +222,19 @@ DO_BLOOM = "1.000000" BLOOM_MIX = "0.550000" BLOOM_EYE_ADPT_SRT = "0.800000" DO_CURVATURE = "1.000000" -GEOM_WARP_X = "0.475000" +GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-PAL-my-old.slangp b/bezel/koko-aio/tv-PAL-my-old.slangp index 1da21b2..f74461d 100644 --- a/bezel/koko-aio/tv-PAL-my-old.slangp +++ b/bezel/koko-aio/tv-PAL-my-old.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -200,7 +200,8 @@ SAT_BLEED_PAL = "1.000000" SAT_BLEED_STRENGTH = "1.750000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" -OFFSET_STRENGTH = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -222,22 +223,26 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" GEOM_WARP_X = "0.475000" GEOM_WARP_Y = "0.500000" +GEOM_CORNER_SIZE = "0.010000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" BEZEL_INNER_ZOOM = "-0.010000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-aperturegrille-bloom-bezel.slangp b/bezel/koko-aio/tv-aperturegrille-bloom-bezel.slangp index 655f049..377ed42 100644 --- a/bezel/koko-aio/tv-aperturegrille-bloom-bezel.slangp +++ b/bezel/koko-aio/tv-aperturegrille-bloom-bezel.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -197,7 +197,7 @@ SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" DO_SHIFT_RGB = "1.000000" -OFFSET_STRENGTH = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -220,10 +220,9 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" @@ -231,11 +230,11 @@ GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.160000" +BEZEL_INNER_ZOOM = "-0.185000" BEZEL_FRAME_ZOOM = "0.040000" -BEZEL_IMAGE_BORDER = "1.020000" AMBI_FALLOFF = "0.600000" AMBI_POWER = "1.700000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-aperturegrille-bloom-bezelwider.slangp b/bezel/koko-aio/tv-aperturegrille-bloom-bezelwider.slangp index b237ce5..66c4480 100644 --- a/bezel/koko-aio/tv-aperturegrille-bloom-bezelwider.slangp +++ b/bezel/koko-aio/tv-aperturegrille-bloom-bezelwider.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -197,7 +197,7 @@ SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" DO_SHIFT_RGB = "1.000000" -OFFSET_STRENGTH = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -220,10 +220,9 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" @@ -231,11 +230,11 @@ GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-aperturegrille-bloom.slangp b/bezel/koko-aio/tv-aperturegrille-bloom.slangp index 0563010..01244e9 100644 --- a/bezel/koko-aio/tv-aperturegrille-bloom.slangp +++ b/bezel/koko-aio/tv-aperturegrille-bloom.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -196,7 +196,8 @@ SAT_BLEED_PAL = "1.000000" SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" -OFFSET_STRENGTH = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -219,20 +220,24 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" GEOM_WARP_X = "0.475000" GEOM_WARP_Y = "0.500000" +GEOM_CORNER_SIZE = "0.010000" GEOM_CORNER_SMOOTH = "200.000000" BEZEL_INNER_ZOOM = "-0.160000" -BEZEL_IMAGE_BORDER = "1.020000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/tv-aperturegrille.slangp b/bezel/koko-aio/tv-aperturegrille.slangp index 07ef857..a23cbf8 100644 --- a/bezel/koko-aio/tv-aperturegrille.slangp +++ b/bezel/koko-aio/tv-aperturegrille.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -196,7 +196,8 @@ SAT_BLEED_PAL = "1.000000" SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" -OFFSET_STRENGTH = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -219,19 +220,23 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" GEOM_WARP_X = "0.475000" GEOM_WARP_Y = "0.500000" +GEOM_CORNER_SIZE = "0.010000" GEOM_CORNER_SMOOTH = "200.000000" BEZEL_INNER_ZOOM = "-0.160000" -BEZEL_IMAGE_BORDER = "1.020000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/tv-flickering.slangp b/bezel/koko-aio/tv-flickering.slangp index 537dbb6..415704e 100644 --- a/bezel/koko-aio/tv-flickering.slangp +++ b/bezel/koko-aio/tv-flickering.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -187,59 +187,66 @@ scale_x16 = "1.000000" scale_type_y16 = "viewport" scale_y16 = "1.000000" DO_CCORRECTION = "1.000000" -LUMINANCE = "0.300000" +LUMINANCE = "0.100000" TEMPERATURE = "7200.000000" -GAMMA_OUT = "0.400000" +GAMMA_OUT = "0.560000" DO_FXAA = "1.000000" -DO_SAT_BLEED = "1.000000" -SAT_BLEED_FALLOFF = "1.800000" +RF_NOISE_STRENGTH = "0.025000" +SAT_BLEED_PAL = "1.000000" +SAT_BLEED_STRENGTH = "1.750000" +SAT_BLEED_SIZE_LEFT = "3.000000" +SAT_BLEED_SIZE_RIGHT = "3.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "1.000000" +SHIFT_R = "-20.000000" +SHIFT_G = "1.000000" +SHIFT_B = "20.000000" DO_IN_GLOW = "1.000000" -IN_GLOW_POWER = "1.700000" +IN_GLOW_POWER = "1.600000" IN_GLOW_GAMMA = "2.000000" -IN_GLOW_W = "2.000000" -IN_GLOW_H = "2.000000" +IN_GLOW_SPREAD = "1.600000" +IN_GLOW_W = "0.000000" +IN_GLOW_H = "0.000000" IN_GLOW_BIAS = "0.000000" DO_VMASK_AND_DARKLINES = "1.000000" RGB_MASK_STRENGTH = "1.000000" VMASK_USE_GM = "1.000000" VMASK_GAP = "1.000000" -VMASK_OVERWHITE = "0.750000" -DARKLINES_STRENGTH = "0.400000" -DARKLINES_PERIOD = "0.200000" -DRKLN_OVERWHITE = "0.750000" +DARKLINES_STRENGTH = "0.700000" +DARKLINES_PERIOD = "4.000000" DO_HALO = "1.000000" -HALO_POWER = "0.430000" -HALO_W = "3.500000" -HALO_H = "3.500000" -HALO_VS_SCAN = "0.800000" +HALO_POWER = "0.500000" +HALO_W = "3.000000" +HALO_H = "3.000000" +HALO_GAMMA = "1.400000" DO_SCANLINES = "1.000000" -SCANLINE_MIN = "0.300000" -SCANLINE_DARK = "0.100000" -SCANLINES_BLEEDING = "0.300000" +SCANLINE_MAX = "1.000000" +SCANLINE_DARK = "1.000000" SCANLINE_FLICKERING = "1.000000" -SCANLINE_FLICKERING_POWER = "1.100000" -SCANLINE_SM_VOFFSET = "70.000000" +SCANLINE_FLICKERING_POWER = "0.400000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" -BLOOM_POWER = "1.600000" DO_CURVATURE = "1.000000" GEOM_WARP_X = "0.475000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.165000" -BEZEL_FRAME_ZOOM = "0.040000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.002000" -BEZEL_REFL_ZOOM = "0.993000" -AMBI_FALLOFF = "0.600000" -AMBI_POWER = "1.700000" +BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_FRAME_ZOOM = "0.170000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" +BEZEL_SPCL_STRENGTH = "0.950000" +AMBI_FALLOFF = "0.400000" +AMBI_POWER = "6.000005" +AMBI_OVER_BEZEL = "0.700000" +AMBI_OVER_BEZEL_SIZE = "0.174000" DO_VIGNETTE = "1.000000" -V_SIZE = "1.900000" +V_SIZE = "2.700000" V_POWER = "1.050000" DO_SPOT = "1.000000" S_POSITION = "194.000000" -S_POWER = "0.200000" textures = "monitor_body_curved;monitor_body_straight;bg_under;bg_over;backdrop" monitor_body_curved = "textures/monitor_body_curved.png" monitor_body_curved_linear = "true" diff --git a/bezel/koko-aio/tv-slotmask-bloom-bezel.slangp b/bezel/koko-aio/tv-slotmask-bloom-bezel.slangp index a8701ca..74e4756 100644 --- a/bezel/koko-aio/tv-slotmask-bloom-bezel.slangp +++ b/bezel/koko-aio/tv-slotmask-bloom-bezel.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -197,7 +197,7 @@ SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" DO_SHIFT_RGB = "1.000000" -OFFSET_STRENGTH = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -219,10 +219,9 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" @@ -230,11 +229,11 @@ GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.165000" +BEZEL_INNER_ZOOM = "-0.185000" BEZEL_FRAME_ZOOM = "0.040000" -BEZEL_IMAGE_BORDER = "1.020000" AMBI_FALLOFF = "0.600000" AMBI_POWER = "1.700000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-slotmask-bloom-bezelwider.slangp b/bezel/koko-aio/tv-slotmask-bloom-bezelwider.slangp index b6fcaf1..730c549 100644 --- a/bezel/koko-aio/tv-slotmask-bloom-bezelwider.slangp +++ b/bezel/koko-aio/tv-slotmask-bloom-bezelwider.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -197,7 +197,7 @@ SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" DO_SHIFT_RGB = "1.000000" -OFFSET_STRENGTH = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -219,10 +219,9 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" @@ -230,13 +229,11 @@ GEOM_WARP_X = "0.450000" GEOM_WARP_Y = "0.500000" GEOM_CORNER_SMOOTH = "400.000000" DO_BEZEL = "1.000000" -BEZEL_INNER_ZOOM = "-0.010000" +BEZEL_INNER_ZOOM = "-0.011000" BEZEL_FRAME_ZOOM = "0.170000" -BEZEL_IMAGE_BORDER = "1.020000" -BEZEL_RFL_OFFSET = "0.001000" -BEZEL_REFL_ZOOM = "0.990000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "5.000000" +AMBI_OVER_BEZEL = "0.200000" DO_VIGNETTE = "1.000000" V_SIZE = "2.700000" V_POWER = "1.050000" diff --git a/bezel/koko-aio/tv-slotmask-bloom.slangp b/bezel/koko-aio/tv-slotmask-bloom.slangp index 7ce0db3..611d473 100644 --- a/bezel/koko-aio/tv-slotmask-bloom.slangp +++ b/bezel/koko-aio/tv-slotmask-bloom.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -196,7 +196,8 @@ SAT_BLEED_PAL = "1.000000" SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" -OFFSET_STRENGTH = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -218,20 +219,24 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" DO_BLOOM = "1.000000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" GEOM_WARP_X = "0.475000" GEOM_WARP_Y = "0.500000" +GEOM_CORNER_SIZE = "0.010000" GEOM_CORNER_SMOOTH = "200.000000" BEZEL_INNER_ZOOM = "-0.160000" -BEZEL_IMAGE_BORDER = "1.020000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000" diff --git a/bezel/koko-aio/tv-slotmask.slangp b/bezel/koko-aio/tv-slotmask.slangp index 0571e71..b003521 100644 --- a/bezel/koko-aio/tv-slotmask.slangp +++ b/bezel/koko-aio/tv-slotmask.slangp @@ -98,22 +98,22 @@ scale_type_x8 = "source" scale_x8 = "0.500000" scale_type_y8 = "source" scale_y8 = "0.500000" -shader9 = "shaders/reflection_blur_x.slang" +shader9 = "shaders/reflection_blur_pre.slang" filter_linear9 = "true" -wrap_mode9 = "mirrored_repeat" +wrap_mode9 = "clamp_to_border" mipmap_input9 = "false" -alias9 = "reflected_blurred_pass1" +alias9 = "reflected_blurred_pass_pre" float_framebuffer9 = "false" srgb_framebuffer9 = "false" scale_type_x9 = "source" scale_x9 = "1.000000" scale_type_y9 = "source" scale_y9 = "1.000000" -shader10 = "shaders/reflection_blur_y.slang" +shader10 = "shaders/reflection_blur.slang" filter_linear10 = "true" wrap_mode10 = "mirrored_repeat" -mipmap_input10 = "false" -alias10 = "reflected_blurred_pass2" +mipmap_input10 = "true" +alias10 = "reflected_blurred_pass" float_framebuffer10 = "false" srgb_framebuffer10 = "false" scale_type_x10 = "source" @@ -196,7 +196,8 @@ SAT_BLEED_PAL = "1.000000" SAT_BLEED_STRENGTH = "0.500000" SAT_BLEED_SIZE_LEFT = "3.000000" SAT_BLEED_SIZE_RIGHT = "3.000000" -OFFSET_STRENGTH = "1.000000" +DO_SHIFT_RGB = "1.000000" +OFFSET_STRENGTH = "0.250000" SHIFT_R = "-20.000000" SHIFT_G = "1.000000" SHIFT_B = "20.000000" @@ -218,19 +219,23 @@ HALO_W = "3.000000" HALO_H = "3.000000" HALO_GAMMA = "1.400000" SCANLINE_DARK = "0.700000" -SCANLINE_COMPENSATION = "0.200000" SCANLINES_BLEEDING = "1.000000" SCANLINE_FLICKERING = "0.000000" -SCANLINE_FLICKERING_POWER = "0.500000" +SCANLINE_FLICKERING_POWER = "0.170000" BLOOM_MIX = "0.500000" DO_CURVATURE = "1.000000" GEOM_WARP_X = "0.475000" GEOM_WARP_Y = "0.500000" +GEOM_CORNER_SIZE = "0.010000" GEOM_CORNER_SMOOTH = "200.000000" BEZEL_INNER_ZOOM = "-0.160000" -BEZEL_IMAGE_BORDER = "1.020000" +BEZEL_R = "-0.190000" +BEZEL_G = "-0.190000" +BEZEL_B = "-0.190000" +BEZEL_CON = "2.180000" AMBI_FALLOFF = "0.400000" AMBI_POWER = "1.000000" +AMBI_OVER_BEZEL = "0.200000" V_SIZE = "2.700000" V_POWER = "1.050000" S_POSITION = "194.000000"