Mega Bezel updated to V1.5.0_2022-10-11

This commit is contained in:
HyperspaceMadness 2022-10-11 22:12:34 -04:00
parent ceee1f09dc
commit 1907801d42
16 changed files with 164 additions and 161 deletions

View file

@ -3,7 +3,7 @@ Mega Bezel Shader Readme
------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------
![Mega Bezel Logo](MegaBezelLogo.png) ![Mega Bezel Logo](MegaBezelLogo.png)
**Version V1.4.3_2022-10-09** **Version V1.5.0_2022-10-11**
---------------------------------------- ----------------------------------------
---------------------------------------- ----------------------------------------
@ -98,7 +98,6 @@ This shader package is meant for you to experiment with and make your own creati
**EDITING PRESETS** **EDITING PRESETS**
* You can then open this Simple Preset file and add other parameter adjustments or set textures as you see fit. E.G. add the following lines to change the background image: * You can then open this Simple Preset file and add other parameter adjustments or set textures as you see fit. E.G. add the following lines to change the background image:
* `BackgroundImage = "MyImage.jpg"` * `BackgroundImage = "MyImage.jpg"`
* `BackgroundVertImage = "MyImage.jpg"`
* Or change the path indicated on the `#reference` line to point at a different base preset * Or change the path indicated on the `#reference` line to point at a different base preset
*** ***
@ -663,8 +662,6 @@ The color/texture of the tube which appears behind the CRT image
- 0: Black - Game image is shown over 100% black - 0: Black - Game image is shown over 100% black
- 1: Image - Shows an grayish image of crt tube with lighting - 1: Image - Shows an grayish image of crt tube with lighting
- 2: Transparent - See through the CRT tube to the background - 2: Transparent - See through the CRT tube to the background
- **Opacity**
- Opacity of the tube background, With opacity of 0 you will see through to the background, good for things like Tron's Deadly Discs
- **Colorize On** - Colorize the image - **Colorize On** - Colorize the image
- **Hue Offset** - **Hue Offset**
- **Saturation** - **Saturation**
@ -696,8 +693,9 @@ Adds a shadow on top of the tube diffuse image and colored gel
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
**[ CRT ON TUBE DIFFUSE BLENDING ]:** **[ CRT ON TUBE DIFFUSE BLENDING ]:**
How to apply the CRT (Game Image) on top of the tube - **Tube Opacity**
- **CRT On Tube Diffuse Blend Mode** - Opacity of the tube, with opacity of 0 you will see through to the background, good for things like Tron's Deadly Discs
- **CRT On Tube Diffuse Blend Mode** - How to apply the CRT (Game Image) on top of the tube
- 0: OFF - Don't apply the game image - 0: OFF - Don't apply the game image
- 1: ADD - Apply the game image additively this is the normal behavior - 1: ADD - Apply the game image additively this is the normal behavior
- 2: Multiply - Darken the tube diffuse image with the game image - 2: Multiply - Darken the tube diffuse image with the game image

View file

@ -1,22 +1,18 @@
![Mega_Bezel_Logo|512x256, 75%](upload://6PNkvcMF9Go9Wnk6OJXfYR1opXI.png) ![Mega_Bezel_Logo|512x256, 75%](upload://6PNkvcMF9Go9Wnk6OJXfYR1opXI.png)
Mega Bezel is updated to V1.4.3_2022-10-09 Mega Bezel is updated to V1.5.0_2022-10-11
Changes: Changes:
* Fixed D3D11 bugs, Shaders now load, Compilation is still much slower than Vulkan or GlCore * Updated guest to crt-guest-advanced-2022-10-11-release1 with new halation
* Added SCREEN-ONLY presets for those users which don't use the Refletion, Bezel or Graphics * Fixed Compilation issues with GLCore
* Adjusted SUPER-XBR settings to be more like the latest SUPER-XBR * Fix error in Megatron which was preventing it from loading
* Added Tube Opacity * Fixed problem with NO-REFLECT where you could see the background through where the black edge was supposed to be
* Updated Text to faster compiling and rendering
* The names of the Max-Int presets has now changed because they point to these SCREEN-ONLY base presets which are faster
* Split apart libraries to improve compile times and optimize execution
---------------------------------------------------- ----------------------------------------------------
--- TODO --------------------------------------- --- TODO ---------------------------------------
---------------------------------------------------- ----------------------------------------------------
* Fix Blur Noise Samples * Fix Blur Noise Samples
* Fix No Reflect Tube Edge Mask (Can see through right now)
* Integer Scale Mode X & Y not affecting tube scale * Integer Scale Mode X & Y not affecting tube scale
* Move Global Variable Update to separate file for compile speed * Move Global Variable Update to separate file for compile speed

View file

@ -23,7 +23,7 @@
*/ */
// Screen Scale Required Parameters // Screen Scale Required Parameters
#pragma parameter HSM_MEGA_BEZEL_TITLE "[ --- HSM MEGA BEZEL V1.4.3_2022-10-09 --- ]" 0 0 0.01 0.01 #pragma parameter HSM_MEGA_BEZEL_TITLE "[ --- HSM MEGA BEZEL V1.5.0_2022-10-11 --- ]" 0 0 0.01 0.01
#pragma parameter HSM_RESOLUTION_DEBUG_ON " Show Resolution Info" 0 0 1 1 #pragma parameter HSM_RESOLUTION_DEBUG_ON " Show Resolution Info" 0 0 1 1
float HSM_RESOLUTION_DEBUG_ON = global.HSM_RESOLUTION_DEBUG_ON; float HSM_RESOLUTION_DEBUG_ON = global.HSM_RESOLUTION_DEBUG_ON;
@ -173,7 +173,7 @@ float HSM_INT_SCALE_MAX_HEIGHT = global.HSM_INT_SCALE_MAX_HEIGHT / 100;
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
// Non-Integer Scale // NON-INTEGER SCALE
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
#pragma parameter HSM_NON_INTEGER_SCALE_PERCENT_TITLE "[ NON-INTEGER SCALE PERCENT ]:" 0 0 0.01 0.01 #pragma parameter HSM_NON_INTEGER_SCALE_PERCENT_TITLE "[ NON-INTEGER SCALE PERCENT ]:" 0 0 0.01 0.01
@ -185,7 +185,7 @@ float HSM_NON_INTEGER_SCALE = global.HSM_NON_INTEGER_SCALE / 100;
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
// Physical Size // PHYSICAL SIZE
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
#pragma parameter HSM_PHYSICAL_SIZE_TITLE "[ NON-INTEGER - PHYSICAL SIZES ]:" 0 0 0.01 0.01 #pragma parameter HSM_PHYSICAL_SIZE_TITLE "[ NON-INTEGER - PHYSICAL SIZES ]:" 0 0 0.01 0.01
@ -204,7 +204,7 @@ float HSM_PHYSICAL_SIM_TUBE_DIAGONAL_SIZE = global.HSM_PHYSICAL_SIM_TUBE_DIAGONA
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
// Automatic Scale & Position // AUTOMATIC SCALE & POSITION
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
#pragma parameter HSM_AUTOMATIC_SCREEN_SCALE_TITLE "[ NON-INTEGER - AUTOMATIC SCREEN SCALE & PLACEMENT ]:" 0 0 0.01 0.01 #pragma parameter HSM_AUTOMATIC_SCREEN_SCALE_TITLE "[ NON-INTEGER - AUTOMATIC SCREEN SCALE & PLACEMENT ]:" 0 0 0.01 0.01
@ -219,7 +219,7 @@ float HSM_PLACEMENT_IMAGE_MODE = global.HSM_PLACEMENT_IMAGE_MODE;
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
// Non Integer Scale Offset // NON-INTEGER SCALE OFFSET
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
#pragma parameter HSM_NONINTEGER_SCALE_OFFSET_TITLE "[ NON-INTEGER SCALE OFFSET ]:" 0 0 0.01 0.01 #pragma parameter HSM_NONINTEGER_SCALE_OFFSET_TITLE "[ NON-INTEGER SCALE OFFSET ]:" 0 0 0.01 0.01
@ -228,7 +228,7 @@ float HSM_NON_INTEGER_SCALE_OFFSET = global.HSM_NON_INTEGER_SCALE_OFFSET / 100;
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
// Snap to Integer Scale // SNAP TO INTEGER SCALE
//--------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------
#pragma parameter HSM_SNAP_NONINTEGER_TITLE "[ SNAP NON-INTEGER TO CLOSEST INTEGER SCALE ]:" 0 0 0.01 0.01 #pragma parameter HSM_SNAP_NONINTEGER_TITLE "[ SNAP NON-INTEGER TO CLOSEST INTEGER SCALE ]:" 0 0 0.01 0.01

View file

@ -104,7 +104,7 @@ float HSM_REFLECT_BLUR_FALLOFF_DISTANCE = global.HSM_REFLECT_BLUR_FALLOFF_DISTAN
#pragma parameter HSM_REFLECT_NOISE_AMOUNT " Noise Amount" 50 0 100 1 #pragma parameter HSM_REFLECT_NOISE_AMOUNT " Noise Amount" 50 0 100 1
float HSM_REFLECT_NOISE_AMOUNT = global.HSM_REFLECT_NOISE_AMOUNT / 100; float HSM_REFLECT_NOISE_AMOUNT = global.HSM_REFLECT_NOISE_AMOUNT / 100;
#pragma parameter HSM_REFLECT_NOISE_SAMPLES " Noise Samples (0 for OFF)" 1 0 20 1 #pragma parameter HSM_REFLECT_NOISE_SAMPLES " Noise Samples - 0 | 1 | 2 | 12" 1 0 3 1
float HSM_REFLECT_NOISE_SAMPLES = global.HSM_REFLECT_NOISE_SAMPLES; float HSM_REFLECT_NOISE_SAMPLES = global.HSM_REFLECT_NOISE_SAMPLES;
#pragma parameter HSM_REFLECT_NOISE_SAMPLE_DISTANCE " Sample Distance" 100 0 500 5 #pragma parameter HSM_REFLECT_NOISE_SAMPLE_DISTANCE " Sample Distance" 100 0 500 5

View file

@ -204,101 +204,101 @@ vec2 ch_lar = vec2(8387.0,1147904.0);
float TEXT_MASK = 0; float TEXT_MASK = 0;
vec2 CUR_UV = vec2(0); vec2 CUR_UV = vec2(0);
#define _spc TEXT_MASK += char(ch_spc, CUR_UV); #define _spc TEXT_MASK += char_px(ch_spc, CUR_UV);
#define _exc TEXT_MASK += char(ch_exc, CUR_UV); #define _exc TEXT_MASK += char_px(ch_exc, CUR_UV);
#define _quo TEXT_MASK += char(ch_quo, CUR_UV); #define _quo TEXT_MASK += char_px(ch_quo, CUR_UV);
#define _hsh TEXT_MASK += char(ch_hsh, CUR_UV); #define _hsh TEXT_MASK += char_px(ch_hsh, CUR_UV);
#define _dol TEXT_MASK += char(ch_dol, CUR_UV); #define _dol TEXT_MASK += char_px(ch_dol, CUR_UV);
#define _pct TEXT_MASK += char(ch_pct, CUR_UV); #define _pct TEXT_MASK += char_px(ch_pct, CUR_UV);
#define _amp TEXT_MASK += char(ch_amp, CUR_UV); #define _amp TEXT_MASK += char_px(ch_amp, CUR_UV);
#define _apo TEXT_MASK += char(ch_apo, CUR_UV); #define _apo TEXT_MASK += char_px(ch_apo, CUR_UV);
#define _lbr TEXT_MASK += char(ch_lbr, CUR_UV); #define _lbr TEXT_MASK += char_px(ch_lbr, CUR_UV);
#define _rbr TEXT_MASK += char(ch_rbr, CUR_UV); #define _rbr TEXT_MASK += char_px(ch_rbr, CUR_UV);
#define _ast TEXT_MASK += char(ch_ast, CUR_UV); #define _ast TEXT_MASK += char_px(ch_ast, CUR_UV);
#define _crs TEXT_MASK += char(ch_crs, CUR_UV); #define _crs TEXT_MASK += char_px(ch_crs, CUR_UV);
#define _per TEXT_MASK += char(ch_per, CUR_UV); #define _per TEXT_MASK += char_px(ch_per, CUR_UV);
#define _dsh TEXT_MASK += char(ch_dsh, CUR_UV); #define _dsh TEXT_MASK += char_px(ch_dsh, CUR_UV);
#define _com TEXT_MASK += char(ch_com, CUR_UV); #define _com TEXT_MASK += char_px(ch_com, CUR_UV);
#define _lsl TEXT_MASK += char(ch_lsl, CUR_UV); #define _lsl TEXT_MASK += char_px(ch_lsl, CUR_UV);
#define _0 TEXT_MASK += char(ch_0, CUR_UV); #define _0 TEXT_MASK += char_px(ch_0, CUR_UV);
#define _1 TEXT_MASK += char(ch_1, CUR_UV); #define _1 TEXT_MASK += char_px(ch_1, CUR_UV);
#define _2 TEXT_MASK += char(ch_2, CUR_UV); #define _2 TEXT_MASK += char_px(ch_2, CUR_UV);
#define _3 TEXT_MASK += char(ch_3, CUR_UV); #define _3 TEXT_MASK += char_px(ch_3, CUR_UV);
#define _4 TEXT_MASK += char(ch_4, CUR_UV); #define _4 TEXT_MASK += char_px(ch_4, CUR_UV);
#define _5 TEXT_MASK += char(ch_5, CUR_UV); #define _5 TEXT_MASK += char_px(ch_5, CUR_UV);
#define _6 TEXT_MASK += char(ch_6, CUR_UV); #define _6 TEXT_MASK += char_px(ch_6, CUR_UV);
#define _7 TEXT_MASK += char(ch_7, CUR_UV); #define _7 TEXT_MASK += char_px(ch_7, CUR_UV);
#define _8 TEXT_MASK += char(ch_8, CUR_UV); #define _8 TEXT_MASK += char_px(ch_8, CUR_UV);
#define _9 TEXT_MASK += char(ch_9, CUR_UV); #define _9 TEXT_MASK += char_px(ch_9, CUR_UV);
#define _col TEXT_MASK += char(ch_col, CUR_UV); #define _col TEXT_MASK += char_px(ch_col, CUR_UV);
#define _scl TEXT_MASK += char(ch_scl, CUR_UV); #define _scl TEXT_MASK += char_px(ch_scl, CUR_UV);
#define _les TEXT_MASK += char(ch_les, CUR_UV); #define _les TEXT_MASK += char_px(ch_les, CUR_UV);
#define _equ TEXT_MASK += char(ch_equ, CUR_UV); #define _equ TEXT_MASK += char_px(ch_equ, CUR_UV);
#define _grt TEXT_MASK += char(ch_grt, CUR_UV); #define _grt TEXT_MASK += char_px(ch_grt, CUR_UV);
#define _que TEXT_MASK += char(ch_que, CUR_UV); #define _que TEXT_MASK += char_px(ch_que, CUR_UV);
#define _ats TEXT_MASK += char(ch_ats, CUR_UV); #define _ats TEXT_MASK += char_px(ch_ats, CUR_UV);
#define _A TEXT_MASK += char(ch_A, CUR_UV); #define _A TEXT_MASK += char_px(ch_A, CUR_UV);
#define _B TEXT_MASK += char(ch_B, CUR_UV); #define _B TEXT_MASK += char_px(ch_B, CUR_UV);
#define _C TEXT_MASK += char(ch_C, CUR_UV); #define _C TEXT_MASK += char_px(ch_C, CUR_UV);
#define _D TEXT_MASK += char(ch_D, CUR_UV); #define _D TEXT_MASK += char_px(ch_D, CUR_UV);
#define _E TEXT_MASK += char(ch_E, CUR_UV); #define _E TEXT_MASK += char_px(ch_E, CUR_UV);
#define _F TEXT_MASK += char(ch_F, CUR_UV); #define _F TEXT_MASK += char_px(ch_F, CUR_UV);
#define _G TEXT_MASK += char(ch_G, CUR_UV); #define _G TEXT_MASK += char_px(ch_G, CUR_UV);
#define _H TEXT_MASK += char(ch_H, CUR_UV); #define _H TEXT_MASK += char_px(ch_H, CUR_UV);
#define _I TEXT_MASK += char(ch_I, CUR_UV); #define _I TEXT_MASK += char_px(ch_I, CUR_UV);
#define _J TEXT_MASK += char(ch_J, CUR_UV); #define _J TEXT_MASK += char_px(ch_J, CUR_UV);
#define _K TEXT_MASK += char(ch_K, CUR_UV); #define _K TEXT_MASK += char_px(ch_K, CUR_UV);
#define _L TEXT_MASK += char(ch_L, CUR_UV); #define _L TEXT_MASK += char_px(ch_L, CUR_UV);
#define _M TEXT_MASK += char(ch_M, CUR_UV); #define _M TEXT_MASK += char_px(ch_M, CUR_UV);
#define _N TEXT_MASK += char(ch_N, CUR_UV); #define _N TEXT_MASK += char_px(ch_N, CUR_UV);
#define _O TEXT_MASK += char(ch_O, CUR_UV); #define _O TEXT_MASK += char_px(ch_O, CUR_UV);
#define _P TEXT_MASK += char(ch_P, CUR_UV); #define _P TEXT_MASK += char_px(ch_P, CUR_UV);
#define _Q TEXT_MASK += char(ch_Q, CUR_UV); #define _Q TEXT_MASK += char_px(ch_Q, CUR_UV);
#define _R TEXT_MASK += char(ch_R, CUR_UV); #define _R TEXT_MASK += char_px(ch_R, CUR_UV);
#define _S TEXT_MASK += char(ch_S, CUR_UV); #define _S TEXT_MASK += char_px(ch_S, CUR_UV);
#define _T TEXT_MASK += char(ch_T, CUR_UV); #define _T TEXT_MASK += char_px(ch_T, CUR_UV);
#define _U TEXT_MASK += char(ch_U, CUR_UV); #define _U TEXT_MASK += char_px(ch_U, CUR_UV);
#define _V TEXT_MASK += char(ch_V, CUR_UV); #define _V TEXT_MASK += char_px(ch_V, CUR_UV);
#define _W TEXT_MASK += char(ch_W, CUR_UV); #define _W TEXT_MASK += char_px(ch_W, CUR_UV);
#define _X TEXT_MASK += char(ch_X, CUR_UV); #define _X TEXT_MASK += char_px(ch_X, CUR_UV);
#define _Y TEXT_MASK += char(ch_Y, CUR_UV); #define _Y TEXT_MASK += char_px(ch_Y, CUR_UV);
#define _Z TEXT_MASK += char(ch_Z, CUR_UV); #define _Z TEXT_MASK += char_px(ch_Z, CUR_UV);
#define _lsb TEXT_MASK += char(ch_lsb, CUR_UV); #define _lsb TEXT_MASK += char_px(ch_lsb, CUR_UV);
#define _rsl TEXT_MASK += char(ch_rsl, CUR_UV); #define _rsl TEXT_MASK += char_px(ch_rsl, CUR_UV);
#define _rsb TEXT_MASK += char(ch_rsb, CUR_UV); #define _rsb TEXT_MASK += char_px(ch_rsb, CUR_UV);
#define _pow TEXT_MASK += char(ch_pow, CUR_UV); #define _pow TEXT_MASK += char_px(ch_pow, CUR_UV);
#define _usc TEXT_MASK += char(ch_usc, CUR_UV); #define _usc TEXT_MASK += char_px(ch_usc, CUR_UV);
#define _a TEXT_MASK += char(ch_a, CUR_UV); #define _a TEXT_MASK += char_px(ch_a, CUR_UV);
#define _b TEXT_MASK += char(ch_b, CUR_UV); #define _b TEXT_MASK += char_px(ch_b, CUR_UV);
#define _c TEXT_MASK += char(ch_c, CUR_UV); #define _c TEXT_MASK += char_px(ch_c, CUR_UV);
#define _d TEXT_MASK += char(ch_d, CUR_UV); #define _d TEXT_MASK += char_px(ch_d, CUR_UV);
#define _e TEXT_MASK += char(ch_e, CUR_UV); #define _e TEXT_MASK += char_px(ch_e, CUR_UV);
#define _f TEXT_MASK += char(ch_f, CUR_UV); #define _f TEXT_MASK += char_px(ch_f, CUR_UV);
#define _g TEXT_MASK += char(ch_g, CUR_UV); #define _g TEXT_MASK += char_px(ch_g, CUR_UV);
#define _h TEXT_MASK += char(ch_h, CUR_UV); #define _h TEXT_MASK += char_px(ch_h, CUR_UV);
#define _i TEXT_MASK += char(ch_i, CUR_UV); #define _i TEXT_MASK += char_px(ch_i, CUR_UV);
#define _j TEXT_MASK += char(ch_j, CUR_UV); #define _j TEXT_MASK += char_px(ch_j, CUR_UV);
#define _k TEXT_MASK += char(ch_k, CUR_UV); #define _k TEXT_MASK += char_px(ch_k, CUR_UV);
#define _l TEXT_MASK += char(ch_l, CUR_UV); #define _l TEXT_MASK += char_px(ch_l, CUR_UV);
#define _m TEXT_MASK += char(ch_m, CUR_UV); #define _m TEXT_MASK += char_px(ch_m, CUR_UV);
#define _n TEXT_MASK += char(ch_n, CUR_UV); #define _n TEXT_MASK += char_px(ch_n, CUR_UV);
#define _o TEXT_MASK += char(ch_o, CUR_UV); #define _o TEXT_MASK += char_px(ch_o, CUR_UV);
#define _p TEXT_MASK += char(ch_p, CUR_UV); #define _p TEXT_MASK += char_px(ch_p, CUR_UV);
#define _q TEXT_MASK += char(ch_q, CUR_UV); #define _q TEXT_MASK += char_px(ch_q, CUR_UV);
#define _r TEXT_MASK += char(ch_r, CUR_UV); #define _r TEXT_MASK += char_px(ch_r, CUR_UV);
#define _s TEXT_MASK += char(ch_s, CUR_UV); #define _s TEXT_MASK += char_px(ch_s, CUR_UV);
#define _t TEXT_MASK += char(ch_t, CUR_UV); #define _t TEXT_MASK += char_px(ch_t, CUR_UV);
#define _u TEXT_MASK += char(ch_u, CUR_UV); #define _u TEXT_MASK += char_px(ch_u, CUR_UV);
#define _v TEXT_MASK += char(ch_v, CUR_UV); #define _v TEXT_MASK += char_px(ch_v, CUR_UV);
#define _w TEXT_MASK += char(ch_w, CUR_UV); #define _w TEXT_MASK += char_px(ch_w, CUR_UV);
#define _x TEXT_MASK += char(ch_x, CUR_UV); #define _x TEXT_MASK += char_px(ch_x, CUR_UV);
#define _y TEXT_MASK += char(ch_y, CUR_UV); #define _y TEXT_MASK += char_px(ch_y, CUR_UV);
#define _z TEXT_MASK += char(ch_z, CUR_UV); #define _z TEXT_MASK += char_px(ch_z, CUR_UV);
#define _lpa TEXT_MASK += char(ch_lpa, CUR_UV); #define _lpa TEXT_MASK += char_px(ch_lpa, CUR_UV);
#define _bar TEXT_MASK += char(ch_bar, CUR_UV); #define _bar TEXT_MASK += char_px(ch_bar, CUR_UV);
#define _rpa TEXT_MASK += char(ch_rpa, CUR_UV); #define _rpa TEXT_MASK += char_px(ch_rpa, CUR_UV);
#define _tid TEXT_MASK += char(ch_tid, CUR_UV); #define _tid TEXT_MASK += char_px(ch_tid, CUR_UV);
#define _lar TEXT_MASK += char(ch_lar, CUR_UV); #define _lar TEXT_MASK += char_px(ch_lar, CUR_UV);
vec2 res; vec2 res;
vec2 print_pos = vec2(0); vec2 print_pos = vec2(0);
@ -327,7 +327,7 @@ float sprite(vec2 spr, vec2 size, vec2 uv)
} }
//Prints a character and moves the print position forward by 1 character width. //Prints a character and moves the print position forward by 1 character width.
float char(vec2 ch, vec2 uv) float char_px(vec2 ch, vec2 uv)
{ {
float px = sprite(ch, CHAR_SIZE, uv - print_pos); float px = sprite(ch, CHAR_SIZE, uv - print_pos);
print_pos.x += CHAR_SPACING.x; print_pos.x += CHAR_SPACING.x;
@ -388,7 +388,7 @@ float print_integer(float number, int zeros, vec2 uv)
if(abs(number) > pow(10.0, float(i)) || zeros > i || i == 0) //Clip off leading zeros. if(abs(number) > pow(10.0, float(i)) || zeros > i || i == 0) //Clip off leading zeros.
{ {
result += char(get_digit(digit), uv); result += char_px(get_digit(digit), uv);
} }
} }
return result; return result;
@ -558,9 +558,9 @@ float DrawResolutions(vec2 uv, vec2 viewport_size, vec2 screen_size, vec2 dereze
print_pos.y += STRHEIGHT(1); print_pos.y += STRHEIGHT(1);
// Version // Version
_1 _per _4 _per _3 _spc _1 _per _5 _per _0 _spc
// Date // Date
_2 _0 _2 _2 _dsh _1 _0 _dsh _0 _9 _2 _0 _2 _2 _dsh _1 _0 _dsh _1 _1
// Line 01 Title ---------------------------------------------------------- // Line 01 Title ----------------------------------------------------------
print_pos.x = margin; print_pos.x = margin;

View file

@ -23,7 +23,10 @@
layout(push_constant) uniform Push layout(push_constant) uniform Push
{ {
float GDV_AFTERGLOW_THRESHOLD; vec4 SourceSize;
vec4 OriginalSize;
vec4 OutputSize;
uint FrameCount;
float PR, PG, PB; float PR, PG, PB;
} params; } params;
@ -69,13 +72,23 @@ layout(set = 0, binding = 3) uniform sampler2D AfterglowPassFeedback;
void main() void main()
{ {
vec3 color = COMPAT_TEXTURE(PreCRTPass, TEX0.xy).rgb; vec2 dx = vec2(params.OriginalSize.z, 0.0);
vec2 dy = vec2(0.0, params.OriginalSize.w);
vec3 color0 = COMPAT_TEXTURE(PreCRTPass, TEX0.xy).rgb;
vec3 color1 = COMPAT_TEXTURE(PreCRTPass, TEX0.xy - dx).rgb;
vec3 color2 = COMPAT_TEXTURE(PreCRTPass, TEX0.xy + dx).rgb;
vec3 color3 = COMPAT_TEXTURE(PreCRTPass, TEX0.xy - dy).rgb;
vec3 color4 = COMPAT_TEXTURE(PreCRTPass, TEX0.xy + dy).rgb;
vec3 color = (2.5 * color0 + color1 + color2 + color3 + color4)/6.5;
vec3 accumulate = COMPAT_TEXTURE(AfterglowPassFeedback, TEX0.xy).rgb; vec3 accumulate = COMPAT_TEXTURE(AfterglowPassFeedback, TEX0.xy).rgb;
float w = 1.0; float w = 1.0;
if ((color.r + color.g + color.b < 5.0/255.0)) { w = 0.0; } if ((color0.r + color0.g + color0.b < 5.0/255.0)) { w = 0.0; }
vec3 result = mix( max(mix(color, accumulate, 0.49 + vec3(PR, PG, PB))- 3.0/255.0, 0.0), color, w); vec3 result = mix( max(mix(color, accumulate, 0.49 + vec3(PR, PG, PB))- 2.0/255.0, 0.0), color, w);
FragColor = vec4(result, w); FragColor = vec4(result, w);
} }

View file

@ -52,7 +52,7 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord * 1.0001; vTexCoord = TexCoord * 1.00001;
} }
#pragma stage fragment #pragma stage fragment

View file

@ -39,7 +39,7 @@ layout(push_constant) uniform Push
#pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05 #pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05
#define bloom_dist global.bloom_dist // bloom effect distribution #define bloom_dist global.bloom_dist // bloom effect distribution
#pragma parameter halation " Halation Strength -- halation" 0.0 0.0 2.0 0.025 #pragma parameter halation " Halation Strength -- halation" 0.0 -2.0 2.0 0.025
#define halation params.halation // halation effect #define halation params.halation // halation effect
#pragma parameter SIZEHB " Horizontal Radius ( Num Samples ) -- SIZEHB" 3.0 1.0 50.0 1.0 #pragma parameter SIZEHB " Horizontal Radius ( Num Samples ) -- SIZEHB" 3.0 1.0 50.0 1.0

View file

@ -77,7 +77,7 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord * 1.0001; vTexCoord = TexCoord * 1.00001;
} }
#pragma stage fragment #pragma stage fragment

View file

@ -68,7 +68,7 @@ layout(push_constant) uniform Push
#pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05 #pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05
#define bloom_dist global.bloom_dist // bloom effect distribution #define bloom_dist global.bloom_dist // bloom effect distribution
#pragma parameter halation " Halation Strength -- halation" 0.0 0.0 2.0 0.025 #pragma parameter halation " Halation Strength -- halation" 0.0 -2.0 2.0 0.025
#define halation global.halation // halation effect #define halation global.halation // halation effect
#pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02 #pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02
@ -103,7 +103,7 @@ layout(push_constant) uniform Push
#pragma parameter vertmask " Scanline Color Deconvergence -- vertmask" 0.0 -1.0 1.0 0.1 #pragma parameter vertmask " Scanline Color Deconvergence -- vertmask" 0.0 -1.0 1.0 0.1
#define vertmask global.vertmask // Scanline deconvergence colors #define vertmask global.vertmask // Scanline deconvergence colors
#pragma parameter scans " Scanline Saturation / Mask Falloff -- scans" 0.60 0.0 2.5 0.05 #pragma parameter scans " Scanline Saturation / Mask Falloff -- scans" 0.40 0.0 3.5 0.05
#define scans global.scans // scanline saturation #define scans global.scans // scanline saturation
#pragma parameter scan_falloff " Scanline Falloff -- scan_falloff" 1.0 0.25 2.0 0.05 #pragma parameter scan_falloff " Scanline Falloff -- scan_falloff" 1.0 0.25 2.0 0.05
@ -167,7 +167,7 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord * 1.0001; vTexCoord = TexCoord * 1.00001;
} }
#pragma stage fragment #pragma stage fragment
@ -401,13 +401,11 @@ if (!interb)
float mc1 = max(max(color1.r,color1.g),color1.b) + eps; float mc1 = max(max(color1.r,color1.g),color1.b) + eps;
float mc2 = max(max(color2.r,color2.g),color2.b) + eps; float mc2 = max(max(color2.r,color2.g),color2.b) + eps;
cref1 = color1 / mc1; cref1=cref1*cref1; cref1*=cref1; cref1 = color1 / mc1;
cref2 = color2 / mc2; cref2=cref2*cref2; cref2*=cref2; cref2 = color2 / mc2;
w1 = max( mix(w1*mix(one, cref1, scans), w1, wf1*min((1.0+0.15*scans), 1.2)), 0.0); w1 = min(w1*color1, mc1)/(color1 + eps); w1 = pow(w1, mix(2.0*scans.xxx + 1.0, 1.0.xxx, cref1))*mix(1.0.xxx + 0.075*scans, 1.0.xxx, cref1);
w2 = max( mix(w2*mix(one, cref2, scans), w2, wf2*min((1.0+0.15*scans), 1.2)), 0.0); w2 = min(w2*color2, mc2)/(color2 + eps); w2 = pow(w2, mix(2.0*scans.xxx + 1.0, 1.0.xxx, cref2))*mix(1.0.xxx + 0.075*scans, 1.0.xxx, cref2);
// Scanline Deconvergence
vec3 cd1 = one; vec3 cd2 = one; float vm = sqrt(abs(vertmask)); vec3 cd1 = one; vec3 cd2 = one; float vm = sqrt(abs(vertmask));

View file

@ -1,7 +0,0 @@
#version 450
#include "../base/common/globals-and-screen-scale-params.inc"
#include "../base/common/common-functions.inc"
#include "../base/common/params-2-bezel.inc"
#include "../base/common/common-functions-bezel.inc"
#include "hsm-crt-guest-advanced.inc"

View file

@ -39,7 +39,7 @@
#pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05 #pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05
#define bloom_dist global.bloom_dist // bloom effect distribution #define bloom_dist global.bloom_dist // bloom effect distribution
#pragma parameter halation " Halation Strength -- halation" 0.0 0.0 2.0 0.025 #pragma parameter halation " Halation Strength -- halation" 0.0 -2.0 2.0 0.025
#define halation global.halation // halation effect #define halation global.halation // halation effect
#pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02 #pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02
@ -74,7 +74,7 @@
#pragma parameter vertmask " Scanline Color Deconvergence -- vertmask" 0.0 -1.0 1.0 0.1 #pragma parameter vertmask " Scanline Color Deconvergence -- vertmask" 0.0 -1.0 1.0 0.1
#define vertmask global.vertmask // Scanline deconvergence colors #define vertmask global.vertmask // Scanline deconvergence colors
#pragma parameter scans " Scanline Saturation / Mask Falloff -- scans" 0.60 0.0 2.5 0.05 #pragma parameter scans " Scanline Saturation / Mask Falloff -- scans" 0.4 0.0 3.5 0.05
#define scans global.scans // scanline saturation #define scans global.scans // scanline saturation
#pragma parameter scan_falloff " Scanline Falloff -- scan_falloff" 1.0 0.25 2.0 0.05 #pragma parameter scan_falloff " Scanline Falloff -- scan_falloff" 1.0 0.25 2.0 0.05
@ -164,7 +164,7 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord * 1.0001; vTexCoord = TexCoord * 1.00001;
} }
#pragma stage fragment #pragma stage fragment
@ -542,11 +542,11 @@ if (!interb)
float mc1 = max(max(color1.r,color1.g),color1.b) + eps; float mc1 = max(max(color1.r,color1.g),color1.b) + eps;
float mc2 = max(max(color2.r,color2.g),color2.b) + eps; float mc2 = max(max(color2.r,color2.g),color2.b) + eps;
cref1 = color1 / mc1; cref1=cref1*cref1; cref1*=cref1; cref1 = color1 / mc1;
cref2 = color2 / mc2; cref2=cref2*cref2; cref2*=cref2; cref2 = color2 / mc2;
w1 = max( mix(w1*mix(one, cref1, scans), w1, wf1*min((1.0+0.15*scans), 1.2)), 0.0); w1 = min(w1*color1, mc1)/(color1 + eps); w1 = pow(w1, mix(2.0*scans.xxx + 1.0, 1.0.xxx, cref1))*mix(1.0.xxx + 0.075*scans, 1.0.xxx, cref1);
w2 = max( mix(w2*mix(one, cref2, scans), w2, wf2*min((1.0+0.15*scans), 1.2)), 0.0); w2 = min(w2*color2, mc2)/(color2 + eps); w2 = pow(w2, mix(2.0*scans.xxx + 1.0, 1.0.xxx, cref2))*mix(1.0.xxx + 0.075*scans, 1.0.xxx, cref2);
// Scanline Deconvergence // Scanline Deconvergence

View file

@ -36,7 +36,7 @@
#pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05 #pragma parameter bloom_dist " Bloom Distribution -- bloom_dist" 0.0 0.0 3.0 0.05
#define bloom_dist global.bloom_dist // bloom effect distribution #define bloom_dist global.bloom_dist // bloom effect distribution
#pragma parameter halation " Halation Strength -- halation" 0.0 0.0 2.0 0.025 #pragma parameter halation " Halation Strength -- halation" 0.0 -2.0 2.0 0.025
#define halation global.halation // halation effect #define halation global.halation // halation effect
#pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02 #pragma parameter gamma_c " Gamma Correct -- gamma_c" 1.0 0.50 2.0 0.02
@ -202,7 +202,7 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord * 1.0001; vTexCoord = TexCoord * 1.00001;
} }
#pragma stage fragment #pragma stage fragment
@ -705,11 +705,11 @@ void main()
if (mask_bloom > 0.025) if (mask_bloom > 0.025)
{ {
float maxb = max(max(Bloom.r,Bloom.g),Bloom.b); float maxb = max(max(Bloom.r,Bloom.g),Bloom.b);
maxb = pow(sqrt(maxb*mix(maxb, colmx, 0.75)),0.275); maxb = pow(sqrt(maxb*mix(maxb, colmx, 0.75)),0.325);
vec3 mBloom = 0.5*(1.5*Bloom+0.5*maxb) * mix(1.0, 2.0-colmx, (bloom_dist + 0.5)); vec3 mBloom = 0.5*(1.4*Bloom+0.6*maxb) * mix(1.0, 2.0-colmx, (bloom_dist + 0.5));
float maskmx = 1.0; if (shadowMask > 0.5 || shadowMask < 4.5) maskmx = maskLight; else if (shadowMask > 6.5 && shadowMask < 10.5) maskmx = 1.0; else maskmx = max(max(cmask.r,cmask.g),cmask.b); float maskmx = 1.0; if (shadowMask > 0.5 || shadowMask < 4.5) maskmx = maskLight; else if (shadowMask > 6.5 && shadowMask < 10.5) maskmx = 1.0; else maskmx = max(max(cmask.r,cmask.g),cmask.b);
cmask = min(cmask + maxb*mBloom*mask_bloom, maskmx); cmask = min(cmask + maxb*mBloom*mask_bloom, maskmx);
smask = min(smask + 0.9*maxb*max(max(mBloom.r,mBloom.g),mBloom.b)*mask_bloom, 1.0); smask = min(smask + maxb*max(max(mBloom.r,mBloom.g),mBloom.b)*mask_bloom, 1.0);
} }
color = pow(color, vec3(mask_gamma/gamma_in)); color = pow(color, vec3(mask_gamma/gamma_in));
@ -726,14 +726,14 @@ void main()
color*=bb; color*=bb;
/* HSM Removed /* HSM Removed
vec3 Glow = COMPAT_TEXTURE(GlowPass, pos).rgb;
vec3 Ref = COMPAT_TEXTURE(LinearizePass, pos).rgb; vec3 Ref = COMPAT_TEXTURE(LinearizePass, pos).rgb;
vec3 Glow = COMPAT_TEXTURE(GlowPass, pos).rgb;
float maxb = COMPAT_TEXTURE(BloomPass, pos).a; float maxb = COMPAT_TEXTURE(BloomPass, pos).a;
float vig = COMPAT_TEXTURE(PrePass, clamp(pos, 0.0+0.5*global.OriginalSize.zw, 1.0-0.5*global.OriginalSize.zw)).a; float vig = COMPAT_TEXTURE(PrePass, clamp(pos, 0.0+0.5*global.OriginalSize.zw, 1.0-0.5*global.OriginalSize.zw)).a;
*/ */
vec3 Glow = HSM_GetCroppedTexSample(GlowPass, pos).rgb;
vec3 Ref = HSM_GetCroppedTexSample(LinearizePass, pos).rgb; vec3 Ref = HSM_GetCroppedTexSample(LinearizePass, pos).rgb;
vec3 Glow = HSM_GetCroppedTexSample(GlowPass, pos).rgb;
float maxb = HSM_GetCroppedTexSample(BloomPass, pos).a; float maxb = HSM_GetCroppedTexSample(BloomPass, pos).a;
vec3 Bloom1 = Bloom; vec3 Bloom1 = Bloom;
@ -754,7 +754,11 @@ void main()
if (halation > 0.01) { if (halation > 0.01) {
Bloom = mix(0.5*(Bloom + Bloom*Bloom), 0.75*Bloom*Bloom, colmx); Bloom = mix(0.5*(Bloom + Bloom*Bloom), 0.75*Bloom*Bloom, colmx);
color = color + 2.0*max((2.0*mix(maxb*maxb, maxb, colmx)-0.5*max(max(Ref.r,Ref.g),Ref.b)),0.25)*mix(1.0,w3,0.5*colmx)*mix(one,cmask,0.6)*Bloom*halation; } color = color + 2.0*max((2.0*mix(maxb*maxb, maxb, colmx)-0.5*max(max(Ref.r,Ref.g),Ref.b)),0.25)*mix(1.0,w3,0.5*colmx)*mix(one,cmask,0.6)*Bloom*halation; }
else
if (halation < 0.01) {
float mbl = max(max(Bloom.r,Bloom.g),Bloom.b);
Bloom = plant(Bloom + Ref + orig1 + Bloom*Bloom*Bloom, min(mbl*mbl,0.75));
color = color + 2.0*mix(1.0,w3,0.5*colmx)*mix(one,cmask,0.5)*Bloom*(-halation); }
Glow = mix(Glow, 0.25*color, 0.7*colmx); Glow = mix(Glow, 0.25*color, 0.7*colmx);
if (glow >= 0.0) color = color + 0.5*Glow*glow; else { cmask*=cmask; cmask*=cmask; color = color + (-glow)*cmask*Glow; } if (glow >= 0.0) color = color + 0.5*Glow*glow; else { cmask*=cmask; cmask*=cmask; color = color + (-glow)*cmask*Glow; }

View file

@ -99,7 +99,7 @@ layout(location = 0) out vec2 vTexCoord;
void main() void main()
{ {
gl_Position = global.MVP * Position; gl_Position = global.MVP * Position;
vTexCoord = TexCoord * 1.0001; vTexCoord = TexCoord * 1.00001;
} }
#pragma stage fragment #pragma stage fragment

View file

@ -1 +1 @@
crt-guest-advanced-2022-07-27-release1 crt-guest-advanced-2022-10-11-release1

View file

@ -55,6 +55,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
*/ */
#include "../base/common/globals-and-screen-scale-params.inc" #include "../base/common/globals-and-screen-scale-params.inc"
#include "../base/common/helper-functions.inc"
#include "include/parameters.h" #include "include/parameters.h"