diff --git a/enbseries.ini b/enbseries.ini index 3e8c957..a22fb7c 100644 --- a/enbseries.ini +++ b/enbseries.ini @@ -5,7 +5,7 @@ [GLOBAL] AdditionalConfigFile= -UseEffect=false +UseEffect=true [EFFECT] UseOriginalPostProcessing=false @@ -846,3 +846,9 @@ ExponentialFadeInteriorDay=0.96 ExponentialFadeInteriorNight=1.09 IgnoreWeatherSystem=true EnableAnchors=false +DistanceFadeSunrise=0.0 +DistanceFadeDay=0.0 +DistanceFadeSunset=0.0 +DistanceFadeNight=0.0 +DistanceFadeInteriorDay=0.0 +DistanceFadeInteriorNight=0.0 diff --git a/enbseries/effect.txt b/enbseries/effect.txt new file mode 100644 index 0000000..8f59081 --- /dev/null +++ b/enbseries/effect.txt @@ -0,0 +1,12 @@ +/* + effect.txt : MariENB extra shader. + (C)2013-2014 Marisa Kirisame, UnSX Team. + Part of MariENB, the personal ENB of Marisa. + Released under the WTFPL. +*/ +/* do not touch this! */ +#define E_SHADER_3_0 +/* separate for easier maintenance */ +#include "menbextrasettings.fx" +#include "menbextrainternals.fx" +#include "menbextrafilters.fx" diff --git a/enbseries/effect.txt.ini b/enbseries/effect.txt.ini index 0a81e73..db72677 100644 --- a/enbseries/effect.txt.ini +++ b/enbseries/effect.txt.ini @@ -1,2 +1,36 @@ [EFFECT.TXT] TECHNIQUE=0 +UseBlockGFX=false +EmulatedResX=0.0 +EmulatedResY=0.0 +PaletteType=2 +CGAPalette=1 +EGAPalette=0 +DitherMode=4 +GammaMod=0.45 +DitherBump=-0.2 +DitherMultiplier=0.25 +SaturationMod=1.5 +UseCurve=false +CurveChromaAberration=0.06 +CurveLensZoom=50.25 +CurveLensDistortion=0.0 +CurveLensDistortionCubic=0.0 +CurveLensClamp=true +UseGrain=false +GrainFrequency=2500.0 +GrainIntensity=0.1 +GrainSaturation=0.0 +GrainTwoPass=true +GrainBlend=1 +GrainTwoPassFactor=0.04 +GrainMagnification1=13.25 +GrainMagnification2=19.639999 +GrainMagnification3=17.35 +GrainPass1Magnification1=2.05 +GrainPass1Magnification2=3.11 +GrainPass1Magnification3=2.22 +GrainPass2Magnification1=4.25 +GrainPass2Magnification2=0.42 +GrainPass2Magnification3=6.29 +GrainPower=4.33 diff --git a/enbseries/enbbloom.fx.ini b/enbseries/enbbloom.fx.ini index 5c7038e..8a246c9 100644 --- a/enbseries/enbbloom.fx.ini +++ b/enbseries/enbbloom.fx.ini @@ -1,18 +1,20 @@ [ENBBLOOM.FX] TECHNIQUE=0 -BloomIntensityNight=0.99 -BloomIntensityDay=0.33 -BloomIntensityInteriorNight=0.97 +BloomIntensityNight=1.33 +BloomIntensityDay=0.65 +BloomIntensityInteriorNight=1.21 BloomIntensityInteriorDay=0.94 BloomBumpNight=-0.07 -BloomBumpDay=-0.19 -BloomBumpInteriorNight=-0.1 -BloomBumpInteriorDay=-0.13 +BloomBumpDay=-0.13 +BloomBumpInteriorNight=-0.04 +BloomBumpInteriorDay=-0.08 BloomPowerNight=1.09 -BloomPowerDay=1.4 -BloomPowerInteriorNight=1.13 -BloomPowerInteriorDay=1.19 +BloomPowerDay=1.18 +BloomPowerInteriorNight=1.01 +BloomPowerInteriorDay=1.07 BloomSaturationNight=0.86 BloomSaturationDay=0.78 BloomSaturationInteriorNight=0.91 BloomSaturationInteriorDay=0.85 +_FixedResolutionX=1920 +_FixedResolutionY=1080 diff --git a/enbseries/enbeffect.fx.ini b/enbseries/enbeffect.fx.ini index 6265bfe..7e35fea 100644 --- a/enbseries/enbeffect.fx.ini +++ b/enbseries/enbeffect.fx.ini @@ -1,9 +1,9 @@ [ENBEFFECT.FX] TECHNIQUE=0 CompensateFactorNight=0.22 -CompensateFactorDay=0.4 -CompensateFactorInteriorNight=0.32 -CompensateFactorInteriorDay=0.45 +CompensateFactorDay=0.3 +CompensateFactorInteriorNight=0.31 +CompensateFactorInteriorDay=0.36 CompensatePowerNight=1.16 CompensatePowerDay=1.11 CompensatePowerInteriorNight=1.1 @@ -15,9 +15,9 @@ CompensateSaturationInteriorDay=0.99 GradingMulRNight=1.32 GradingMulGNight=1.25 GradingMulBNight=1.45 -GradingMulRDay=1.7 -GradingMulGDay=1.45 -GradingMulBDay=1.29 +GradingMulRDay=1.68 +GradingMulGDay=1.47 +GradingMulBDay=1.35 GradingMulRInteriorNight=1.46 GradingMulGInteriorNight=1.52 GradingMulBInteriorNight=1.55 @@ -27,9 +27,9 @@ GradingMulBInteriorDay=1.41 GradingPowRNight=1.02 GradingPowGNight=1.06 GradingPowBNight=1.03 -GradingPowRDay=1.09 -GradingPowGDay=1.08 -GradingPowBDay=1.05 +GradingPowRDay=1.08 +GradingPowGDay=1.06 +GradingPowBDay=1.04 GradingPowRInteriorNight=1.08 GradingPowGInteriorNight=1.11 GradingPowBInteriorNight=1.06 @@ -49,19 +49,19 @@ GradingColRInteriorDay=-0.22 GradingColGInteriorDay=-0.21 GradingColBInteriorDay=-0.33 GradingColFactorNight=-0.2 -GradingColFactorDay=-0.14 +GradingColFactorDay=-0.17 GradingColFactorInteriorNight=-0.08 GradingColFactorInteriorDay=-0.12 DarkRadiusNight=0.0 DarkRadiusDay=0.0 DarkRadiusInteriorNight=0.0 DarkRadiusInteriorDay=0.0 -DarkCurveNight=1.7 -DarkCurveDay=2.3 +DarkCurveNight=1.45 +DarkCurveDay=1.92 DarkCurveInteriorNight=1.35 DarkCurveInteriorDay=1.67 -DarkBumpNight=0.74 -DarkBumpDay=0.33 +DarkBumpNight=0.66 +DarkBumpDay=0.55 DarkBumpInteriorNight=0.82 DarkBumpInteriorDay=0.61 BoxVertical=1.0 @@ -71,8 +71,10 @@ AdaptationMinNight=0.11 AdaptationMinDay=0.07 AdaptationMinInteriorNight=0.07 AdaptationMinInteriorDay=0.06 -AdaptationMaxNight=1.02 -AdaptationMaxDay=1.24 +AdaptationMaxNight=1.19 +AdaptationMaxDay=1.06 AdaptationMaxInteriorNight=0.9 AdaptationMaxInteriorDay=0.89 BloomSoften=false +_FixedResolutionX=1920 +_FixedResolutionY=1080 diff --git a/enbseries/enbeffectprepass.fx.ini b/enbseries/enbeffectprepass.fx.ini index d0b4cfc..0392c61 100644 --- a/enbseries/enbeffectprepass.fx.ini +++ b/enbseries/enbeffectprepass.fx.ini @@ -50,9 +50,34 @@ DoFTwoPass=false EdgeDisable=true EdgeView=false EdgeFadePower=1.6 -EdgeFadeMultiplier=16.0 +EdgeFadeMultiplier=20.0 EdgePower=1.5 -EdgeMultiplier=32.0 +EdgeMultiplier=20.0 DoFDisable=false DoFSmoothing=false -DoFCutoff=false +DoFCutoff=true +SSAOEnable=true +SSAODebug=0 +SSAONormalOffset1=0.0 +SSAONormalOffset2=0.01 +SSAONormalOffset3=0.01 +SSAONormalOffset4=0.0 +SSAORadius=8.0 +SSAONoise=0.5 +SSAONoiseSize=1.0 +SSAOFade=0.5 +SSAOBump=0.0 +SSAOMult=1.0 +SSAOPower=5.0 +SSAOBlend=0.7 +SSAOBlurEnable=true +SSAOFadePower=1.2 +SSAOFadeMultiplier=200.0 +_FixedResolutionX=1920 +_FixedResolutionY=1080 +SSAOFalloff=0.01 +SSAOArea=7.5 +SSAOBase=0.2 +SSAOStrength=1.0 +SSAOMultiplier=1.0 +SSAORangeMax=1.0 diff --git a/enbseries/enbhelper.dll b/enbseries/enbhelper.dll deleted file mode 100644 index 33466ab..0000000 Binary files a/enbseries/enbhelper.dll and /dev/null differ diff --git a/enbseries/menbbloomfilters.fx b/enbseries/menbbloomfilters.fx index 9092592..1262624 100644 --- a/enbseries/menbbloomfilters.fx +++ b/enbseries/menbbloomfilters.fx @@ -40,7 +40,11 @@ float4 PS_BloomPrePass(VS_OUTPUT_POST In) : COLOR float4 PS_BloomTexture(VS_OUTPUT_POST In) : COLOR { float2 coord = In.txcoord0.xy; - float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); + float2 bresl; + if ( (fixedx > 0) && (fixedy > 0) ) + bresl = float2(fixedx,fixedy); + else + bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*pow(4,TempParameters.w); /* loop unrolled for speeding up compilation (this is retarded) */ float4 res; diff --git a/enbseries/menbbloomsettings.fx b/enbseries/menbbloomsettings.fx index cecc617..1d27548 100644 --- a/enbseries/menbbloomsettings.fx +++ b/enbseries/menbbloomsettings.fx @@ -4,6 +4,19 @@ Part of MariENB, the personal ENB of Marisa. Released under the WTFPL. */ +/* fixed resolution */ +int fixedx +< + string UIName = "_FixedResolutionX"; + string UIWidget = "Spinner"; + int UIMin = 0; +> = {0}; +int fixedy +< + string UIName = "_FixedResolutionY"; + string UIWidget = "Spinner"; + int UIMin = 0; +> = {0}; /* bloom intensity */ float bloomintensity_n < diff --git a/enbseries/menbeffectfilters.fx b/enbseries/menbeffectfilters.fx index f6bf0b3..4e36967 100644 --- a/enbseries/menbeffectfilters.fx +++ b/enbseries/menbeffectfilters.fx @@ -60,7 +60,10 @@ float4 PS_Mari( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR /* screen mud goes here */ if ( softbloom ) { - bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); + if ( (fixedx > 0) && (fixedy > 0) ) + bresl = float2(fixedx,fixedy); + else + bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); bof = float2(1.0/bresl.x,1.0/bresl.y); res += gauss5[2][2]*tex2D(_s3,coord+float2(-2,-2)*bof); res += gauss5[1][2]*tex2D(_s3,coord+float2(-1,-2)*bof); diff --git a/enbseries/menbeffectsettings.fx b/enbseries/menbeffectsettings.fx index 54cac22..32247e0 100644 --- a/enbseries/menbeffectsettings.fx +++ b/enbseries/menbeffectsettings.fx @@ -4,6 +4,19 @@ Part of MariENB, the personal ENB of Marisa. Released under the WTFPL. */ +/* fixed resolution */ +int fixedx +< + string UIName = "_FixedResolutionX"; + string UIWidget = "Spinner"; + int UIMin = 0; +> = {0}; +int fixedy +< + string UIName = "_FixedResolutionY"; + string UIWidget = "Spinner"; + int UIMin = 0; +> = {0}; /* Border darkening */ /* radius of darkening (relative to screen width) */ float dkradius_n diff --git a/enbseries/menbextrafilters.fx b/enbseries/menbextrafilters.fx new file mode 100644 index 0000000..2bacda9 --- /dev/null +++ b/enbseries/menbextrafilters.fx @@ -0,0 +1,377 @@ +/* + menbextrafilters.fx : MariENB extra shader routines. + (C)2013-2014 Marisa Kirisame, UnSX Team. + Part of MariENB, the personal ENB of Marisa. + Released under the WTFPL. +*/ +VS_OUTPUT_POST VS_Pass( VS_INPUT_POST IN ) +{ + VS_OUTPUT_POST OUT; + OUT.vpos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0); + OUT.txcoord.xy = IN.txcoord.xy; + return OUT; +} +/* prepass */ +float4 ReducePrepass( in float4 color, in float2 coord ) +{ + color.rgb = pow(max(color.rgb,0.0),bgamma); + float4 dac; + dac.a = (color.r+color.g+color.b)/3.0; + dac.rgb = dac.a+(color.rgb-dac.a)*bsaturation; + if ( dither == 0 ) + dac += bdbump+checkers[int(coord.x%2)+2*int(coord.y%2)]*bdmult; + else if ( dither == 1 ) + dac += bdbump+ordered2[int(coord.x%2)+2*int(coord.y%2)]*bdmult; + else if ( dither == 2 ) + dac += bdbump+ordered3[int(coord.x%3)+3*int(coord.y%3)]*bdmult; + else if ( dither == 3 ) + dac += bdbump+ordered4[int(coord.x%4)+4*int(coord.y%4)]*bdmult; + else if ( dither == 4 ) + dac += bdbump+ordered8[int(coord.x%8)+8*int(coord.y%8)]*bdmult; + dac.a = 1.0; + dac = saturate(dac); + return dac; +} +float4 ReduceCGA( in float4 color, in float2 coord ) +{ + float4 dac = ReducePrepass(color,coord); + if ( cgapal == 0 ) + { + dac.a = (dac.r+dac.g+dac.b)/3.0; + return (dac.a>0.5); + } + float dist = 2.0; + int idx = 0; + if ( cgapal == 1 ) + { + for ( int i=0; i<4; i++ ) + { + if ( distance(dac.rgb,cga1l[i]) < dist ) + { + idx = i; + dist = distance(dac.rgb,cga1l[i]); + } + } + color.rgb = cga1l[idx]; + } + else if ( cgapal == 2 ) + { + for ( int i=0; i<4; i++ ) + { + if ( distance(dac.rgb,cga1h[i]) < dist ) + { + idx = i; + dist = distance(dac.rgb,cga1h[i]); + } + } + color.rgb = cga1h[idx]; + } + else if ( cgapal == 3 ) + { + for ( int i=0; i<4; i++ ) + { + if ( distance(dac.rgb,cga2l[i]) < dist ) + { + idx = i; + dist = distance(dac.rgb,cga2l[i]); + } + } + color.rgb = cga2l[idx]; + } + else if ( cgapal == 4 ) + { + for ( int i=0; i<4; i++ ) + { + if ( distance(dac.rgb,cga2h[i]) < dist ) + { + idx = i; + dist = distance(dac.rgb,cga2h[i]); + } + } + color.rgb = cga2h[idx]; + } + else if ( cgapal == 5 ) + { + for ( int i=0; i<4; i++ ) + { + if ( distance(dac.rgb,cga3l[i]) < dist ) + { + idx = i; + dist = distance(dac.rgb,cga3l[i]); + } + } + color.rgb = cga3l[idx]; + } + else if ( cgapal == 6 ) + { + for ( int i=0; i<4; i++ ) + { + if ( distance(dac.rgb,cga3h[i]) < dist ) + { + idx = i; + dist = distance(dac.rgb,cga3h[i]); + } + } + color.rgb = cga3h[idx]; + } + return color; +} +float4 ReduceEGA( in float4 color, in float2 coord ) +{ + float4 dac = ReducePrepass(color,coord); + float dist = 2.0; + int idx = 0; + if ( egapal == 0 ) + { + for ( int i=0; i<16; i++ ) + { + if ( distance(dac.rgb,stdega[i]) < dist ) + { + idx = i; + dist = distance(dac.rgb,stdega[i]); + } + } + color.rgb = stdega[idx]; + } + else + { + for ( int i=0; i<16; i++ ) + { + if ( distance(dac.rgb,aosega[i]) < dist ) + { + idx = i; + dist = distance(dac.rgb,aosega[i]); + } + } + color.rgb = aosega[idx]; + } + return color; +} +float4 ReduceRGB2( in float4 color, in float2 coord ) +{ + float4 dac = ReducePrepass(color,coord); + color.rgb = trunc(dac.rgb*4.0)/4.0; + return color; +} +float4 ReduceRGB323( in float4 color, in float2 coord ) +{ + float4 dac = ReducePrepass(color,coord); + color.rgb = trunc(dac.rgb*float3(8.0,4.0,8.0))/float3(8.0,4.0,8.0); + return color; +} +float4 ReduceRGB4( in float4 color, in float2 coord ) +{ + float4 dac = ReducePrepass(color,coord); + color.rgb = trunc(dac.rgb*16.0)/16.0; + return color; +} +float4 ReduceRGB565( in float4 color, in float2 coord ) +{ + float4 dac = ReducePrepass(color,coord); + color.rgb = trunc(dac.rgb*float3(32.0,64.0,32.0)) + /float3(32.0,64.0,32.0); + return color; +} +float4 ReduceRGB6( in float4 color, in float2 coord ) +{ + float4 dac = ReducePrepass(color,coord); + color.rgb = trunc(dac.rgb*64.0)/64.0; + return color; +} +/* Fuzzy */ +float4 PS_Grain( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR +{ + float2 coord = IN.txcoord.xy; + float4 res = tex2D(SamplerColor,coord); + if ( !ne ) + return res; + float ts = Timer.x*nf; + float2 tcs = coord.xy; + float2 s1 = tcs+float2(0,ts); + float2 s2 = tcs+float2(ts,0); + float2 s3 = tcs+float2(ts,ts); + float n1, n2, n3; + float2 nr = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w)/256.0; + if ( np ) + { + n1 = tex2D(SamplerNoise2,s1*nm11*nr).r; + n2 = tex2D(SamplerNoise2,s2*nm12*nr).g; + n3 = tex2D(SamplerNoise2,s3*nm13*nr).b; + s1 = tcs+float2(ts+n1*nk,n2*nk); + s2 = tcs+float2(n2,ts+n3*nk); + s3 = tcs+float2(ts+n3*nk,ts+n1*nk); + n1 = tex2D(SamplerNoise2,s1*nm21*nr).r; + n2 = tex2D(SamplerNoise2,s2*nm22*nr).g; + n3 = tex2D(SamplerNoise2,s3*nm23*nr).b; + } + else + { + n1 = tex2D(SamplerNoise3,s1*nm1*nr).r; + n2 = tex2D(SamplerNoise3,s2*nm2*nr).g; + n3 = tex2D(SamplerNoise3,s3*nm3*nr).b; + } + float n4 = (n1+n2+n3)/3; + float3 ng = float3(n4,n4,n4); + float3 nc = float3(n1,n2,n3); + float3 nt = pow(clamp(lerp(ng,nc,ns),0.0,1.0),nj); + if ( nb == 1 ) + res.rgb += nt*ni; + else if ( nb == 2 ) + { + res.r = (res.r<0.5)?(2.0*res.r*(0.5+(nt.r*ni))) + :(1.0-2.0*(1.0-res.r)*(1.0-((0.5+(nt.r*ni))))); + res.g = (res.g<0.5)?(2.0*res.g*(0.5+(nt.g*ni))) + :(1.0-2.0*(1.0-res.g)*(1.0-((0.5+(nt.g*ni))))); + res.b = (res.b<0.5)?(2.0*res.b*(0.5+(nt.b*ni))) + :(1.0-2.0*(1.0-res.b)*(1.0-((0.5+(nt.b*ni))))); + } + else if ( nb == 3 ) + res.rgb *= 1.0+(nt*ni); + else + res.rgb = lerp(res.rgb,nt,ni); + return res; +} +/* Curveshit */ +float4 PS_Curve( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR +{ + float2 coord = IN.txcoord.xy; + float4 res = tex2D(SamplerColor,coord); + if ( !usecurve ) + return res; + float3 eta = float3(1+chromaab*0.09,1+chromaab*0.06,1+chromaab*0.03); + float2 center = float2(coord.x-0.5,coord.y-0.5); + float zfact = 100.0/lenszoom; + float r2 = center.x*center.x+center.y*center.y; + float f = 0; + if( lensdistc == 0.0) + f = 1+r2*lensdist; + else + f = 1+r2*(lensdist+lensdistc*sqrt(r2)); + float x = f*zfact*center.x+0.5; + float y = f*zfact*center.y+0.5; + float2 rcoord = (f*eta.r)*zfact*(center.xy*0.5)+0.5; + float2 gcoord = (f*eta.g)*zfact*(center.xy*0.5)+0.5; + float2 bcoord = (f*eta.b)*zfact*(center.xy*0.5)+0.5; + float4 idist = float4(tex2D(SamplerColor,rcoord).r, + tex2D(SamplerColor,gcoord).g, + tex2D(SamplerColor,bcoord).b,1.0); + if ( lensclamp ) + { + if ( (rcoord.x < 0.0) || (rcoord.x >= 1.0) ) + idist.r *= 0.0; + if ( (rcoord.y < 0.0) || (rcoord.y >= 1.0) ) + idist.r *= 0.0; + if ( (gcoord.x < 0.0) || (gcoord.x >= 1.0) ) + idist.g *= 0.0; + if ( (gcoord.y < 0.0) || (gcoord.y >= 1.0) ) + idist.g *= 0.0; + if ( (bcoord.x < 0.0) || (bcoord.x >= 1.0) ) + idist.b *= 0.0; + if ( (bcoord.y < 0.0) || (bcoord.y >= 1.0) ) + idist.b *= 0.0; + } + res.rgb = idist.rgb; + res.a = 1.0; + return res; +} +/* Retro rockets */ +float4 PS_Retro( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR +{ + float2 coord = IN.txcoord.xy; + float4 res = tex2D(SamplerColor,coord); + if ( !useblock ) + return res; + float2 rresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); + float4 tcol; + float2 bresl = rresl; + if ( bresx <= 0 || bresy <= 0 ) + bresl = rresl; + else + { + if ( bresx <= 1.0 ) + bresl.x = rresl.x*bresx; + else + bresl.x = bresx; + if ( bresy <= 1.0 ) + bresl.y = rresl.y*bresy; + else + bresl.y = bresy; + } + float2 ncoord = coord; + ncoord = (coord-float2(0.5,0.5))+float2(0.5,0.5); + ncoord = floor(ncoord*bresl)/bresl; + if ( bresx <= 0 || bresy <= 0 ) + ncoord = coord; + tcol = tex2D(SamplerColor,ncoord); + if ( ncoord.x < 0 || ncoord.x >= 1 || ncoord.y < 0 || ncoord.y >= 1 ) + tcol *= 0; + if ( paltype == 0 ) + res = ReduceCGA(tcol,coord*bresl); + else if ( paltype == 1 ) + res = ReduceEGA(tcol,coord*bresl); + else if ( paltype == 2 ) + res = ReduceRGB2(tcol,coord*bresl); + else if ( paltype == 3 ) + res = ReduceRGB323(tcol,coord*bresl); + else if ( paltype == 4 ) + res = ReduceRGB4(tcol,coord*bresl); + else if ( paltype == 5 ) + res = ReduceRGB565(tcol,coord*bresl); + else if ( paltype == 6 ) + res = ReduceRGB6(tcol,coord*bresl); + else + res = tcol; + res.a = 1.0; + return res; +} +technique PostProcess +{ + pass p0 + { + VertexShader = compile vs_3_0 VS_Pass(); + PixelShader = compile ps_3_0 PS_Grain(); + DitherEnable = FALSE; + ZEnable = FALSE; + CullMode = NONE; + ALPHATESTENABLE = FALSE; + SEPARATEALPHABLENDENABLE = FALSE; + AlphaBlendEnable = FALSE; + StencilEnable = FALSE; + FogEnable = FALSE; + SRGBWRITEENABLE = FALSE; + } +} +technique PostProcess2 +{ + pass p0 + { + VertexShader = compile vs_3_0 VS_Pass(); + PixelShader = compile ps_3_0 PS_Curve(); + DitherEnable = FALSE; + ZEnable = FALSE; + CullMode = NONE; + ALPHATESTENABLE = FALSE; + SEPARATEALPHABLENDENABLE = FALSE; + AlphaBlendEnable = FALSE; + StencilEnable = FALSE; + FogEnable = FALSE; + SRGBWRITEENABLE = FALSE; + } +} +technique PostProcess3 +{ + pass p0 + { + VertexShader = compile vs_3_0 VS_Pass(); + PixelShader = compile ps_3_0 PS_Retro(); + DitherEnable = FALSE; + ZEnable = FALSE; + CullMode = NONE; + ALPHATESTENABLE = FALSE; + SEPARATEALPHABLENDENABLE = FALSE; + AlphaBlendEnable = FALSE; + StencilEnable = FALSE; + FogEnable = FALSE; + SRGBWRITEENABLE = FALSE; + } +} \ No newline at end of file diff --git a/enbseries/menbextrainternals.fx b/enbseries/menbextrainternals.fx new file mode 100644 index 0000000..3d60741 --- /dev/null +++ b/enbseries/menbextrainternals.fx @@ -0,0 +1,200 @@ +/* + menbextrainternals.fx : MariENB extra internal variables. + (C)2013-2014 Marisa Kirisame, UnSX Team. + Part of MariENB, the personal ENB of Marisa. + Released under the WTFPL. +*/ +/* + dithering threshold maps + don't touch unless you know what you're doing +*/ +static const float checkers[4] = +{ + 1,0, + 0,1 +}; +#define d(x) x/4.0 +static const float ordered2[4] = +{ + d(0),d(2), + d(4),d(2) +}; +#undef d +#define d(x) x/9.0 +static const float ordered3[9] = +{ + d(2),d(6),d(3), + d(5),d(0),d(8), + d(1),d(7),d(4) +}; +#undef d +#define d(x) x/16.0 +static const float ordered4[16] = +{ + d( 0),d( 8),d( 2),d(10), + d(12),d( 4),d(14),d( 6), + d( 3),d(11),d( 1),d( 9), + d(15),d( 7),d(13),d( 5) +}; +#undef d +#define d(x) x/64.0 +static const float ordered8[64] = +{ + d( 0),d(48),d(12),d(60),d( 3),d(51),d(15),d(63), + d(32),d(16),d(44),d(28),d(35),d(19),d(47),d(31), + d( 8),d(56),d( 4),d(52),d(11),d(59),d( 7),d(55), + d(40),d(24),d(36),d(20),d(43),d(27),d(39),d(23), + d( 2),d(50),d(14),d(62),d( 1),d(49),d(13),d(61), + d(34),d(18),d(46),d(30),d(33),d(17),d(45),d(29), + d(10),d(58),d( 6),d(54),d( 9),d(57),d( 5),d(53), + d(42),d(26),d(38),d(22),d(41),d(25),d(37),d(21) +}; +#undef d +/* + palettes + don't touch unless you know what you're doing +*/ +#define d(x) x/3.0 +static const float3 cga1l[4] = +{ + float3(d(0),d(0),d(0)), + float3(d(0),d(2),d(2)), + float3(d(2),d(0),d(2)), + float3(d(2),d(2),d(2)) +}; +static const float3 cga1h[4] = +{ + float3(d(0),d(0),d(0)), + float3(d(1),d(3),d(3)), + float3(d(3),d(1),d(3)), + float3(d(3),d(3),d(3)) +}; +static const float3 cga2l[4] = +{ + float3(d(0),d(0),d(0)), + float3(d(0),d(2),d(0)), + float3(d(2),d(0),d(0)), + float3(d(2),d(1),d(0)) +}; +static const float3 cga2h[4] = +{ + float3(d(0),d(0),d(0)), + float3(d(1),d(3),d(1)), + float3(d(3),d(1),d(1)), + float3(d(3),d(2),d(1)) +}; +static const float3 cga3l[4] = +{ + float3(d(0),d(0),d(0)), + float3(d(0),d(2),d(2)), + float3(d(2),d(0),d(0)), + float3(d(2),d(2),d(2)) +}; +static const float3 cga3h[4] = +{ + float3(d(0),d(0),d(0)), + float3(d(1),d(3),d(3)), + float3(d(3),d(1),d(1)), + float3(d(3),d(3),d(3)) +}; +static const float3 stdega[16] = +{ + float3(d(0),d(0),d(0)), + float3(d(2),d(0),d(0)), + float3(d(0),d(2),d(0)), + float3(d(2),d(1),d(0)), + float3(d(0),d(0),d(2)), + float3(d(2),d(0),d(2)), + float3(d(0),d(2),d(2)), + float3(d(2),d(2),d(2)), + float3(d(1),d(1),d(1)), + float3(d(3),d(1),d(1)), + float3(d(1),d(3),d(1)), + float3(d(3),d(3),d(1)), + float3(d(1),d(1),d(3)), + float3(d(3),d(1),d(3)), + float3(d(1),d(3),d(3)), + float3(d(3),d(3),d(3)) +}; +#undef d +#define d(x) x/256.0 +static const float3 aosega[16] = +{ + float3(d( 0),d( 0),d( 0)), + float3(d(128),d( 0),d( 0)), + float3(d( 32),d(128),d( 0)), + float3(d(160),d( 64),d( 32)), + float3(d( 0),d( 32),d( 88)), + float3(d( 60),d( 0),d( 88)), + float3(d( 16),d(160),d(208)), + float3(d( 88),d( 88),d( 88)), + float3(d( 32),d( 32),d( 32)), + float3(d(256),d( 64),d( 64)), + float3(d( 72),d(256),d( 64)), + float3(d(256),d(224),d( 60)), + float3(d( 48),d(128),d(256)), + float3(d(192),d( 48),d(256)), + float3(d( 72),d(224),d(256)), + float3(d(256),d(256),d(256)), +}; +#undef d +/* standard stuff */ +float4 ScreenSize; +float4 Timer; +/* samplers and textures */ +texture2D texColor; +texture2D texNoise2 +< + string ResourceName = "menbnoise1.png"; +>; +texture2D texNoise3 +< + string ResourceName = "menbnoise2.png"; +>; +sampler2D SamplerColor = sampler_state +{ + Texture = ; + MinFilter = LINEAR; + MagFilter = LINEAR; + MipFilter = NONE; + AddressU = Mirror; + AddressV = Mirror; + SRGBTexture = FALSE; + MaxMipLevel = 0; + MipMapLodBias = 0; +}; +sampler2D SamplerNoise2 = sampler_state +{ + Texture = ; + MinFilter = LINEAR; + MagFilter = POINT; + MipFilter = NONE; + AddressU = Wrap; + AddressV = Wrap; + SRGBTexture = FALSE; + MaxMipLevel = 0; + MipMapLodBias = 0; +}; +sampler2D SamplerNoise3 = sampler_state +{ + Texture = ; + MinFilter = LINEAR; + MagFilter = LINEAR; + MipFilter = NONE; + AddressU = Wrap; + AddressV = Wrap; + SRGBTexture = FALSE; + MaxMipLevel = 0; + MipMapLodBias = 0; +}; +/* whatever */ +struct VS_OUTPUT_POST +{ + float4 vpos : POSITION; + float2 txcoord : TEXCOORD0; +}; +struct VS_INPUT_POST +{ + float3 pos : POSITION; + float2 txcoord : TEXCOORD0; +}; diff --git a/enbseries/menbextrasettings.fx b/enbseries/menbextrasettings.fx new file mode 100644 index 0000000..586f540 --- /dev/null +++ b/enbseries/menbextrasettings.fx @@ -0,0 +1,190 @@ +/* + menbextrasettings.fx : MariENB extra user-tweakable variables. + (C)2013-2014 Marisa Kirisame, UnSX Team. + Part of MariENB, the personal ENB of Marisa. + Released under the WTFPL. +*/ +bool ne +< + string UIName = "UseGrain"; + string UIWidget = "Checkbox"; +> = {false}; +float nf +< + string UIName = "GrainFrequency"; + string UIWidget = "Spinner"; +> = {0.25}; +float ni +< + string UIName = "GrainIntensity"; + string UIWidget = "Spinner"; +> = {0.15}; +float ns +< + string UIName = "GrainSaturation"; + string UIWidget = "Spinner"; +> = {0.0}; +bool np +< + string UIName = "GrainTwoPass"; + string UIWidget = "Checkbox"; +> = {false}; +int nb +< + string UIName = "GrainBlend"; + string UIWidget = "Spinner"; + int UIMin = 0; + int UIMax = 3; +> = {0}; +float nk +< + string UIName = "GrainTwoPassFactor"; + string UIWidget = "Spinner"; +> = {0.04}; +float nm1 +< + string UIName = "GrainMagnification1"; + string UIWidget = "Spinner"; +> = {13.25}; +float nm2 +< + string UIName = "GrainMagnification2"; + string UIWidget = "Spinner"; +> = {19.64}; +float nm3 +< + string UIName = "GrainMagnification3"; + string UIWidget = "Spinner"; +> = {17.35}; +float nm11 +< + string UIName = "GrainPass1Magnification1"; + string UIWidget = "Spinner"; +> = {2.05}; +float nm12 +< + string UIName = "GrainPass1Magnification2"; + string UIWidget = "Spinner"; +> = {3.11}; +float nm13 +< + string UIName = "GrainPass1Magnification3"; + string UIWidget = "Spinner"; +> = {2.22}; +float nm21 +< + string UIName = "GrainPass2Magnification1"; + string UIWidget = "Spinner"; +> = {4.25}; +float nm22 +< + string UIName = "GrainPass2Magnification2"; + string UIWidget = "Spinner"; +> = {0.42}; +float nm23 +< + string UIName = "GrainPass2Magnification3"; + string UIWidget = "Spinner"; +> = {6.29}; +float nj +< + string UIName = "GrainPower"; + string UIWidget = "Spinner"; +> = {4.33}; +bool usecurve +< + string UIName = "UseCurve"; + string UIWidget = "Checkbox"; +> = {false}; +float chromaab +< + string UIName = "CurveChromaAberration"; + string UIWidget = "Spinner"; +> = {0.07}; +float lenszoom +< + string UIName = "CurveLensZoom"; + string UIWidget = "Spinner"; +> = {50.25}; +float lensdist +< + string UIName = "CurveLensDistortion"; + string UIWidget = "Spinner"; +> = {0.0}; +float lensdistc +< + string UIName = "CurveLensDistortionCubic"; + string UIWidget = "Spinner"; +> = {0.0}; +bool lensclamp +< + string UIName = "CurveLensClamp"; + string UIWidget = "Checkbox"; +> = {true}; +bool useblock +< + string UIName = "UseBlockGFX"; + string UIWidget = "Checkbox"; +> = {false}; +float bresx +< + string UIName = "EmulatedResX"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {0.5}; +float bresy +< + string UIName = "EmulatedResY"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {0.5}; +int paltype +< + string UIName = "PaletteType"; + string UIWidget = "Spinner"; + int UIMin = -1; + int UIMax = 6; +> = {2}; +int cgapal +< + string UIName = "CGAPalette"; + string UIWidget = "Spinner"; + int UIMin = 0; + int UIMax = 6; +> = {1}; +int egapal +< + string UIName = "EGAPalette"; + string UIWidget = "Spinner"; + int UIMin = 0; + int UIMax = 1; +> = {0}; +int dither +< + string UIName = "DitherMode"; + string UIWidget = "Spinner"; + int UIMin = -1; + int UIMax = 4; +> = {4}; +float bgamma +< + string UIName = "GammaMod"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {0.65}; +float bdbump +< + string UIName = "DitherBump"; + string UIWidget = "Spinner"; +> = {-0.1}; +float bdmult +< + string UIName = "DitherMultiplier"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {0.3}; +float bsaturation +< + string UIName = "SaturationMod"; + string UIWidget = "Spinner"; +> = {1.0}; \ No newline at end of file diff --git a/enbseries/menbnoise1.png b/enbseries/menbnoise1.png new file mode 100644 index 0000000..fb4bedf Binary files /dev/null and b/enbseries/menbnoise1.png differ diff --git a/enbseries/menbnoise2.png b/enbseries/menbnoise2.png new file mode 100644 index 0000000..3e57ebb Binary files /dev/null and b/enbseries/menbnoise2.png differ diff --git a/enbseries/menbprepassfilters.fx b/enbseries/menbprepassfilters.fx index 0c69bd5..7d76bab 100644 --- a/enbseries/menbprepassfilters.fx +++ b/enbseries/menbprepassfilters.fx @@ -41,7 +41,11 @@ float4 PS_Edge( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR float2 coord = IN.txcoord.xy; if ( noedge ) return tex2D(SamplerColor,coord); - float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); + float2 bresl; + if ( (fixedx > 0) && (fixedy > 0) ) + bresl = float2(fixedx,fixedy); + else + bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); float2 bof = float2(1.0/bresl.x,1.0/bresl.y); float mdx, mdy, mud; /* this reduces texture fetches by half, big difference */ @@ -82,8 +86,124 @@ float4 PS_Edge( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR res.rgb = mud; else res.rgb -= mud; + res.a = 1.0; return saturate(res); } +/* Crappy SSAO */ +float3 pseudonormal( float dep, float2 coord ) +{ + float2 ofs1 = float2(ssaonoff1*0.01,ssaonoff2*0.01); + float2 ofs2 = float2(ssaonoff3*0.01,ssaonoff4*0.01); + float dep1 = tex2D(SamplerDepth,coord+ofs1).x; + float dep2 = tex2D(SamplerDepth,coord+ofs2).x; + float3 p1 = float3(ofs1,dep1-dep); + float3 p2 = float3(ofs2,dep2-dep); + float3 normal = cross(p1,p2); + normal.z = -normal.z; + return normalize(normal); +} +float4 PS_SSAO( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR +{ + float2 coord = IN.txcoord.xy; + float4 res = tex2D(SamplerColor,coord); + if ( !ssaoenable ) + return res; + float2 bresl; + if ( (fixedx > 0) && (fixedy > 0) ) + bresl = float2(fixedx,fixedy); + else + bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); + float depth = tex2D(SamplerDepth,coord).x; + float3 normal = pseudonormal(depth,coord); + float2 nc = coord*(bresl/256.0); + float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*ssaoradius; + float3 rnormal = tex2D(SamplerNoise3,nc).xyz*2.0-1.0; + normal = normal+rnormal*ssaonoise; + float occ = 0.0; + int i; + float ldepth = depthlinear(coord); + for ( i=0; i<16; i++ ) + { + float3 sample = reflect(ssao_samples[i],normal); + float sampledepth = depthlinear(coord+i*sample.xy*bof); + float diff = sampledepth-ldepth; + if ( sampledepth > ldepth ) + occ += 1.0/(1.0+pow(diff,2)); + } + float uocc = saturate(1.0-occ/16.0); + float fade = 1.0-depth; + uocc *= saturate(pow(fade,ssaofadepow)*ssaofademult); + uocc = saturate(pow(uocc,ssaopow)*ssaomult); + if ( depth >= 0.999999 ) + uocc = 0.0; + if ( ssaodebug == 1 ) + return saturate(1.0-(uocc*ssaoblend)); + if ( ssaodebug == 2 ) + return (float4(normal.x,normal.y,normal.z,1.0)+1.0)*0.5; + res.a = saturate(1.0-(uocc*ssaoblend)); + return res; +} +float4 PS_SSAO_Post( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR +{ + float2 coord = IN.txcoord.xy; + float4 res = tex2D(SamplerColor,coord); + if ( !ssaoenable ) + return res; + if ( !ssaobenable || (ssaodebug == 2) ) + return res*res.a; + float2 bresl; + if ( (fixedx > 0) && (fixedy > 0) ) + bresl = float2(fixedx,fixedy); + else + bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); + float2 bof = float2(1.0/bresl.x,1.0/bresl.y); + res.a = gauss7[3][3]*tex2D(SamplerColor,coord+float2(-3,-3)*bof).a; + res.a += gauss7[2][3]*tex2D(SamplerColor,coord+float2(-2,-3)*bof).a; + res.a += gauss7[1][3]*tex2D(SamplerColor,coord+float2(-1,-3)*bof).a; + res.a += gauss7[0][3]*tex2D(SamplerColor,coord+float2(0,-3)*bof).a; + res.a += gauss7[1][3]*tex2D(SamplerColor,coord+float2(1,-3)*bof).a; + res.a += gauss7[2][3]*tex2D(SamplerColor,coord+float2(2,-3)*bof).a; + res.a += gauss7[3][3]*tex2D(SamplerColor,coord+float2(3,-3)*bof).a; + res.a += gauss7[3][2]*tex2D(SamplerColor,coord+float2(-3,-2)*bof).a; + res.a += gauss7[2][2]*tex2D(SamplerColor,coord+float2(-2,-2)*bof).a; + res.a += gauss7[1][2]*tex2D(SamplerColor,coord+float2(-1,-2)*bof).a; + res.a += gauss7[0][2]*tex2D(SamplerColor,coord+float2(0,-2)*bof).a; + res.a += gauss7[1][2]*tex2D(SamplerColor,coord+float2(1,-2)*bof).a; + res.a += gauss7[2][2]*tex2D(SamplerColor,coord+float2(2,-2)*bof).a; + res.a += gauss7[3][2]*tex2D(SamplerColor,coord+float2(3,-2)*bof).a; + res.a += gauss7[3][1]*tex2D(SamplerColor,coord+float2(-3,-1)*bof).a; + res.a += gauss7[2][1]*tex2D(SamplerColor,coord+float2(-2,-1)*bof).a; + res.a += gauss7[1][1]*tex2D(SamplerColor,coord+float2(-1,-1)*bof).a; + res.a += gauss7[0][1]*tex2D(SamplerColor,coord+float2(0,-1)*bof).a; + res.a += gauss7[1][1]*tex2D(SamplerColor,coord+float2(1,-1)*bof).a; + res.a += gauss7[2][1]*tex2D(SamplerColor,coord+float2(2,-1)*bof).a; + res.a += gauss7[3][1]*tex2D(SamplerColor,coord+float2(3,-1)*bof).a; + res.a += gauss7[3][0]*tex2D(SamplerColor,coord+float2(-3,0)*bof).a; + res.a += gauss7[2][0]*tex2D(SamplerColor,coord+float2(-2,0)*bof).a; + res.a += gauss7[1][0]*tex2D(SamplerColor,coord+float2(-1,0)*bof).a; + res.a += gauss7[0][0]*tex2D(SamplerColor,coord+float2(0,0)*bof).a; + res.a += gauss7[1][0]*tex2D(SamplerColor,coord+float2(1,0)*bof).a; + res.a += gauss7[2][0]*tex2D(SamplerColor,coord+float2(2,0)*bof).a; + res.a += gauss7[3][0]*tex2D(SamplerColor,coord+float2(3,0)*bof).a; + res.a += gauss7[3][1]*tex2D(SamplerColor,coord+float2(-3,1)*bof).a; + res.a += gauss7[2][1]*tex2D(SamplerColor,coord+float2(-2,1)*bof).a; + res.a += gauss7[1][1]*tex2D(SamplerColor,coord+float2(-1,1)*bof).a; + res.a += gauss7[0][1]*tex2D(SamplerColor,coord+float2(0,1)*bof).a; + res.a += gauss7[1][1]*tex2D(SamplerColor,coord+float2(1,1)*bof).a; + res.a += gauss7[2][1]*tex2D(SamplerColor,coord+float2(2,1)*bof).a; + res.a += gauss7[3][1]*tex2D(SamplerColor,coord+float2(3,1)*bof).a; + res.a += gauss7[3][2]*tex2D(SamplerColor,coord+float2(-3,2)*bof).a; + res.a += gauss7[2][2]*tex2D(SamplerColor,coord+float2(-2,2)*bof).a; + res.a += gauss7[1][2]*tex2D(SamplerColor,coord+float2(-1,2)*bof).a; + res.a += gauss7[0][2]*tex2D(SamplerColor,coord+float2(0,2)*bof).a; + res.a += gauss7[1][2]*tex2D(SamplerColor,coord+float2(1,2)*bof).a; + res.a += gauss7[2][2]*tex2D(SamplerColor,coord+float2(2,2)*bof).a; + res.a += gauss7[3][2]*tex2D(SamplerColor,coord+float2(3,2)*bof).a; + if ( ssaodebug == 1 ) + return res.a; + res *= res.a; + return res; +} /* Focus */ float4 PS_ReadFocus( VS_OUTPUT_POST IN ) : COLOR { @@ -154,7 +274,11 @@ float4 PS_DoF( VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform int p ) : COLOR float doffixedunfocusblend = lerp(lerp(doffixedunfocusblend_n, doffixedunfocusblend_d,tod),lerp(doffixedunfocusblend_in, doffixedunfocusblend_id,tod),ind); - float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); + float2 bresl; + if ( (fixedx > 0) && (fixedy > 0) ) + bresl = float2(fixedx,fixedy); + else + bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w); float2 bof = float2(1.0/bresl.x,1.0/bresl.y); float dep; if ( dofsmooth ) @@ -267,7 +391,7 @@ technique PostProcess2 pass p0 { VertexShader = compile vs_3_0 VS_Pass(); - PixelShader = compile ps_3_0 PS_DoF(0); + PixelShader = compile ps_3_0 PS_SSAO(); DitherEnable = FALSE; ZEnable = FALSE; CullMode = NONE; @@ -280,6 +404,40 @@ technique PostProcess2 } } technique PostProcess3 +{ + pass p0 + { + VertexShader = compile vs_3_0 VS_Pass(); + PixelShader = compile ps_3_0 PS_SSAO_Post(); + DitherEnable = FALSE; + ZEnable = FALSE; + CullMode = NONE; + ALPHATESTENABLE = FALSE; + SEPARATEALPHABLENDENABLE = FALSE; + AlphaBlendEnable = FALSE; + StencilEnable = FALSE; + FogEnable = FALSE; + SRGBWRITEENABLE = FALSE; + } +} +technique PostProcess4 +{ + pass p0 + { + VertexShader = compile vs_3_0 VS_Pass(); + PixelShader = compile ps_3_0 PS_DoF(0); + DitherEnable = FALSE; + ZEnable = FALSE; + CullMode = NONE; + ALPHATESTENABLE = FALSE; + SEPARATEALPHABLENDENABLE = FALSE; + AlphaBlendEnable = FALSE; + StencilEnable = FALSE; + FogEnable = FALSE; + SRGBWRITEENABLE = FALSE; + } +} +technique PostProcess5 { pass p0 { diff --git a/enbseries/menbprepassinternals.fx b/enbseries/menbprepassinternals.fx index c2606a5..1ae4305 100644 --- a/enbseries/menbprepassinternals.fx +++ b/enbseries/menbprepassinternals.fx @@ -31,6 +31,25 @@ static const float3x3 gauss5 = 0.0692041522491,0.0553633217993,0.0276816609, 0.0346020761246,0.0276816609,0.01384083045 }; +static const float4x4 gauss7 = +{ + 0.0632507440209,0.0527089533508,0.0301194019147,0.011294775718, + 0.0527089533508,0.0439241277923,0.0250995015956,0.00941231309835, + 0.0301194019147,0.0250995015956,0.01434257234,0.00537846462763, + 0.011294775718,0.00941231309835,0.00537846462763,0.00201692423536 +}; +/* SSAO sample sphere */ +static const float3 ssao_samples[16] = +{ + float3( 0.5381, 0.1856,-0.4319),float3( 0.1379, 0.2486, 0.4430), + float3( 0.3371, 0.5679,-0.0057),float3(-0.6999,-0.0451,-0.0019), + float3( 0.0689,-0.1598,-0.8547),float3( 0.0560, 0.0069,-0.1843), + float3(-0.0146, 0.1402, 0.0762),float3( 0.0100,-0.1924,-0.0344), + float3(-0.3577,-0.5301,-0.4358),float3(-0.3169, 0.1063, 0.0158), + float3( 0.0103,-0.5869, 0.0046),float3(-0.0897,-0.4940, 0.3287), + float3( 0.7119,-0.0154,-0.0918),float3(-0.0533, 0.0596,-0.5411), + float3( 0.0352,-0.0631, 0.5460),float3(-0.4776, 0.2847,-0.0271) +}; /* standard stuff */ float4 ScreenSize; float ENightDayFactor; @@ -40,6 +59,10 @@ float4 Timer; /* samplers and textures */ texture2D texColor; texture2D texDepth; +texture2D texNoise3 +< + string ResourceName = "menbnoise2.png"; +>; texture2D texFocus; texture2D texCurr; texture2D texPrev; @@ -67,6 +90,18 @@ sampler2D SamplerDepth = sampler_state MaxMipLevel = 0; MipMapLodBias = 0; }; +sampler2D SamplerNoise3 = sampler_state +{ + Texture = ; + MinFilter = LINEAR; + MagFilter = LINEAR; + MipFilter = NONE; + AddressU = Wrap; + AddressV = Wrap; + SRGBTexture = FALSE; + MaxMipLevel = 0; + MipMapLodBias = 0; +}; sampler2D SamplerFocus = sampler_state { Texture = ; diff --git a/enbseries/menbprepasssettings.fx b/enbseries/menbprepasssettings.fx index ccb08dc..8931e08 100644 --- a/enbseries/menbprepasssettings.fx +++ b/enbseries/menbprepasssettings.fx @@ -4,6 +4,19 @@ Part of MariENB, the personal ENB of Marisa. Released under the WTFPL. */ +/* fixed resolution */ +int fixedx +< + string UIName = "_FixedResolutionX"; + string UIWidget = "Spinner"; + int UIMin = 0; +> = {0}; +int fixedy +< + string UIName = "_FixedResolutionY"; + string UIWidget = "Spinner"; + int UIMin = 0; +> = {0}; /* circle average focus */ bool focuscircle < @@ -303,4 +316,78 @@ float edgemult < string UIName = "EdgeMultiplier"; string UIWidget = "Spinner"; -> = {32.0}; \ No newline at end of file +> = {32.0}; +/* ssao filter */ +bool ssaoenable +< + string UIName = "SSAOEnable"; + string UIWidget = "Checkbox"; +> = {false}; +int ssaodebug +< + string UIName = "SSAODebug"; + string UIWidget = "Spinner"; + int UIMin = 0; + int UIMax = 2; +> = 0; +float ssaonoff1 +< + string UIName = "SSAONormalOffset1"; + string UIWidget = "Spinner"; +> = {0.0}; +float ssaonoff2 +< + string UIName = "SSAONormalOffset2"; + string UIWidget = "Spinner"; +> = {0.1}; +float ssaonoff3 +< + string UIName = "SSAONormalOffset3"; + string UIWidget = "Spinner"; +> = {0.1}; +float ssaonoff4 +< + string UIName = "SSAONormalOffset4"; + string UIWidget = "Spinner"; +> = {0.0}; +float ssaoradius +< + string UIName = "SSAORadius"; + string UIWidget = "Spinner"; +> = {1.0}; +float ssaonoise +< + string UIName = "SSAONoise"; + string UIWidget = "Spinner"; +> = {0.5}; +float ssaofadepow +< + string UIName = "SSAOFadePower"; + string UIWidget = "Spinner"; +> = {1.5}; +float ssaofademult +< + string UIName = "SSAOFadeMultiplier"; + string UIWidget = "Spinner"; +> = {15.0}; +float ssaomult +< + string UIName = "SSAOMultiplier"; + string UIWidget = "Spinner"; +> = {1.0}; +float ssaopow +< + string UIName = "SSAOPower"; + string UIWidget = "Spinner"; + float UIMin = 0.0; +> = {1.0}; +float ssaoblend +< + string UIName = "SSAOBlend"; + string UIWidget = "Spinner"; +> = {1.0}; +bool ssaobenable +< + string UIName = "SSAOBlurEnable"; + string UIWidget = "Spinner"; +> = {true};