From d9ae40b9feff3d3de30cb27af5be672fc950888b Mon Sep 17 00:00:00 2001 From: Jezze Date: Sat, 22 Oct 2016 22:55:32 +0200 Subject: [PATCH] Reduced defocus effect to one pass (HLSL/BGFX) - removed second defocus pass - limited defocus stength to a maximum of 2.0 --- bgfx/chains/hlsl.json | 18 +------ bgfx/shaders/dx11/chains/hlsl/fs_defocus.bin | Bin 1330 -> 1292 bytes bgfx/shaders/dx9/chains/hlsl/fs_defocus.bin | Bin 867 -> 789 bytes bgfx/shaders/gles/chains/hlsl/fs_defocus.bin | Bin 1167 -> 1135 bytes bgfx/shaders/glsl/chains/hlsl/fs_defocus.bin | Bin 1122 -> 1096 bytes bgfx/shaders/metal/chains/hlsl/fs_defocus.bin | Bin 2355 -> 2346 bytes hlsl/focus.fx | 50 +++++++++--------- .../bgfx/shaders/chains/hlsl/fs_defocus.sc | 26 +++++---- src/osd/modules/render/d3d/d3dhlsl.cpp | 8 ++- 9 files changed, 47 insertions(+), 55 deletions(-) diff --git a/bgfx/chains/hlsl.json b/bgfx/chains/hlsl.json index ea94200dfc3..a3499dc7283 100644 --- a/bgfx/chains/hlsl.json +++ b/bgfx/chains/hlsl.json @@ -84,7 +84,7 @@ { "type": "vec2", "name": "radial_converge_green", "text": "Green Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, { "type": "vec2", "name": "radial_converge_blue", "text": "Blue Radial Convergence, ", "default": [ 0.0, 0.0 ], "max": [ 10.0, 10.0 ], "min": [ -10.0, -10.0 ], "step": 0.1, "format": "%2.1f", "screen": "raster" }, - { "type": "vec2", "name": "defocus", "text": "Defocus, ", "default": [ 0.5, 0.5 ], "max": [ 10.0, 10.0 ], "min": [ 0.0, 0.0 ], "step": 0.1, "format": "%2.1f", "screen": "crt" }, + { "type": "vec2", "name": "defocus", "text": "Defocus, ", "default": [ 0.5, 0.5 ], "max": [ 2.0, 2.0 ], "min": [ 0.0, 0.0 ], "step": 0.1, "format": "%1.1f", "screen": "crt" }, { "type": "color", "name": "phosphor", "text": "Phosphor Persistence, ", "default": [ 0.45, 0.45, 0.45 ], "max": [ 1.00, 1.00, 1.00 ], "min": [ 0.00, 0.00, 0.00 ], "step": 0.01, "format": "%1.2f", "screen": "crt" }, @@ -391,21 +391,7 @@ "output": "internal" }, { "effect": "hlsl/defocus", - "name": "Defocus Pass 1", - "disablewhen": [ - { "type": "slider", "condition": "equal", "combine": "or", "name": "adjustments", "value": 0 }, - { "type": "slider", "condition": "equal", "combine": "or", "name": "defocus", "value": [ 0, 0 ] } - ], - "uniforms": [ - { "uniform": "u_defocus", "slider": "defocus" } - ], - "input": [ - { "sampler": "s_tex", "target": "internal" } - ], - "output": "internal" - }, - { "effect": "hlsl/defocus", - "name": "Defocus Pass 2", + "name": "Defocus Pass", "disablewhen": [ { "type": "slider", "condition": "equal", "combine": "or", "name": "adjustments", "value": 0 }, { "type": "slider", "condition": "equal", "combine": "or", "name": "defocus", "value": [ 0, 0 ] } diff --git a/bgfx/shaders/dx11/chains/hlsl/fs_defocus.bin b/bgfx/shaders/dx11/chains/hlsl/fs_defocus.bin index 1636abdef10ab059219f37328ccfa8ed1102d986..7459dabdcac7a5d94b140e77b534aee27438d9de 100644 GIT binary patch literal 1292 zcmdT^O=}ZT6g@MUs43Bo!G+8G0HM-_n1GU+WYR$CluRm7goqjuEGVsou1aZLXDKe- z=NFjYkSc1Q8-1a1&294f>`nT)YdHv!0LNh%+T{%DcNE0nUj{Fws6X}H1PFkxQ4}lDkMy$7)9`FY?{lA{L-Me{7ANg)J6=USUWq&CHhc9r?ldrpSyLF4 zLp94Jw=ULXj_y*Y)$C$4N|qa)fcR^4^ceUE2%=%xgelKs!F?Kx7}%?j#)p&QIJ%MLX#xes z2uI{%ce5N0lk=eqzRubFfAA5u$YP9Ud}zA-v(`0RlUy;*CLyBEap7`(8H~U5Ra9S9 z(r5KJ+m~jdzD(>49@m#_>g#ttG#Sj~Q@HG`r)(zPV*eXv&4E~}oP%)xFPIHp;nrFI zE9ZO%$d~MVy&6y%e!0i9FYH@g)!ym33wzx+#cfh&?rSNV{awylIx|P#-a&HbuR2<; aj&i7uR@J^y<#6xvQgQko-#5RF5I+DP7LdUJ literal 1330 zcmc&!!D6A<=QG|$^RzYZKnj$XB(01LG zOBe23)!7Et3kgaWt@wBB9?N@{VCKt>$S;+uXpc#OzXSfe}CCK{&X8D zWJK~<@4!F9f54l`#@0Kmj8DP0;WXkIqs_se+nswb&iot_FEjA~=R5$(lkRq$G~3O1 zOKS1sxFzjIrxwSpx(s7*QUiOCGlZ*M=R}Y8T5F@xmf`S!9NN$a6L8xPu4>iK=+O(^YuY%sY(o^8Jmk%knD5_MCQgSq#c2 z$!q(7mu9f~x!N4-8PkNm zdawIty%BU$bNUT_sd^P}?+iV-1`!_iE?ARRS)+K>{=eQ&`RzO7KCSK>=F8j_<~t69 z)Y$p5ujXu>pNal1?u!)p-$KhpA`dTqJ;Dr2r#`mgHBDbT6U(|o#O!aY;xs*g2F7S6 j@H(*)qde50JdBZtu@(Q_vWI@F)JU6{aTt6^fQIrHP&S8; diff --git a/bgfx/shaders/dx9/chains/hlsl/fs_defocus.bin b/bgfx/shaders/dx9/chains/hlsl/fs_defocus.bin index 12ed2624d0bafbbaf55bfa979a313ebb9121235a..c14f1574af3a69718bca0ed6036aa1a332005a97 100644 GIT binary patch delta 331 zcmXv}JxfDD5S+bx_fQc8KZ<~Mb|MJcL=ZKeVi5wOScnirBVuC_18Fn|_QA(te->62 z*1ppE&0dzX&oxV! z3V_>`O|?JV5Iz8mVtr6d=Db^Hybp>Z7hRWnA$paOi^m_+VuereCGCJwNPvWcxwlUH zH#$qLQ>^=YW&MeoFfum$o!XrhEB>u$JQM7r|4?;9*b3xl^y&g(E)cGRk^hZJ>PXUD HjQrL=<5f&c delta 356 zcmYk0KT88a5XIlj-W{k#Bp^minZm*%5K;+A{7VWOQNb<-J;6%lav&0L!PX+jBG|ds zeh4c+Nbu?u_Il2ojRTK)^P9))K1H9={oY|epog!iL6{6i@okd;!dyByk1wvy(xgfx z^Fpe-L2`K)H>+i0&A=4JPtn5m(dJeiz>7$kk)|^;;91&d^ diff --git a/bgfx/shaders/gles/chains/hlsl/fs_defocus.bin b/bgfx/shaders/gles/chains/hlsl/fs_defocus.bin index 5d29797339f6a3f2ca8174a0d1a66b10a74647aa..ce6684682f76d0278ec26b7cd4bc8c528589225b 100644 GIT binary patch delta 174 zcmeC@e9yt@7VN>o*!<}s(?n@mMwf|}p%d3tDQPK`r6wC`80Z-o7+9K{nVK1y>L?)d zG$&gyZs624)H4H#8%_SeXw41e8R#hJ8t9ptPBvlkVgqUcicD@{a_0gn0rEh~CtqQ* u=Y()UypN1FtfnBT$%ahglgpX)IKYMg&6vE7*_8!oy6)r)Od^xHSy})wcPhI8 delta 166 zcmaFQ(a$OE7VN>o*!<}sGXr;Nd`W6Wd~s$~ssR%t0|VnkPFcpFiRz&oFyV~h)oQ8S^AfA!w ni4`>cZZgL;9E2F{WE6lS2xymhe diff --git a/bgfx/shaders/glsl/chains/hlsl/fs_defocus.bin b/bgfx/shaders/glsl/chains/hlsl/fs_defocus.bin index 277656126642592e0c532d29afee05914fd39660..238e85969c26f14741c1aceae8ec7754a613e0ca 100644 GIT binary patch delta 152 zcmaFFae{->E!cyFvH8=upapu_o^uQ+@ delta 174 zcmX@X@rXm(E!cyFvH8$C$_~Oi}R0AeP1_s87oU)9n6V;tLV8Rn48U^$f zkd*0FR8IW8jKe_B+*C)wKyUIYM(fEJm^c^>CVyb`Vgm`8n@)CMa%VNvGtg0(yn$I{ x@kJCU8Bmz`6Ii1-RXxv)n*#PfiF;D;i diff --git a/bgfx/shaders/metal/chains/hlsl/fs_defocus.bin b/bgfx/shaders/metal/chains/hlsl/fs_defocus.bin index ab14379b016c9dc2cd231a1839dda728b8f896ed..90bf785e55463c2b3d173ff1215090c78163801a 100644 GIT binary patch delta 172 zcmdliv`UEEE!cyFvH8 s8z-X~kS8_yE0EXE%mL=jW(H|dU|YliHUOeudh#>2W=6BkS?nhn0i3ihPyhe` delta 178 zcmZ1_v{{JTE!cyFvH8