From 6ea15072a718b093e3688d22f7f6954e44e383b6 Mon Sep 17 00:00:00 2001 From: ImJezze Date: Sun, 5 Jun 2016 23:50:44 +0200 Subject: [PATCH] Procedural texture for vectors in HLSL * added simple procedural texture for vectors with rounded line ends and beam smoothness * added optional -vector_beam_smooth option * removed -antialias option, antialiasing is now always applied, except for plain D3D --- .../dx11/chains/hlsl/fs_distortion.bin | Bin 3634 -> 3782 bytes .../shaders/dx9/chains/hlsl/fs_distortion.bin | Bin 2843 -> 2823 bytes .../gles/chains/hlsl/fs_distortion.bin | Bin 4939 -> 5285 bytes .../glsl/chains/hlsl/fs_distortion.bin | Bin 4707 -> 5035 bytes .../metal/chains/hlsl/fs_distortion.bin | Bin 5260 -> 5581 bytes docs/config.txt | 21 +- docs/hlsl.txt | 3 +- hlsl/distortion.fx | 21 +- hlsl/vector.fx | 50 ++++- ini/presets/vector-mono.ini | 4 +- ini/presets/vector.ini | 4 +- src/devices/video/vector.cpp | 2 +- src/emu/emuopts.cpp | 1 - src/emu/emuopts.h | 2 - src/emu/rendutil.cpp | 2 +- src/frontend/mame/ui/ui.cpp | 4 +- .../bgfx/shaders/chains/hlsl/fs_distortion.sc | 18 +- src/osd/modules/render/d3d/d3dhlsl.cpp | 7 +- src/osd/modules/render/d3d/d3dhlsl.h | 1 + src/osd/modules/render/drawbgfx.cpp | 7 + src/osd/modules/render/drawd3d.cpp | 208 +++++++++--------- src/osd/modules/render/drawogl.cpp | 22 +- src/osd/windows/winmain.cpp | 1 + src/osd/windows/winmain.h | 2 + 24 files changed, 217 insertions(+), 163 deletions(-) diff --git a/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin b/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin index 2e2b1813c8a83997f078daf6aa55318625a8d0b4..b86b2f303f971fb1f0605bd65d5c220ff4f9bd76 100644 GIT binary patch delta 737 zcmZWmu}T9`5S*CgVlG?~L=Y|!V?+xP(I}{Cyu^?~I|~tP#M*yIA~tsFfuG<9=m%H` z0XsX}^tNhap*wfG;n0O+_r00fH@o*x9nM~lDkHCR+}>-R7gzn4_xjb!>*vzPU?&A& zbo2d`&v-x}ht}hBs*>+*0fk$XUZQ zcF7QIQ!pDLiIF4r|LNk_f`B@+ZaQCkQ>U0e9w%up0>$3Ud{S~Ia)y)Etviy#pTfdn zLy;lM{Z_;Q?y}|nK+(#r zS>DMwkrmseWnwlzYa7shc}Mzke2G#7vf?kRBRtJahijg*NDU+To_Vl-et6=&{Q~Ix BIYs~g delta 515 zcmYjNze~eV5Wc4*F)v9Y9gHLqYD<@nwNO#P8jDjWk)nf(yV%t&3hv6$&Dph37jbbA z{1>{qJ9N@P7w?jH;#=OmyYIdq?`>_G-o7V;pnsh0e?FZ|pVfHhe)aok@luTx01WPa zUfhun(4$BC_^J~3bOXSx!ZI}gbY3fN`(N!)-39R4gjt~aD=e`qH#K@e(K|4EJSRTq z+VI6V_aclPKTti!!fpp(DZ|i zIyN^EYUz>bLX?GCG-q+avF*(4NEG>)K7b`N-s8i;GY;OA4lBtw39B%*a30Kl0pB?| ALI3~& diff --git a/bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin b/bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin index b12b9d953cf34c5de77cc41c70f854170c97ab98..a89c29f59b604d4be895967a3b38fbc67da4ef38 100644 GIT binary patch literal 2823 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 LxmPfdD8k2ISO52{ diff --git a/bgfx/shaders/gles/chains/hlsl/fs_distortion.bin b/bgfx/shaders/gles/chains/hlsl/fs_distortion.bin index 189ca2e97f5d44c666a1fe6fab992a7458848c03..b40b16a3052470aee0abbbccf56bec81a2effdee 100644 GIT binary patch delta 790 zcmZ{i%}T>S5XZ5CLX|eAp!Ew!1lg@=n$23%P?U-Xk6yfZ3aM2rn5L$wR76BCUWL7T z^8tJU^(^=bif`Zp2yT;Zq7nCykJMrnL;Zhn4AMto9!QA%o&UWJZAX?#(BXY8J8pJkBNJ4kO@KygfX#+kW(+bF!Ku`o{E=T0q<3<)fQYsROvXe( zOCdM00^}xC2k0mm=ouIonQBf}5R{($K|okj!%)vaUjtJo%qSz6mdS-eGJ;0ts4g_0 zJWoiD*;qkqawE6I+He<|YJznGy$uR6Xc!6z%eokuBfMd*36|AV&_&V* z^Z?8SW+>W0K>{_XP*|SPZ1O~5-N}apMfj6*5_1a_G&Eqc4~0X-j4XiWfK69WfP2wm P@*GYHCL@cS6ov5zp@NNVT`A}VE1jt|W-`_`hy_=^fUZOOBNm#bCTXciDf$G;Y~1+( zy747^4$%kENhXujsM#dBx#!&Pp3G_&`*|$I<6#X zsMk1X>(_)^_W}@-orll>P1P`ln=lKAWwl@xqH6m|FOGO7(CK-dKNZ|dOqqmalUzYf z^iT%d8UsoNo}kunNIEryhlDg@l;2*mr&@t%fw-r}=TW{}SjYSluCqslMzoO&)%Yaa zTIY-iMRr!xOX4Ezc2%De47+hobzBJ(6z1YD2fWC;a(!vic6^XrRErm;5)Sre{5ZDU z%7~Z~TmG~VoTF-PYtCTjxzaWzKhmOvPjB@sdk`!Uow}#onZ`eq(;0;|#6#i$NaweB NG$l;UY_LXt=NofQ{g?m% delta 529 zcmZ3j{#a$g1ExB`jgOjmdD3$76H645@+;zv3@2|C5)L#nvgT3%f|A^Vvc#fzBO?V{ zh1|?M1&z}9;@tfFl8pGI{Gyc9BE1S7h0^$<{L;LX_~iVeJdlVcL~B`UvJqUr@#Gnt z>XYjQI2es5FXGb!k{9_@Chrwuw=^E!i7qLYOML;^Gn^$heiFg3zVGJ@&Q1OhDH zF-LW?`Q%lCa?HjGT9Y4gNlbn$D4}Sqsh|yav#BQ7IH*C;P?iyrbultWc+6ZA9N?M? zx=8wf9)dZ^3`ILAke~+D3du8?O`a>HKKYh_2!C=;Vs3$gh6YUbxlo9hkp<8ku;~g4 Xa6em24iuJPGP0Pg$0cv1VxAg z7Y;pjpQH}}FM!}3cmkyM0bpW#ZEEnz8qfdF_s_0>v4>)I_h5fw{QB?H*w|g+PxfU- z4z{nLt9uH9_+y}Bd%UEeY*TN%J7RfKJzmg9G}*=c!tJ(PeE=(9=v5ZVPCCN&!E=Q0e=5gn_$gJ49c4o!vmcloiGgLV|NfkpUXJWJ z?Jm%iMJY`gL8RJnl8U`CvU|vpg}_c#xjrbxEnL5lFVlq|wUD}f0+g!8P1wP#24gS` zmISe?Hi}c$jkTngMKqVt>UgaW73d{D<>ur!l3z`PxC_S~08Jf1f>>knhR{Yh@4ZgZ zZj>ORjC*S6%`rewXN*aq6%1~MQ6n8UF-rhIX{5K0ykrSne*a=#aRx<|o*S$b>?QOG z4{o#&>Ycj2GHD7Q6bLutG~A46VD*h3aw?p1w8z92-jRbm delta 590 zcmX@B-J{9l7VN>o*!<}s14FIIMxOut>TfS@F|pe(T{-pEA3 zRv|YtPeCI-wb9 zDK33Zm{F#aeFaPzO(!=CXiw(hrBU~*b5kO;bS^$vmK4FgIIZ7z?z385pON-9+S=j4URniD*n- zBqYqAoRgSa0CGLV0h2d~=uQ4EBrFFLhZ<;X0P+Z&Gnrphfze>HfoM33p{AzwWJeC^ I$;(950guYB*Z=?k diff --git a/docs/config.txt b/docs/config.txt index 9561ee96ef5..25ba9844386 100644 --- a/docs/config.txt +++ b/docs/config.txt @@ -876,18 +876,21 @@ Core screen options Core vector options ------------------- --[no]antialias / -[no]aa +-beam_width_min +-beam_width_max - Enables antialiased line rendering for vector games. The default is ON - (-antialias). - --beam - - Sets the width of the vectors. This is a scaling factor against the - standard vector width. A value of 1.0 will keep the default vector - line width. Smaller values will reduce the width, and larger values + Sets the minimum and maximum width of the vectors. This is a scaling factor + against the standard vector width, which is interpolated between minimum and + maximum according to the beam's intensity. A value of 1.0 will keep the default + vector line width. Smaller values will reduce the width, and larger values will increase the width. The default is 1.0. +-beam_intensity_weight + + Applies an exponential weight to the minimum and maximum beam width. For positive + values the interpolated scaling factor will affect lines with higher intensity + more than lines with lower intensity. The default is 0.0. + -flicker Simulates a vector "flicker" effect, similar to a vector monitor that diff --git a/docs/hlsl.txt b/docs/hlsl.txt index 55a833d203a..00facb0649a 100644 --- a/docs/hlsl.txt +++ b/docs/hlsl.txt @@ -97,6 +97,7 @@ yiq_phase_count 2 Phase Count value for NTSC signal proces Vector Post-Processing Options ------------------------------ Name Default Values Description +vector_beam_smooth 0.0 The vector beam smoothness. (0.00 to 1.00) vector_length_scale 0.5 The maximum vector attenuation. (0.00 to 1.00) vector_length_ratio 0.5 The minimum vector length (vector length to screen size ratio) that is affected by the attenuation (0.000 to 1.000) @@ -115,7 +116,7 @@ bloom_lvl3_weight 0.16 Bloom level 3 weight. (1/4 smaller that bloom_lvl4_weight 0.08 Bloom level 4 weight. (1/4 smaller that level 3 target) (0.00 to 1.00) bloom_lvl5_weight 0.06 Bloom level 5 weight. (1/4 smaller that level 4 target) (0.00 to 1.00) bloom_lvl6_weight 0.04 Bloom level 6 weight. (1/4 smaller that level 5 target) (0.00 to 1.00) -bloom_lvl7_weight 0.02 Bloom level 7 weight. (1/4 smaller that level 6 target) +bloom_lvl7_weight 0.02 Bloom level 7 weight. (1/4 smaller that level 6 target) (0.00 to 1.00) bloom_lvl8_weight 0.01 Bloom level 8 weight. (1/4 smaller that level 7 target) (0.00 to 1.00) diff --git a/hlsl/distortion.fx b/hlsl/distortion.fx index bd78efde8c5..1ee1641e646 100644 --- a/hlsl/distortion.fx +++ b/hlsl/distortion.fx @@ -170,22 +170,18 @@ float GetSpotAddend(float2 coord, float amount) return saturate(SigmoidSpot); } -float GetRoundCornerFactor(float2 coord, float radiusAmount, float smoothAmount) +float GetRoundCornerFactor(float2 coord, float2 bounds, float radiusAmount, float smoothAmount) { // reduce smooth amount down to radius amount smoothAmount = min(smoothAmount, radiusAmount); - float2 quadDims = QuadDims; - quadDims = SwapXY - ? quadDims.yx - : quadDims.xy; - - float range = min(quadDims.x, quadDims.y) * 0.5; - float radius = range * max(radiusAmount, 0.0025f); - float smooth = 1.0 / (range * max(smoothAmount, 0.0025f)); + float range = min(bounds.x, bounds.y); + float amountMinimum = range > 0.0f ? 1.0f / range : 0.0f; + float radius = range * max(radiusAmount, amountMinimum); + float smooth = 1.0f / (range * max(smoothAmount, amountMinimum * 3.0f)); // compute box - float box = roundBox(quadDims * (coord * 2.0f), quadDims, radius); + float box = roundBox(bounds * (coord * 2.0f), bounds, radius); // apply smooth box *= smooth; @@ -279,8 +275,11 @@ float4 ps_main(PS_INPUT Input) : COLOR // Round Corners Simulation float2 RoundCornerCoord = CornerCoordCentered; + float2 RoundCornerBounds = SwapXY + ? QuadDims.yx + : QuadDims.xy; - float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, RoundCornerAmount, SmoothBorderAmount); + float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, RoundCornerBounds, RoundCornerAmount * 0.5f, SmoothBorderAmount * 0.5f); BaseColor.rgb *= roundCornerFactor; return BaseColor; diff --git a/hlsl/vector.fx b/hlsl/vector.fx index 95957d57c80..71d53d030bc 100644 --- a/hlsl/vector.fx +++ b/hlsl/vector.fx @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Ryan Holtz +// copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- // Vector Effect //----------------------------------------------------------------------------- @@ -13,7 +13,7 @@ struct VS_OUTPUT float4 Position : POSITION; float4 Color : COLOR0; float2 TexCoord : TEXCOORD0; - float2 LineInfo : TEXCOORD1; + float2 SizeInfo : TEXCOORD1; }; struct VS_INPUT @@ -21,16 +21,26 @@ struct VS_INPUT float3 Position : POSITION; float4 Color : COLOR0; float2 TexCoord : TEXCOORD0; - float2 LineInfo : TEXCOORD1; + float2 SizeInfo : TEXCOORD1; }; struct PS_INPUT { float4 Color : COLOR0; float2 TexCoord : TEXCOORD0; - float2 LineInfo : TEXCOORD1; // x is the line length, y is unused + float2 SizeInfo : TEXCOORD1; }; +//----------------------------------------------------------------------------- +// Functions +//----------------------------------------------------------------------------- + +// www.iquilezles.org/www/articles/distfunctions/distfunctions.htm +float roundBox(float2 p, float2 b, float r) +{ + return length(max(abs(p) - b + r, 0.0f)) - r; +} + //----------------------------------------------------------------------------- // Vector Vertex Shader //----------------------------------------------------------------------------- @@ -49,7 +59,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) Output.Position.xy *= 2.0f; // zoom Output.TexCoord = Input.TexCoord; - Output.LineInfo = Input.LineInfo; + Output.SizeInfo = Input.SizeInfo; Output.Color = Input.Color; @@ -64,10 +74,35 @@ uniform float TimeRatio; // Frame time of the vector (not set) uniform float TimeScale; // How much frame time affects the vector's fade (not set) uniform float LengthRatio; // Size at which fade is maximum uniform float LengthScale; // How much length affects the vector's fade +uniform float BeamSmooth; + +float GetRoundCornerFactor(float2 coord, float2 bounds, float radiusAmount, float smoothAmount) +{ + // reduce smooth amount down to radius amount + smoothAmount = min(smoothAmount, radiusAmount); + + float range = min(bounds.x, bounds.y); + float amountMinimum = range > 0.0f ? 1.0f / range : 0.0f; + float radius = range * max(radiusAmount, amountMinimum); + float smooth = 1.0f / (range * max(smoothAmount, amountMinimum * 3.0f)); + + // compute box + float box = roundBox(bounds * (coord * 2.0f), bounds, radius); + + // apply smooth + box *= smooth; + box += 1.0f - pow(smooth * 0.5f, 0.5f); + + float border = smoothstep(1.0f, 0.0f, box); + + return saturate(border); +} float4 ps_main(PS_INPUT Input) : COLOR { - float lineLength = Input.LineInfo.x / max(QuadDims.x, QuadDims.y); // normalize + float2 lineSize = Input.SizeInfo / max(QuadDims.x, QuadDims.y); // normalize + + float lineLength = lineSize.x; float lineLengthRatio = LengthRatio; float lineLengthScale = LengthScale; @@ -78,6 +113,9 @@ float4 ps_main(PS_INPUT Input) : COLOR float4 outColor = float4(timeLengthModulate, timeLengthModulate, timeLengthModulate, 1.0f); outColor *= Input.Color; + float RoundCornerFactor = GetRoundCornerFactor(Input.TexCoord - 0.5f, Input.SizeInfo, 1.0f, BeamSmooth); + outColor.rgb *= RoundCornerFactor; + return outColor; } diff --git a/ini/presets/vector-mono.ini b/ini/presets/vector-mono.ini index 1aa5f0915df..00ff7978f5d 100644 --- a/ini/presets/vector-mono.ini +++ b/ini/presets/vector-mono.ini @@ -6,8 +6,7 @@ gamma 0.50 # # CORE VECTOR OPTIONS # -antialias 1 -beam_width_min 0.75 +beam_width_min 1.00 beam_width_max 4.00 beam_intensity_weight 0.75 flicker 0.15 @@ -48,6 +47,7 @@ yiq_enable 0 # # VECTOR POST-PROCESSING OPTIONS # +vector_beam_smooth 0.0 vector_length_scale 0.5 vector_length_ratio 0.5 diff --git a/ini/presets/vector.ini b/ini/presets/vector.ini index 8422d816d8b..ea41036f3e5 100644 --- a/ini/presets/vector.ini +++ b/ini/presets/vector.ini @@ -1,8 +1,7 @@ # # CORE VECTOR OPTIONS # -antialias 1 -beam_width_min 0.75 +beam_width_min 1.00 beam_width_max 4.00 beam_intensity_weight 0.75 flicker 0.15 @@ -51,6 +50,7 @@ yiq_enable 0 # # VECTOR POST-PROCESSING OPTIONS # +vector_beam_smooth 0.0 vector_length_scale 0.5 vector_length_ratio 0.5 diff --git a/src/devices/video/vector.cpp b/src/devices/video/vector.cpp index 8606fe666aa..53286f3c623 100644 --- a/src/devices/video/vector.cpp +++ b/src/devices/video/vector.cpp @@ -145,7 +145,7 @@ void vector_device::clear_list(void) UINT32 vector_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - UINT32 flags = PRIMFLAG_ANTIALIAS(machine().options().antialias() ? 1 : 0) | PRIMFLAG_BLENDMODE(BLENDMODE_ADD) | PRIMFLAG_VECTOR(1); + UINT32 flags = PRIMFLAG_ANTIALIAS(1) | PRIMFLAG_BLENDMODE(BLENDMODE_ADD) | PRIMFLAG_VECTOR(1); const rectangle &visarea = screen.visible_area(); float xscale = 1.0f / (65536 * visarea.width()); float yscale = 1.0f / (65536 * visarea.height()); diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 1b99a55e1ba..dc799ca235b 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -120,7 +120,6 @@ const options_entry emu_options::s_option_entries[] = // vector options { nullptr, nullptr, OPTION_HEADER, "CORE VECTOR OPTIONS" }, - { OPTION_ANTIALIAS ";aa", "1", OPTION_BOOLEAN, "use antialiasing when drawing vectors" }, { OPTION_BEAM_WIDTH_MIN, "1.0", OPTION_FLOAT, "set vector beam width minimum" }, { OPTION_BEAM_WIDTH_MAX, "1.0", OPTION_FLOAT, "set vector beam width maximum" }, { OPTION_BEAM_INTENSITY_WEIGHT, "0", OPTION_FLOAT, "set vector beam intensity weight " }, diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index 2b6630d38dd..e3ae4bda6d8 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -108,7 +108,6 @@ #define OPTION_EFFECT "effect" // core vector options -#define OPTION_ANTIALIAS "antialias" #define OPTION_BEAM_WIDTH_MIN "beam_width_min" #define OPTION_BEAM_WIDTH_MAX "beam_width_max" #define OPTION_BEAM_INTENSITY_WEIGHT "beam_intensity_weight" @@ -295,7 +294,6 @@ public: const char *effect() const { return value(OPTION_EFFECT); } // core vector options - bool antialias() const { return bool_value(OPTION_ANTIALIAS); } float beam_width_min() const { return float_value(OPTION_BEAM_WIDTH_MIN); } float beam_width_max() const { return float_value(OPTION_BEAM_WIDTH_MAX); } float beam_intensity_weight() const { return float_value(OPTION_BEAM_INTENSITY_WEIGHT); } diff --git a/src/emu/rendutil.cpp b/src/emu/rendutil.cpp index ee78ad5125d..8fa5b1b7046 100644 --- a/src/emu/rendutil.cpp +++ b/src/emu/rendutil.cpp @@ -535,7 +535,7 @@ void render_line_to_quad(const render_bounds *bounds, float width, float length_ bounds1->x0 = modbounds.x1 - unity; bounds1->y0 = modbounds.y1 + unitx; - /* rotate the unit vector by -09 degrees and add to point 1 */ + /* rotate the unit vector by -90 degrees and add to point 1 */ bounds1->x1 = modbounds.x1 + unity; bounds1->y1 = modbounds.y1 - unitx; } diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 4f0f6be9a83..d1999a1ce16 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -2015,8 +2015,8 @@ std::vector mame_ui_manager::slider_init(running_machine &machine { // add vector control sliders.push_back(slider_alloc(machine, SLIDER_ID_FLICKER + slider_index, _("Vector Flicker"), 0, 0, 1000, 10, nullptr)); - sliders.push_back(slider_alloc(machine, SLIDER_ID_BEAM_WIDTH_MIN + slider_index, _("Beam Width Minimum"), 1, 100, 1000, 1, nullptr)); - sliders.push_back(slider_alloc(machine, SLIDER_ID_BEAM_WIDTH_MAX + slider_index, _("Beam Width Maximum"), 1, 100, 1000, 1, nullptr)); + sliders.push_back(slider_alloc(machine, SLIDER_ID_BEAM_WIDTH_MIN + slider_index, _("Beam Width Minimum"), 100, 100, 1000, 1, nullptr)); + sliders.push_back(slider_alloc(machine, SLIDER_ID_BEAM_WIDTH_MAX + slider_index, _("Beam Width Maximum"), 100, 100, 1000, 1, nullptr)); sliders.push_back(slider_alloc(machine, SLIDER_ID_BEAM_INTENSITY + slider_index, _("Beam Intensity Weight"), -1000, 0, 1000, 10, nullptr)); slider_index++; break; diff --git a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc index d7e1acf8494..be1f6ef43f6 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/hlsl/fs_distortion.sc @@ -97,19 +97,18 @@ float GetSpotAddend(vec2 coord, float amount) return saturate(SigmoidSpot); } -float GetRoundCornerFactor(vec2 coord, float radiusAmount, float smoothAmount) +float GetRoundCornerFactor(vec2 coord, vec2 bounds, float radiusAmount, float smoothAmount) { // reduce smooth amount down to radius amount smoothAmount = min(smoothAmount, radiusAmount); - vec2 quadDims = (u_swap_xy.x > 0.0) ? u_quad_dims.yx : u_quad_dims.xy; - - float range = min(quadDims.x, quadDims.y) * 0.5; - float radius = range * max(radiusAmount, 0.0025); - float smooth_val = 1.0 / (range * max(smoothAmount, 0.0025)); + float range = min(bounds.x, bounds.y); + float amountMinimum = range > 0.0f ? 1.0f / range : 0.0f; + float radius = range * max(radiusAmount, amountMinimum); + float smooth_val = 1.0f / (range * max(smoothAmount, amountMinimum * 3.0f)); // compute box - float box = roundBox(quadDims * (coord * 2.0f), quadDims, radius); + float box = roundBox(bounds * (coord * 2.0f), bounds, radius); // apply smooth box *= smooth_val; @@ -206,8 +205,11 @@ void main() // Round Corners Simulation vec2 RoundCornerCoord = CornerCoordCentered; + vec2 RoundCornerBounds = (u_swap_xy.x > 0.0) + ? u_quad_dims.yx + : u_quad_dims.xy; - float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, u_round_corner.x, u_smooth_border.x); + float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, RoundCornerBounds, u_round_corner.x * 0.5f, u_smooth_border.x * 0.5f); BaseColor.rgb *= roundCornerFactor; gl_FragColor = BaseColor; diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index 2864d740bb7..5c1bef296cf 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -722,6 +722,7 @@ void shaders::init(d3d_base *d3dintf, running_machine *machine, renderer_d3d9 *r options->yiq_q = winoptions.screen_yiq_q(); options->yiq_scan_time = winoptions.screen_yiq_scan_time(); options->yiq_phase_count = winoptions.screen_yiq_phase_count(); + options->vector_beam_smooth = winoptions.screen_vector_beam_smooth(); options->vector_length_scale = winoptions.screen_vector_length_scale(); options->vector_length_ratio = winoptions.screen_vector_length_ratio(); options->bloom_blend_mode = winoptions.screen_bloom_blend_mode(); @@ -1524,6 +1525,7 @@ int shaders::vector_pass(d3d_render_target *rt, int source_index, poly_info *pol // curr_effect->set_float("TimeScale", options->vector_time_scale); curr_effect->set_float("LengthRatio", options->vector_length_ratio); curr_effect->set_float("LengthScale", options->vector_length_scale); + curr_effect->set_float("BeamSmooth", options->vector_beam_smooth); blit(rt->target_surface[next_index], true, poly->get_type(), vertnum, poly->get_count()); @@ -2285,7 +2287,8 @@ hlsl_options shaders::last_options = { false }; enum slider_option { - SLIDER_VECTOR_ATT_MAX = 0, + SLIDER_VECTOR_BEAM_SMOOTH = 0, + SLIDER_VECTOR_ATT_MAX, SLIDER_VECTOR_ATT_LEN_MIN, SLIDER_SHADOW_MASK_TILE_MODE, SLIDER_SHADOW_MASK_ALPHA, @@ -2362,6 +2365,7 @@ enum slider_screen_type slider_desc shaders::s_sliders[] = { + { "Vector Beam Smooth Amount", 0, 0, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_VECTOR, SLIDER_VECTOR_BEAM_SMOOTH, 0.01f, "%1.2f", {} }, { "Vector Attenuation Maximum", 0, 50, 100, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_VECTOR, SLIDER_VECTOR_ATT_MAX, 0.01f, "%1.2f", {} }, { "Vector Attenuation Length Minimum", 1, 500, 1000, 1, SLIDER_FLOAT, SLIDER_SCREEN_TYPE_VECTOR, SLIDER_VECTOR_ATT_LEN_MIN, 0.001f, "%1.3f", {} }, { "Shadow Mask Tile Mode", 0, 0, 1, 1, SLIDER_INT_ENUM, SLIDER_SCREEN_TYPE_ANY, SLIDER_SHADOW_MASK_TILE_MODE, 0, "%s", { "Screen", "Source" } }, @@ -2433,6 +2437,7 @@ void *shaders::get_slider_option(int id, int index) { switch (id) { + case SLIDER_VECTOR_BEAM_SMOOTH: return &(options->vector_beam_smooth); case SLIDER_VECTOR_ATT_MAX: return &(options->vector_length_scale); case SLIDER_VECTOR_ATT_LEN_MIN: return &(options->vector_length_ratio); case SLIDER_SHADOW_MASK_TILE_MODE: return &(options->shadow_mask_tile_mode); diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h index abf1e48a549..6f6e31f1933 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.h +++ b/src/osd/modules/render/d3d/d3dhlsl.h @@ -245,6 +245,7 @@ struct hlsl_options int yiq_phase_count; // Vectors + float vector_beam_smooth; float vector_length_scale; float vector_length_ratio; diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp index e0966fdbd62..dec0110157a 100644 --- a/src/osd/modules/render/drawbgfx.cpp +++ b/src/osd/modules/render/drawbgfx.cpp @@ -624,6 +624,13 @@ void renderer_bgfx::put_line(float x0, float y0, float x1, float y1, float r, UI dy *= d; } + // create diamond shape for points + else + { + // set distance to unit vector length (1,1) + dx = dy = 0.70710678f; + } + float nx = dy; float ny = -dx; float verts[4 * 3]; diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp index 4490a8c327e..44dd1b10600 100644 --- a/src/osd/modules/render/drawd3d.cpp +++ b/src/osd/modules/render/drawd3d.cpp @@ -41,33 +41,6 @@ enum }; -//============================================================ -// MACROS -//============================================================ - -#define FSWAP(var1, var2) do { float temp = var1; var1 = var2; var2 = temp; } while (0) - - -//============================================================ -// GLOBALS -//============================================================ - -static const line_aa_step line_aa_1step[] = -{ - { 0.00f, 0.00f, 1.00f }, - { 0 } -}; - -static const line_aa_step line_aa_4step[] = -{ - { -0.25f, 0.00f, 0.25f }, - { 0.25f, 0.00f, 0.25f }, - { 0.00f, -0.25f, 0.25f }, - { 0.00f, 0.25f, 0.25f }, - { 0 } -}; - - //============================================================ // INLINES //============================================================ @@ -1388,13 +1361,11 @@ void renderer_d3d9::batch_vectors(int vector_count) { auto win = assert_window(); - windows_options &options = downcast(win->machine().options()); - float quad_width = 0.0f; float quad_height = 0.0f; - int vertex_count = vector_count * (options.antialias() ? 24 : 6); - int triangle_count = vector_count * (options.antialias() ? 8 : 2); + int vertex_count = vector_count * 6; + int triangle_count = vector_count * 2; m_vectorbatch = mesh_alloc(vertex_count); m_batchindex = 0; @@ -1499,71 +1470,103 @@ void renderer_d3d9::batch_vectors(int vector_count) void renderer_d3d9::batch_vector(const render_primitive &prim) { + // get a pointer to the vertex buffer + if (m_vectorbatch == nullptr) + { + return; + } + // compute the effective width based on the direction of the line float effwidth = prim.width; - if (effwidth < 0.5f) + if (effwidth < 2.0f) { - effwidth = 0.5f; + effwidth = 2.0f; } // determine the bounds of a quad to draw this line render_bounds b0, b1; render_line_to_quad(&prim.bounds, effwidth, effwidth, &b0, &b1); - float dx = b1.x1 - b0.x1; - float dy = b1.y1 - b0.y1; - float line_length = sqrtf(dx * dx + dy * dy); + float lx = b1.x1 - b0.x1; + float ly = b1.y1 - b0.y1; + float wx = b1.x1 - b1.x0; + float wy = b1.y1 - b1.y0; + float line_length = sqrtf(lx * lx + ly * ly); + float line_width = sqrtf(wx * wx + wy * wy); - // iterate over AA steps - for (const line_aa_step *step = PRIMFLAG_GET_ANTIALIAS(prim.flags) ? line_aa_4step : line_aa_1step; - step->weight != 0; step++) + m_vectorbatch[m_batchindex + 0].x = b0.x0; + m_vectorbatch[m_batchindex + 0].y = b0.y0; + m_vectorbatch[m_batchindex + 1].x = b0.x1; + m_vectorbatch[m_batchindex + 1].y = b0.y1; + m_vectorbatch[m_batchindex + 2].x = b1.x0; + m_vectorbatch[m_batchindex + 2].y = b1.y0; + + m_vectorbatch[m_batchindex + 3].x = b0.x1; + m_vectorbatch[m_batchindex + 3].y = b0.y1; + m_vectorbatch[m_batchindex + 4].x = b1.x0; + m_vectorbatch[m_batchindex + 4].y = b1.y0; + m_vectorbatch[m_batchindex + 5].x = b1.x1; + m_vectorbatch[m_batchindex + 5].y = b1.y1; + + if (m_shaders->enabled()) { - // get a pointer to the vertex buffer - if (m_vectorbatch == nullptr) - { - return; - } + // procedural generated texture + m_vectorbatch[m_batchindex + 0].u0 = 0.0f; + m_vectorbatch[m_batchindex + 0].v0 = 0.0f; + m_vectorbatch[m_batchindex + 1].u0 = 0.0f; + m_vectorbatch[m_batchindex + 1].v0 = 1.0f; + m_vectorbatch[m_batchindex + 2].u0 = 1.0f; + m_vectorbatch[m_batchindex + 2].v0 = 0.0f; - m_vectorbatch[m_batchindex + 0].x = b0.x0 + step->xoffs; - m_vectorbatch[m_batchindex + 0].y = b0.y0 + step->yoffs; - m_vectorbatch[m_batchindex + 1].x = b0.x1 + step->xoffs; - m_vectorbatch[m_batchindex + 1].y = b0.y1 + step->yoffs; - m_vectorbatch[m_batchindex + 2].x = b1.x0 + step->xoffs; - m_vectorbatch[m_batchindex + 2].y = b1.y0 + step->yoffs; - - m_vectorbatch[m_batchindex + 3].x = b0.x1 + step->xoffs; - m_vectorbatch[m_batchindex + 3].y = b0.y1 + step->yoffs; - m_vectorbatch[m_batchindex + 4].x = b1.x0 + step->xoffs; - m_vectorbatch[m_batchindex + 4].y = b1.y0 + step->yoffs; - m_vectorbatch[m_batchindex + 5].x = b1.x1 + step->xoffs; - m_vectorbatch[m_batchindex + 5].y = b1.y1 + step->yoffs; - - // determine the color of the line - INT32 r = (INT32)(prim.color.r * step->weight * 255.0f); - INT32 g = (INT32)(prim.color.g * step->weight * 255.0f); - INT32 b = (INT32)(prim.color.b * step->weight * 255.0f); - INT32 a = (INT32)(prim.color.a * 255.0f); - DWORD color = D3DCOLOR_ARGB(a, r, g, b); - - // set the color, Z parameters to standard values - for (int i = 0; i < 6; i++) - { - m_vectorbatch[m_batchindex + i].x -= 0.5f; - m_vectorbatch[m_batchindex + i].y -= 0.5f; - m_vectorbatch[m_batchindex + i].z = 0.0f; - m_vectorbatch[m_batchindex + i].rhw = 1.0f; - m_vectorbatch[m_batchindex + i].color = color; - - // no texture mapping - m_vectorbatch[m_batchindex + i].u0 = 0.0f; - m_vectorbatch[m_batchindex + i].v0 = 0.0f; - - // line length - m_vectorbatch[m_batchindex + i].u1 = line_length; - } - - m_batchindex += 6; + m_vectorbatch[m_batchindex + 3].u0 = 0.0f; + m_vectorbatch[m_batchindex + 3].v0 = 1.0f; + m_vectorbatch[m_batchindex + 4].u0 = 1.0f; + m_vectorbatch[m_batchindex + 4].v0 = 0.0f; + m_vectorbatch[m_batchindex + 5].u0 = 1.0f; + m_vectorbatch[m_batchindex + 5].v0 = 1.0f; } + else + { + vec2f& start = get_default_texture()->get_uvstart(); + vec2f& stop = get_default_texture()->get_uvstop(); + + m_vectorbatch[m_batchindex + 0].u0 = start.c.x; + m_vectorbatch[m_batchindex + 0].v0 = start.c.y; + m_vectorbatch[m_batchindex + 1].u0 = start.c.x; + m_vectorbatch[m_batchindex + 1].v0 = stop.c.y; + m_vectorbatch[m_batchindex + 2].u0 = stop.c.x; + m_vectorbatch[m_batchindex + 2].v0 = start.c.y; + + m_vectorbatch[m_batchindex + 3].u0 = start.c.x; + m_vectorbatch[m_batchindex + 3].v0 = stop.c.y; + m_vectorbatch[m_batchindex + 4].u0 = stop.c.x; + m_vectorbatch[m_batchindex + 4].v0 = start.c.y; + m_vectorbatch[m_batchindex + 5].u0 = stop.c.x; + m_vectorbatch[m_batchindex + 5].v0 = stop.c.y; + } + + // determine the color of the line + INT32 r = (INT32)(prim.color.r * 255.0f); + INT32 g = (INT32)(prim.color.g * 255.0f); + INT32 b = (INT32)(prim.color.b * 255.0f); + INT32 a = (INT32)(prim.color.a * 255.0f); + DWORD color = D3DCOLOR_ARGB(a, r, g, b); + + // set the color, Z parameters to standard values + for (int i = 0; i < 6; i++) + { + m_vectorbatch[m_batchindex + i].x -= 0.5f; + m_vectorbatch[m_batchindex + i].y -= 0.5f; + m_vectorbatch[m_batchindex + i].z = 0.0f; + m_vectorbatch[m_batchindex + i].rhw = 1.0f; + m_vectorbatch[m_batchindex + i].color = color; + + // vector length/width + m_vectorbatch[m_batchindex + i].u1 = line_length; + m_vectorbatch[m_batchindex + i].v1 = line_width; + } + + m_batchindex += 6; } @@ -1573,38 +1576,45 @@ void renderer_d3d9::batch_vector(const render_primitive &prim) void renderer_d3d9::draw_line(const render_primitive &prim) { + // get a pointer to the vertex buffer + vertex *vertex = mesh_alloc(4); + if (vertex == nullptr) + { + return; + } + // compute the effective width based on the direction of the line float effwidth = prim.width; - if (effwidth < 0.5f) + if (effwidth < 1.0f) { - effwidth = 0.5f; + effwidth = 1.0f; } // determine the bounds of a quad to draw this line render_bounds b0, b1; render_line_to_quad(&prim.bounds, effwidth, 0.0f, &b0, &b1); - // get a pointer to the vertex buffer - vertex *vertex = mesh_alloc(4); - if (vertex == nullptr) - return; - - // rotate the unit vector by 135 degrees and add to point 0 vertex[0].x = b0.x0; vertex[0].y = b0.y0; - - // rotate the unit vector by -135 degrees and add to point 0 vertex[1].x = b0.x1; vertex[1].y = b0.y1; - - // rotate the unit vector by 45 degrees and add to point 1 vertex[2].x = b1.x0; vertex[2].y = b1.y0; - - // rotate the unit vector by -45 degrees and add to point 1 vertex[3].x = b1.x1; vertex[3].y = b1.y1; + vec2f& start = get_default_texture()->get_uvstart(); + vec2f& stop = get_default_texture()->get_uvstop(); + + vertex[0].u0 = start.c.x; + vertex[0].v0 = start.c.y; + vertex[2].u0 = stop.c.x; + vertex[2].v0 = start.c.y; + vertex[1].u0 = start.c.x; + vertex[1].v0 = stop.c.y; + vertex[3].u0 = stop.c.x; + vertex[3].v0 = stop.c.y; + // determine the color of the line INT32 r = (INT32)(prim.color.r * 255.0f); INT32 g = (INT32)(prim.color.g * 255.0f); @@ -1618,10 +1628,6 @@ void renderer_d3d9::draw_line(const render_primitive &prim) vertex[i].z = 0.0f; vertex[i].rhw = 1.0f; vertex[i].color = color; - - // no texture mapping - vertex[i].u0 = 0.0f; - vertex[i].v0 = 0.0f; } // now add a polygon entry diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp index 57173e8e2a4..77acf017790 100644 --- a/src/osd/modules/render/drawogl.cpp +++ b/src/osd/modules/render/drawogl.cpp @@ -1085,22 +1085,14 @@ int renderer_ogl::draw(const int update) // we're doing nothing 3d, so the Z-buffer is currently not interesting glDisable(GL_DEPTH_TEST); - if (win->machine().options().antialias()) - { - // enable antialiasing for lines - glEnable(GL_LINE_SMOOTH); - // enable antialiasing for points - glEnable(GL_POINT_SMOOTH); + // enable antialiasing for lines + glEnable(GL_LINE_SMOOTH); + // enable antialiasing for points + glEnable(GL_POINT_SMOOTH); - // prefer quality to speed - glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); - } - else - { - glDisable(GL_LINE_SMOOTH); - glDisable(GL_POINT_SMOOTH); - } + // prefer quality to speed + glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); + glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); // enable blending glEnable(GL_BLEND); diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp index ab8e99b6038..32adaa3156c 100644 --- a/src/osd/windows/winmain.cpp +++ b/src/osd/windows/winmain.cpp @@ -217,6 +217,7 @@ const options_entry windows_options::s_option_entries[] = { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, /* Vector simulation below this line */ { nullptr, nullptr, OPTION_HEADER, "VECTOR POST-PROCESSING OPTIONS" }, + { WINOPTION_VECTOR_BEAM_SMOOTH";vecsmooth", "0.0", OPTION_FLOAT, "The vector beam smoothness" }, { WINOPTION_VECTOR_LENGTH_SCALE";vecscale", "0.5", OPTION_FLOAT, "The maximum vector attenuation" }, { WINOPTION_VECTOR_LENGTH_RATIO";vecratio", "0.5", OPTION_FLOAT, "The minimum vector length (vector length to screen size ratio) that is affected by the attenuation" }, /* Bloom below this line */ diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h index 6935130c30f..f7774922223 100644 --- a/src/osd/windows/winmain.h +++ b/src/osd/windows/winmain.h @@ -83,6 +83,7 @@ #define WINOPTION_YIQ_QVALUE "yiq_q" #define WINOPTION_YIQ_SCAN_TIME "yiq_scan_time" #define WINOPTION_YIQ_PHASE_COUNT "yiq_phase_count" +#define WINOPTION_VECTOR_BEAM_SMOOTH "vector_beam_smooth" #define WINOPTION_VECTOR_LENGTH_SCALE "vector_length_scale" #define WINOPTION_VECTOR_LENGTH_RATIO "vector_length_ratio" #define WINOPTION_BLOOM_BLEND_MODE "bloom_blend_mode" @@ -177,6 +178,7 @@ public: float screen_yiq_q() const { return float_value(WINOPTION_YIQ_QVALUE); } float screen_yiq_scan_time() const { return float_value(WINOPTION_YIQ_SCAN_TIME); } int screen_yiq_phase_count() const { return int_value(WINOPTION_YIQ_PHASE_COUNT); } + float screen_vector_beam_smooth() const { return float_value(WINOPTION_VECTOR_BEAM_SMOOTH); } float screen_vector_length_scale() const { return float_value(WINOPTION_VECTOR_LENGTH_SCALE); } float screen_vector_length_ratio() const { return float_value(WINOPTION_VECTOR_LENGTH_RATIO); } int screen_bloom_blend_mode() const { return int_value(WINOPTION_BLOOM_BLEND_MODE); }