From decccf37cd323f7bd11bb5558168de8cbc5830b4 Mon Sep 17 00:00:00 2001 From: metallic77 <43163462+metallic77@users.noreply.github.com> Date: Fri, 10 Nov 2023 22:30:04 +0200 Subject: [PATCH] add DCI profiles (#346) * add DCI profiles * Update simple_color_controls.glslp * Update hatari.glslp --- misc/shaders/simple_color_controls.glsl | 24 +++++++-- misc/simple_color_controls.glslp | 5 +- presets/hatari.glslp | 66 +++++++++++++------------ 3 files changed, 59 insertions(+), 36 deletions(-) diff --git a/misc/shaders/simple_color_controls.glsl b/misc/shaders/simple_color_controls.glsl index 4d80e83..2b90820 100644 --- a/misc/shaders/simple_color_controls.glsl +++ b/misc/shaders/simple_color_controls.glsl @@ -139,6 +139,24 @@ uniform COMPAT_PRECISION float CS; #define CS 0.0 #endif +#if defined GL_ES + +mat3 PAL = mat3( +0.7954 , 0.1881 , 0.0053 , +-0.0310 , 1.0343 , -0.0044 , +-0.0236 , 0.1383 , 0.8927 ); + +mat3 NTSC = mat3( +0.6837 , 0.2635 , 0.0336 , +-0.0499 , 1.0323 , 0.0139 , +-0.0119 , 0.1071 , 0.9111 ); + +mat3 NTSC_J = mat3( +0.8642 , 0.1253 , 0.0030 , +0.0545 , 0.9513 , -0.0029 , +-0.0214 , 0.1554 , 0.8750 ); + +#else // standard 6500k mat3 PAL = mat3( 1.0740 , -0.0574 , -0.0119 , @@ -156,7 +174,7 @@ mat3 NTSC_J = mat3( 1.0185 , -0.0144 , -0.0029 , 0.0732 , 0.9369 , -0.0059 , -0.0318 , -0.0080 , 1.0353 ); - +#endif float saturate(float v) @@ -274,7 +292,7 @@ if (CS != 0.0){ if (CS == 3.0) col *= NTSC_J; col /= vec3(0.24,0.69,0.07); col *= vec3(0.29,0.60,0.11); - col = clamp(col,0.0,2.0); + col = clamp(col,0.0,2.0); } if (SEGA == 1.0) col *= 1.0625; @@ -295,7 +313,7 @@ float l = dot(col, lumw); vec3 c = vec3(R, G, B); col = colorize (col1, c); } - col *= hue; + //col *= hue; col *= mix(postdk,postbr,l); col = (contrastMatrix(contrast) * vec4(col,1.0)).rgb; diff --git a/misc/simple_color_controls.glslp b/misc/simple_color_controls.glslp index 42ac01c..cf3ed81 100644 --- a/misc/simple_color_controls.glslp +++ b/misc/simple_color_controls.glslp @@ -1,4 +1,7 @@ shaders = "1" shader0 = "shaders/simple_color_controls.glsl" filter_linear0 = "false" - +scale_type_x0 = "source" +scale_x0 = "1.000000" +scale_type_y0 = "source" +scale_y0 = "1.000000" diff --git a/presets/hatari.glslp b/presets/hatari.glslp index 03a2703..d5f05ba 100644 --- a/presets/hatari.glslp +++ b/presets/hatari.glslp @@ -1,43 +1,45 @@ -shaders = "6" +shaders = "7" feedback_pass = "0" -shader0 = "../stock.glsl" +shader0 = "../misc/shaders/simple_color_controls.glsl" filter_linear0 = "false" scale_type_x0 = "source" -scale_x0 = "0.500000" +scale_x0 = "1.0" scale_type_y0 = "source" -scale_y0 = "0.500000" -shader1 = "../misc/shaders/simple_color_controls.glsl" +scale_y0 = "1.0" +shader1 = "../stock.glsl" filter_linear1 = "false" +scale_type_x1 = "source" +scale_x1 = "0.500000" +scale_type_y1 = "source" +scale_y1 = "0.500000" shader2 = "../crt/shaders/crt-consumer/linearize.glsl" filter_linear2 = "false" +scale_type_x2 = "source" +scale_x2 = "1.000000" +scale_type_y2 = "source" +scale_y2 = "1.000000" shader3 = "../crt/shaders/crt-consumer/glow_x.glsl" filter_linear3 = "false" +scale_type_x3 = "source" +scale_x3 = "1.000000" +scale_type_y3 = "source" +scale_y3 = "1.000000" shader4 = "../crt/shaders/crt-consumer/glow_y.glsl" filter_linear4 = "false" -shader5 = "../crt/shaders/crt-sines.glsl" -filter_linear5 = "true" -TEMP = "6863.000000" -gamma_in = "1.000000" -BLACK = "0.030000" -SEGA = "1.000000" -gamma_out_red = "1.000000" -gamma_out_green = "1.000000" -gamma_out_blue = "1.000000" -gammain = "1.350000" -glow = "0.120000" -sizex = "2.000000" -sizey = "0.750000" -SHARPX = "0.200000" -interlacing = "0.000000" -SCANLOW = "0.700000" -SCANHIGH = "0.400000" -mask = "3.000000" -m_str = "0.400000" -RX = "0.400000" -RY = "0.150000" -GX = "-0.100000" -BX = "-0.400000" -BY = "-0.200000" -BOOST = "0.100000" -SAT = "1.150000" - +scale_type_x4 = "source" +scale_x4 = "1.000000" +scale_type_y4 = "source" +scale_y4 = "1.000000" +shader5 = "../crt/shaders/crt-consumer/resolve.glsl" +filter_linear5 = "false" +scale_type_x5 = "source" +scale_x5 = "1.000000" +scale_type_y5 = "source" +scale_y5 = "1.000000" +shader6 = "../crt/shaders/crt-Cyclon.glsl" +filter_linear6 = "true" +CS = "1.000000" +C_STR = "0.400000" +CONV_R = "0.500000" +CONV_G = "0.150000" +CONV_B = "0.350000"