diff --git a/assets/menbbokeh.png b/assets/menbbokeh.png deleted file mode 100644 index 3db2fc4..0000000 Binary files a/assets/menbbokeh.png and /dev/null differ diff --git a/code/menbprepassfilters.fx b/code/menbprepassfilters.fx index 305b587..252f2e4 100644 --- a/code/menbprepassfilters.fx +++ b/code/menbprepassfilters.fx @@ -422,38 +422,23 @@ float4 PS_DoFBlurH( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR float sd, ds, sw, tw = 0; float2 bsz = bof*dofpradius*dfc; float4 sc; - [unroll] for ( int i=0; i<16; i++ ) + [unroll] for ( int i=0; i<32; i++ ) { sc = tex2Dlod(SamplerColor,float4(coord.x - +poisson16[i].x*bsz.x,coord.y+poisson16[i].y + +poisson32[i].x*bsz.x,coord.y+poisson32[i].y *bsz.y,0.0,dfc)); - ds = tex2D(SamplerDepth,coord+poisson16[i]*bsz).x; - sd = tex2D(SamplerColor,coord+poisson16[i]*bsz).a; + ds = tex2D(SamplerDepth,coord+poisson32[i]*bsz).x; + sd = tex2D(SamplerColor,coord+poisson32[i]*bsz).a; sw = (ds>dep)?1.0:sd; tw += sw; res += sc*sw; } res /= tw; } - /* check if bokeh point */ - const float2 pts[9] = - { - float2(-1.5,-1.5),float2( 0.5,-1.5),float2( 1.5,-1.5), - float2(-1.5, 0.5),float2( 0.5, 0.5),float2( 1.5, 1.5), - float2(-1.5, 1.5),float2( 0.5, 1.5),float2( 1.5, 1.5) - }; - float4 col = float4(0,0,0,0); - [unroll] for ( int i=0; i<9; i++ ) - col += tex2D(SamplerColor,coord+pts[i]*bof); - col /= 9.0; - float lum = luminance(col), clum = luminance(ccol); - if ( (max(clum-lum,0.0) > bokthr) && (dfc > bokbthr) ) - col.a = min(clum*dfc,1.0); - else col.a = 0.0; - res.a = col.a; + res.a = dfc; return res; } -/* bokeh pass */ +/* nobody here, only one pass is really needed */ float4 PS_DoFBlurV( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR { float2 coord = IN.txcoord.xy; @@ -461,34 +446,7 @@ float4 PS_DoFBlurV( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR float dfc = tex2D(SamplerColor,coord).a; if ( dofdebug ) return tex2D(SamplerDepth,coord).x; if ( dfcdebug ) return dfc; - float2 bresl; - if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy); - else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); - float2 bof = (1.0/bresl); float4 res = tex2D(SamplerColor,coord); - // It's bokeh time - float2 rcoord; - int rsmp; - float rstep, bsmp, bft, tw = 0; - float4 bcol = float4(0,0,0,0); - [unroll] for ( int r=1; r<=5; r++ ) - { - rsmp = r*3; - [loop] for ( int s=0; s; -#ifdef USE_BOKEH -texture2D texBokeh -< - string ResourceName = "menbbokeh.png"; ->; -#endif texture2D texFocus; texture2D texCurr; texture2D texPrev; @@ -217,20 +218,6 @@ sampler2D SamplerFrostBump = sampler_state MaxMipLevel = 0; MipMapLodBias = 0; }; -#ifdef USE_BOKEH -sampler2D SamplerBokeh = sampler_state -{ - Texture = ; - MinFilter = LINEAR; - MagFilter = LINEAR; - MipFilter = NONE; - AddressU = Border; - AddressV = Border; - SRGBTexture = FALSE; - MaxMipLevel = 0; - MipMapLodBias = 0; -}; -#endif sampler2D SamplerFocus = sampler_state { Texture = ; diff --git a/code/menbprepasssettings.fx b/code/menbprepasssettings.fx index 3c9e5d8..07af301 100644 --- a/code/menbprepasssettings.fx +++ b/code/menbprepasssettings.fx @@ -673,26 +673,6 @@ float relfovfactor_id string UIWidget = "Spinner"; > = {2.0}; #endif -#ifdef USE_BOKEH -float bokthr -< - string UIName = "Bokeh Threshold"; - string UIWidget = "Spinner"; - float UIMin = 0.0; -> = {1.0}; -float bokbthr -< - string UIName = "Bokeh Blur Threshold"; - string UIWidget = "Spinner"; - float UIMin = 0.0; -> = {0.5}; -float boksiz -< - string UIName = "Bokeh Size"; - string UIWidget = "Spinner"; - float UIMin = 0.0; -> = {8.0}; -#endif bool dofdebug < string UIName = "Debug Depth"; diff --git a/skyrim/enbseries/enbeffectprepass.fx.ini b/skyrim/enbseries/enbeffectprepass.fx.ini index c47b32b..a94f127 100644 --- a/skyrim/enbseries/enbeffectprepass.fx.ini +++ b/skyrim/enbseries/enbeffectprepass.fx.ini @@ -180,4 +180,4 @@ SSAO Blur Use Less Samples=true Bokeh Threshold=1.0 Bokeh Blur Threshold=0.5 Bokeh Size=8.0 -DOF Gather Blur Radius=6.0 +DOF Gather Blur Radius=8.0