Alpha 2
This commit is contained in:
parent
f3268064c7
commit
bda22542ff
40 changed files with 1986 additions and 3546 deletions
|
|
@ -1,165 +0,0 @@
|
|||
[EFFECT.TXT]
|
||||
TECHNIQUE=0
|
||||
EnableFXAA=false
|
||||
FXAASpanMax=2.0
|
||||
FXAAReduceMul=32.0
|
||||
FXAAReduceMin=128.0
|
||||
BlurEnable=false
|
||||
BlurSampleNight=1.0
|
||||
BlurSampleDay=0.86
|
||||
BlurSampleInteriorNight=0.93
|
||||
BlurSampleInteriorDay=0.75
|
||||
BlurLevel=1
|
||||
BlurPowerNight=14.95
|
||||
BlurPowerDay=11.57
|
||||
BlurPowerInteriorNight=16.059999
|
||||
BlurPowerInteriorDay=12.22
|
||||
BlurCurveNight=1.45
|
||||
BlurCurveDay=1.53
|
||||
BlurCurveInteriorNight=1.32
|
||||
BlurCurveInteriorDay=1.49
|
||||
BlurRadiusNight=0.68
|
||||
BlurRadiusDay=0.62
|
||||
BlurRadiusInteriorNight=0.74
|
||||
BlurRadiusInteriorDay=0.7
|
||||
DarkEnable=true
|
||||
DarkRadiusNight=0.35
|
||||
DarkRadiusDay=0.25
|
||||
DarkRadiusInteriorNight=0.45
|
||||
DarkRadiusInteriorDay=0.3
|
||||
DarkCurveNight=2.16
|
||||
DarkCurveDay=2.45
|
||||
DarkCurveInteriorNight=1.95
|
||||
DarkCurveInteriorDay=2.34
|
||||
DarkBumpNight=0.79
|
||||
DarkBumpDay=0.62
|
||||
DarkBumpInteriorNight=0.9
|
||||
DarkBumpInteriorDay=0.82
|
||||
EnableCompensate=true
|
||||
CompensateFactorNight=0.65
|
||||
CompensateFactorDay=0.72
|
||||
CompensateFactorInteriorNight=0.71
|
||||
CompensateFactorInteriorDay=0.78
|
||||
CompensatePowerNight=1.14
|
||||
CompensatePowerDay=1.18
|
||||
CompensatePowerInteriorNight=1.16
|
||||
CompensatePowerInteriorDay=1.23
|
||||
CompensateSaturationNight=0.86
|
||||
CompensateSaturationDay=0.41
|
||||
CompensateSaturationInteriorNight=0.82
|
||||
CompensateSaturationInteriorDay=0.49
|
||||
CompensateBumpNight=0.0
|
||||
CompensateBumpDay=0.0
|
||||
CompensateBumpInteriorNight=0.0
|
||||
CompensateBumpInteriorDay=0.0
|
||||
EnableGrading=true
|
||||
GradingAddRNight=0.0
|
||||
GradingAddGNight=0.0
|
||||
GradingAddBNight=0.0
|
||||
GradingAddRDay=0.0
|
||||
GradingAddGDay=0.0
|
||||
GradingAddBDay=0.0
|
||||
GradingAddRInteriorNight=0.0
|
||||
GradingAddGInteriorNight=0.0
|
||||
GradingAddBInteriorNight=0.0
|
||||
GradingAddRInteriorDay=0.0
|
||||
GradingAddGInteriorDay=0.0
|
||||
GradingAddBInteriorDay=0.0
|
||||
GradingMulRNight=3.01
|
||||
GradingMulGNight=3.12
|
||||
GradingMulBNight=3.24
|
||||
GradingMulRDay=3.42
|
||||
GradingMulGDay=3.34
|
||||
GradingMulBDay=3.24
|
||||
GradingMulRInteriorNight=3.57
|
||||
GradingMulGInteriorNight=3.43
|
||||
GradingMulBInteriorNight=3.27
|
||||
GradingMulRInteriorDay=3.67
|
||||
GradingMulGInteriorDay=3.56
|
||||
GradingMulBInteriorDay=3.48
|
||||
GradingPowRNight=1.03
|
||||
GradingPowGNight=1.01
|
||||
GradingPowBNight=0.95
|
||||
GradingPowRDay=1.23
|
||||
GradingPowGDay=1.2
|
||||
GradingPowBDay=1.14
|
||||
GradingPowRInteriorNight=1.07
|
||||
GradingPowGInteriorNight=1.02
|
||||
GradingPowBInteriorNight=0.97
|
||||
GradingPowRInteriorDay=1.21
|
||||
GradingPowGInteriorDay=1.16
|
||||
GradingPowBInteriorDay=1.11
|
||||
GradingColRNight=-0.21
|
||||
GradingColGNight=-0.28
|
||||
GradingColBNight=-1.41
|
||||
GradingColRDay=-0.8
|
||||
GradingColGDay=-0.2
|
||||
GradingColBDay=-0.62
|
||||
GradingColRInteriorNight=-0.52
|
||||
GradingColGInteriorNight=-0.3
|
||||
GradingColBInteriorNight=-1.37
|
||||
GradingColRInteriorDay=-0.52
|
||||
GradingColGInteriorDay=-0.36
|
||||
GradingColBInteriorDay=-0.72
|
||||
GradingColFactorNight=-0.27
|
||||
GradingColFactorDay=-0.16
|
||||
GradingColFactorInteriorNight=-0.24
|
||||
GradingColFactorInteriorDay=-0.12
|
||||
EnableSoftGrain=false
|
||||
SoftGrainSpeedNight=0.02
|
||||
SoftGrainSpeedDay=0.07
|
||||
SoftGrainSpeedInteriorNight=0.01
|
||||
SoftGrainSpeedInteriorDay=0.03
|
||||
SoftGrainIntensityNight=0.03
|
||||
SoftGrainIntensityDay=0.01
|
||||
SoftGrainIntensityInteriorNight=0.03
|
||||
SoftGrainIntensityInteriorDay=0.01
|
||||
SoftGrainSaturationNight=-0.22
|
||||
SoftGrainSaturationDay=-0.18
|
||||
SoftGrainSaturationInteriorNight=-0.24
|
||||
SoftGrainSaturationInteriorDay=-0.31
|
||||
SoftGrainTwopass=false
|
||||
SoftGrainBlendfunc=1
|
||||
SoftGrainDeviation=0.05
|
||||
SoftGrainMagnification1=13.69
|
||||
SoftGrainMagnification2=19.26
|
||||
SoftGrainMagnification3=17.889999
|
||||
SoftGrainMagnification11=2.05
|
||||
SoftGrainMagnification12=3.11
|
||||
SoftGrainMagnification13=2.22
|
||||
SoftGrainMagnification21=4.25
|
||||
SoftGrainMagnification22=0.42
|
||||
SoftGrainMagnification23=6.29
|
||||
SoftGrainPowerNight=2.16
|
||||
SoftGrainPowerDay=5.22
|
||||
SoftGrainPowerInteriorNight=2.59
|
||||
SoftGrainPowerInteriorDay=4.7
|
||||
EnableBlockGFX=false
|
||||
BlockGFXResolutionW=1.0
|
||||
BlockGFXResolutionH=1.0
|
||||
BlockGFXpalette=0
|
||||
BlockGFXcgamode=0
|
||||
BlockGFXegamode=1
|
||||
BlockGFXDither=5
|
||||
BlockGFXPrepassGamma=0.25
|
||||
BlockGFXDitherBump=-0.5
|
||||
BlockGFXDitherMultiplier=0.5
|
||||
BlockGFXPrepassSaturation=-0.0
|
||||
EnableDirt=false
|
||||
DirtCoordFactor=0.25
|
||||
DirtLuminanceFactor=0.0
|
||||
DirtCoordMagnification=2.0
|
||||
DirtLuminanceMagnification=1.0
|
||||
EnableBox=true
|
||||
BoxHorizontal=1.5
|
||||
BoxVertical=0.85
|
||||
BoxSoften=0.01
|
||||
BoxAlpha=5.999999
|
||||
EnableCurvature=false
|
||||
CurveChromaticAberration=0.06
|
||||
CurveZoom=50.299999
|
||||
CurveLens=0.0
|
||||
CurveLensCubic=0.0
|
||||
EnableSharpen=true
|
||||
SharpenSample=0.2
|
||||
SharpenBlend=1.0
|
||||
12
enbseries/enbbloom.fx
Normal file
12
enbseries/enbbloom.fx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
enbbloom.fx : MariENB bloom filter.
|
||||
(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 "menbbloomsettings.fx"
|
||||
#include "menbbloominternals.fx"
|
||||
#include "menbbloomfilters.fx"
|
||||
|
|
@ -1,11 +1,18 @@
|
|||
[ENBBLOOM.FX]
|
||||
TECHNIQUE=0
|
||||
PreEnable=true
|
||||
PreSample=1.0
|
||||
PreLevel=1
|
||||
PostSample=1.000001
|
||||
PostLevel=1
|
||||
BloomIntensity=0.4
|
||||
BloomBump=-0.1
|
||||
BloomPower=1.5
|
||||
BloomSaturation=0.75
|
||||
BloomIntensityNight=0.99
|
||||
BloomIntensityDay=0.33
|
||||
BloomIntensityInteriorNight=0.97
|
||||
BloomIntensityInteriorDay=0.94
|
||||
BloomBumpNight=-0.07
|
||||
BloomBumpDay=-0.19
|
||||
BloomBumpInteriorNight=-0.1
|
||||
BloomBumpInteriorDay=-0.13
|
||||
BloomPowerNight=1.09
|
||||
BloomPowerDay=1.4
|
||||
BloomPowerInteriorNight=1.13
|
||||
BloomPowerInteriorDay=1.19
|
||||
BloomSaturationNight=0.86
|
||||
BloomSaturationDay=0.78
|
||||
BloomSaturationInteriorNight=0.91
|
||||
BloomSaturationInteriorDay=0.85
|
||||
|
|
|
|||
12
enbseries/enbeffect.fx
Normal file
12
enbseries/enbeffect.fx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
enbeffect.fx : MariENB base 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 "menbeffectsettings.fx"
|
||||
#include "menbeffectinternals.fx"
|
||||
#include "menbeffectfilters.fx"
|
||||
|
|
@ -1,28 +1,78 @@
|
|||
[ENBEFFECT.FX]
|
||||
TECHNIQUE=0
|
||||
EnableAdaptation=true
|
||||
AdaptationMinNight=0.89
|
||||
AdaptationMinDay=0.09
|
||||
AdaptationMinInteriorNight=1.12
|
||||
AdaptationMinInteriorDay=0.14
|
||||
AdaptationMaxNight=0.5
|
||||
AdaptationMaxDay=0.94
|
||||
AdaptationMaxInteriorNight=0.02
|
||||
AdaptationMaxInteriorDay=1.08
|
||||
EnableTonemapping=true
|
||||
TonemappingNight=1.13
|
||||
TonemappingDay=1.64
|
||||
TonemappingInteriorNight=1.25
|
||||
TonemappingInteriorDay=1.37
|
||||
TonemappingOversaturationNight=26.289999
|
||||
TonemappingOversaturationDay=10.95
|
||||
TonemappingOversaturationInteriorNight=22.74
|
||||
TonemappingOversaturationInteriorDay=15.83
|
||||
EnablePalette=true
|
||||
PaletteBlendNight=0.19
|
||||
PaletteBlendDay=0.33
|
||||
PaletteBlendInteriorNight=0.25
|
||||
PaletteBlendInteriorDay=0.45
|
||||
EnableBloomSoften=true
|
||||
BloomSoftenLevel=1
|
||||
BloomSoftenRadius=1.0
|
||||
CompensateFactorNight=0.22
|
||||
CompensateFactorDay=0.4
|
||||
CompensateFactorInteriorNight=0.32
|
||||
CompensateFactorInteriorDay=0.45
|
||||
CompensatePowerNight=1.16
|
||||
CompensatePowerDay=1.11
|
||||
CompensatePowerInteriorNight=1.1
|
||||
CompensatePowerInteriorDay=1.05
|
||||
CompensateSaturationNight=0.86
|
||||
CompensateSaturationDay=0.87
|
||||
CompensateSaturationInteriorNight=0.97
|
||||
CompensateSaturationInteriorDay=0.99
|
||||
GradingMulRNight=1.32
|
||||
GradingMulGNight=1.25
|
||||
GradingMulBNight=1.45
|
||||
GradingMulRDay=1.7
|
||||
GradingMulGDay=1.45
|
||||
GradingMulBDay=1.29
|
||||
GradingMulRInteriorNight=1.46
|
||||
GradingMulGInteriorNight=1.52
|
||||
GradingMulBInteriorNight=1.55
|
||||
GradingMulRInteriorDay=1.53
|
||||
GradingMulGInteriorDay=1.51
|
||||
GradingMulBInteriorDay=1.41
|
||||
GradingPowRNight=1.02
|
||||
GradingPowGNight=1.06
|
||||
GradingPowBNight=1.03
|
||||
GradingPowRDay=1.09
|
||||
GradingPowGDay=1.08
|
||||
GradingPowBDay=1.05
|
||||
GradingPowRInteriorNight=1.08
|
||||
GradingPowGInteriorNight=1.11
|
||||
GradingPowBInteriorNight=1.06
|
||||
GradingPowRInteriorDay=1.03
|
||||
GradingPowGInteriorDay=1.06
|
||||
GradingPowBInteriorDay=1.0
|
||||
GradingColRNight=-0.59
|
||||
GradingColGNight=-0.26
|
||||
GradingColBNight=-0.73
|
||||
GradingColRDay=-0.62
|
||||
GradingColGDay=-0.1
|
||||
GradingColBDay=-0.81
|
||||
GradingColRInteriorNight=-0.19
|
||||
GradingColGInteriorNight=-0.18
|
||||
GradingColBInteriorNight=-0.62
|
||||
GradingColRInteriorDay=-0.22
|
||||
GradingColGInteriorDay=-0.21
|
||||
GradingColBInteriorDay=-0.33
|
||||
GradingColFactorNight=-0.2
|
||||
GradingColFactorDay=-0.14
|
||||
GradingColFactorInteriorNight=-0.08
|
||||
GradingColFactorInteriorDay=-0.12
|
||||
DarkRadiusNight=0.0
|
||||
DarkRadiusDay=0.0
|
||||
DarkRadiusInteriorNight=0.0
|
||||
DarkRadiusInteriorDay=0.0
|
||||
DarkCurveNight=1.7
|
||||
DarkCurveDay=2.3
|
||||
DarkCurveInteriorNight=1.35
|
||||
DarkCurveInteriorDay=1.67
|
||||
DarkBumpNight=0.74
|
||||
DarkBumpDay=0.33
|
||||
DarkBumpInteriorNight=0.82
|
||||
DarkBumpInteriorDay=0.61
|
||||
BoxVertical=1.0
|
||||
BoxSoften=0.0
|
||||
BoxAlpha=1.0
|
||||
AdaptationMinNight=0.11
|
||||
AdaptationMinDay=0.07
|
||||
AdaptationMinInteriorNight=0.07
|
||||
AdaptationMinInteriorDay=0.06
|
||||
AdaptationMaxNight=1.02
|
||||
AdaptationMaxDay=1.24
|
||||
AdaptationMaxInteriorNight=0.9
|
||||
AdaptationMaxInteriorDay=0.89
|
||||
BloomSoften=false
|
||||
|
|
|
|||
12
enbseries/enbeffectprepass.fx
Normal file
12
enbseries/enbeffectprepass.fx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
enbeffectprepass.fx : MariENB pre-pass filters.
|
||||
(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 "menbprepasssettings.fx"
|
||||
#include "menbprepassinternals.fx"
|
||||
#include "menbprepassfilters.fx"
|
||||
|
|
@ -1,50 +1,58 @@
|
|||
[ENBEFFECTPREPASS.FX]
|
||||
TECHNIQUE=0
|
||||
CelEnable=true
|
||||
CelMode=0
|
||||
CelRadius=0.5
|
||||
CelPower=0.25
|
||||
CelBump=0.0
|
||||
CelBlend=2.5
|
||||
SSAOEnable=true
|
||||
SSAODebug=0
|
||||
SSAORadius=16.0
|
||||
SSAOBump=0.0
|
||||
SSAOPower=4.0
|
||||
SSAOBlend=1.25
|
||||
SSAONoise=1.0
|
||||
DoFEnable=true
|
||||
DoFRadius=1.5
|
||||
DoFBump=0.0
|
||||
DoFPow=3.0
|
||||
DoFBlend=1.0
|
||||
DoFCut=0.0
|
||||
DoFDebug=0
|
||||
CelMult=2.0
|
||||
SSAOMult=2.0
|
||||
DoFMult=12.000001
|
||||
DoFLevel=1
|
||||
DoFPowNight=2.02
|
||||
DoFPowDay=2.2
|
||||
DoFPowInteriorNight=3.46
|
||||
DoFPowInteriorDay=3.69
|
||||
DoFDebug=false
|
||||
DoFMultNight=319.23999
|
||||
DoFMultDay=295.160004
|
||||
DoFMultInteriorNight=281.079987
|
||||
DoFMultInteriorDay=246.229996
|
||||
FocusCircleEnable=true
|
||||
FocusCircleSlices=3
|
||||
FocusCircleRadius=10.0
|
||||
FocusCircleCircles=1
|
||||
FocusDotDebugRadius=0.01
|
||||
FocusCircleStep=0.25
|
||||
FocusCircleOffset=0.0
|
||||
FocusCircleMix=0.25
|
||||
SSAONormalOffset1=0.0
|
||||
SSAONormalOffset2=0.01
|
||||
SSAONormalOffset3=0.01
|
||||
SSAONormalOffset4=0.0
|
||||
SSAONoiseSize=64.0
|
||||
SSAOBlurEnable=true
|
||||
SSAOBlurRadius=1.0
|
||||
SSAOBlurLevel=2
|
||||
SSAOTrim=1.0
|
||||
SSAOFadeBump=0.0
|
||||
SSAOFadeMult=0.5
|
||||
SSAOFadePow=1.0
|
||||
CelTrim=1.01
|
||||
CelFade=2.5
|
||||
SSAOFade=0.6
|
||||
DoFTrim=1.01
|
||||
FocusCircleRadiusNight=20.0
|
||||
FocusCircleRadiusDay=25.0
|
||||
FocusCircleRadiusInteriorNight=15.0
|
||||
FocusCircleRadiusInteriorDay=20.0
|
||||
FocusCircleMixNight=0.4
|
||||
FocusCircleMixDay=0.5
|
||||
FocusCircleMixInteriorNight=0.35
|
||||
FocusCircleMixInteriorDay=0.45
|
||||
FocusMaxNight=990.350037
|
||||
FocusMaxDay=994.340027
|
||||
FocusMaxInteriorNight=984.919983
|
||||
FocusMaxInteriorDay=989.539978
|
||||
DoFFixedFocusedMultNight=1.0
|
||||
DoFFixedFocusedMultDay=1.0
|
||||
DoFFixedFocusedMultInteriorNight=1.0
|
||||
DoFFixedFocusedMultInteriorDay=1.0
|
||||
DoFFixedFocusedPowNight=1.0
|
||||
DoFFixedFocusedPowDay=1.0
|
||||
DoFFixedFocusedPowInteriorNight=1.0
|
||||
DoFFixedFocusedPowInteriorDay=1.0
|
||||
DoFFixedFocusedBlendNight=0.0
|
||||
DoFFixedFocusedBlendDay=0.0
|
||||
DoFFixedFocusedBlendInteriorNight=0.0
|
||||
DoFFixedFocusedBlendInteriorDay=0.0
|
||||
DoFFixedUnfocusedMultNight=1.6
|
||||
DoFFixedUnfocusedMultDay=1.5
|
||||
DoFFixedUnfocusedMultInteriorNight=1.3
|
||||
DoFFixedUnfocusedMultInteriorDay=1.18
|
||||
DoFFixedUnfocusedPowNight=956.559998
|
||||
DoFFixedUnfocusedPowDay=983.109985
|
||||
DoFFixedUnfocusedPowInteriorNight=962.349976
|
||||
DoFFixedUnfocusedPowInteriorDay=979.340027
|
||||
DoFFixedUnfocusedBlendNight=1.0
|
||||
DoFFixedUnfocusedBlendDay=1.0
|
||||
DoFFixedUnfocusedBlendInteriorNight=1.0
|
||||
DoFFixedUnfocusedBlendInteriorDay=1.0
|
||||
DoFTwoPass=false
|
||||
EdgeDisable=true
|
||||
EdgeView=false
|
||||
EdgeFadePower=1.6
|
||||
EdgeFadeMultiplier=16.0
|
||||
EdgePower=1.5
|
||||
EdgeMultiplier=32.0
|
||||
DoFDisable=false
|
||||
DoFSmoothing=false
|
||||
DoFCutoff=false
|
||||
|
|
|
|||
76
enbseries/enblens.fx
Normal file
76
enbseries/enblens.fx
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
enblens.fx : MariENB Lens filters.
|
||||
(C)2013-2014 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the WTFPL.
|
||||
*/
|
||||
/*
|
||||
This shader left unimplemented. Development of the filter is a massive pain
|
||||
in the ass thanks to the incompetence of a certain individual named Boris
|
||||
Vorontsov and the major breakage of his ENB project.
|
||||
|
||||
Lots of blind debugging are necessary to get the goddamn thing to compile,
|
||||
and from the looks of it the filter, which works flawlessly on MariEFX, is
|
||||
completely unportable to this massive bag of dicks. After DAYS of
|
||||
selectively commenting out code, the only way it can compile is if the
|
||||
shader does NOTHING. For ever minor change to the code, five minutes of
|
||||
waiting are needed so the entire thing recompiles! FIVE MINUTES! Just how
|
||||
can you fuck up that badly? By comparison eFX takes mere seconds to reload
|
||||
everything on the considerably more complex MariEFX project, but this... I
|
||||
can't imagine what awful programming resulted in such a terrible bottleneck.
|
||||
|
||||
tl;dr: Fuck you, Boris.
|
||||
|
||||
-- Marisa
|
||||
*/
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
VS_OUTPUT_POST VS_Dummy( VS_INPUT_POST IN )
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
OUT.vpos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
|
||||
OUT.txcoord0.xy = IN.txcoord0.xy;
|
||||
return OUT;
|
||||
}
|
||||
float4 PS_Dummy( VS_OUTPUT_POST In ) : COLOR
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
technique Draw
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Dummy();
|
||||
PixelShader = compile ps_3_0 PS_Dummy();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SeparateAlphaBlendEnable = FALSE;
|
||||
SRGBWriteEnable = FALSE;
|
||||
}
|
||||
}
|
||||
technique LensPostPass
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Dummy();
|
||||
PixelShader = compile ps_3_0 PS_Dummy();
|
||||
AlphaBlendEnable = TRUE;
|
||||
SrcBlend = ONE;
|
||||
DestBlend = ONE;
|
||||
ColorWriteEnable = RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SeparateAlphaBlendEnable = FALSE;
|
||||
SRGBWriteEnable = FALSE;
|
||||
}
|
||||
}
|
||||
BIN
enbseries/enbpalette.bmp
Normal file
BIN
enbseries/enbpalette.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 192 KiB |
BIN
enbseries/enbraindrops.tga
Normal file
BIN
enbseries/enbraindrops.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4 KiB |
49
enbseries/enbsunsprite.fx
Normal file
49
enbseries/enbsunsprite.fx
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
enbsunsprite.fx : MariENB sun sprite filters.
|
||||
(C)2013-2014 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the WTFPL.
|
||||
*/
|
||||
/* This shader intentionally does nothing */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord : TEXCOORD0;
|
||||
};
|
||||
VS_OUTPUT_POST VS_Dummy( VS_INPUT_POST IN )
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
float4 pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
|
||||
OUT.vpos = pos;
|
||||
OUT.txcoord.xy = IN.txcoord.xy;
|
||||
return OUT;
|
||||
}
|
||||
float4 PS_Dummy( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
technique Draw
|
||||
{
|
||||
pass P0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Dummy();
|
||||
PixelShader = compile ps_3_0 PS_Dummy();
|
||||
AlphaBlendEnable = TRUE;
|
||||
SrcBlend = ONE;
|
||||
DestBlend = ONE;
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
153
enbseries/menbbloomfilters.fx
Normal file
153
enbseries/menbbloomfilters.fx
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
menbbloomfilters.fx : MariENB bloom 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_Bloom(VS_INPUT_POST IN)
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
float4 pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1);
|
||||
OUT.vpos = pos;
|
||||
OUT.txcoord0.xy = IN.txcoord0.xy+TempParameters.xy;
|
||||
return OUT;
|
||||
}
|
||||
/* pre-pass bloom texture preparation */
|
||||
float4 PS_BloomPrePass(VS_OUTPUT_POST In) : COLOR
|
||||
{
|
||||
float tod = ENightDayFactor;
|
||||
float ind = EInteriorFactor;
|
||||
float bloombump = lerp(lerp(bloombump_n,bloombump_d,tod),
|
||||
lerp(bloombump_in,bloombump_id,tod),ind);
|
||||
float bloompower = lerp(lerp(bloompower_n,bloompower_d,tod),
|
||||
lerp(bloompower_in,bloompower_id,tod),ind);
|
||||
float bloomsaturation = lerp(lerp(bloomsaturation_n,bloomsaturation_d,
|
||||
tod),lerp(bloomsaturation_in,bloomsaturation_id,tod),ind);
|
||||
float bloomintensity = lerp(lerp(bloomintensity_n,bloomintensity_d,
|
||||
tod),lerp(bloomintensity_in,bloomintensity_id,tod),ind);
|
||||
float2 coord = In.txcoord0.xy;
|
||||
float4 res = tex2D(SamplerBloom1,coord);
|
||||
res = pow(saturate(res+bloombump),bloompower);
|
||||
float ress = (res.r+res.g+res.b)/3.0;
|
||||
res = res*bloomsaturation+ress*(1.0-bloomsaturation);
|
||||
res.rgb *= bloomintensity;
|
||||
return res;
|
||||
}
|
||||
/*
|
||||
multipass (cannot specify how many bloom textures to use, so considerable
|
||||
performance rape. good job, boris)
|
||||
*/
|
||||
float4 PS_BloomTexture(VS_OUTPUT_POST In) : COLOR
|
||||
{
|
||||
float2 coord = In.txcoord0.xy;
|
||||
float2 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;
|
||||
res = gauss7[3][3]*tex2D(SamplerBloom1,coord+float2(-3,-3)*bof);
|
||||
res += gauss7[2][3]*tex2D(SamplerBloom1,coord+float2(-2,-3)*bof);
|
||||
res += gauss7[1][3]*tex2D(SamplerBloom1,coord+float2(-1,-3)*bof);
|
||||
res += gauss7[0][3]*tex2D(SamplerBloom1,coord+float2(0,-3)*bof);
|
||||
res += gauss7[1][3]*tex2D(SamplerBloom1,coord+float2(1,-3)*bof);
|
||||
res += gauss7[2][3]*tex2D(SamplerBloom1,coord+float2(2,-3)*bof);
|
||||
res += gauss7[3][3]*tex2D(SamplerBloom1,coord+float2(3,-3)*bof);
|
||||
res += gauss7[3][2]*tex2D(SamplerBloom1,coord+float2(-3,-2)*bof);
|
||||
res += gauss7[2][2]*tex2D(SamplerBloom1,coord+float2(-2,-2)*bof);
|
||||
res += gauss7[1][2]*tex2D(SamplerBloom1,coord+float2(-1,-2)*bof);
|
||||
res += gauss7[0][2]*tex2D(SamplerBloom1,coord+float2(0,-2)*bof);
|
||||
res += gauss7[1][2]*tex2D(SamplerBloom1,coord+float2(1,-2)*bof);
|
||||
res += gauss7[2][2]*tex2D(SamplerBloom1,coord+float2(2,-2)*bof);
|
||||
res += gauss7[3][2]*tex2D(SamplerBloom1,coord+float2(3,-2)*bof);
|
||||
res += gauss7[3][1]*tex2D(SamplerBloom1,coord+float2(-3,-1)*bof);
|
||||
res += gauss7[2][1]*tex2D(SamplerBloom1,coord+float2(-2,-1)*bof);
|
||||
res += gauss7[1][1]*tex2D(SamplerBloom1,coord+float2(-1,-1)*bof);
|
||||
res += gauss7[0][1]*tex2D(SamplerBloom1,coord+float2(0,-1)*bof);
|
||||
res += gauss7[1][1]*tex2D(SamplerBloom1,coord+float2(1,-1)*bof);
|
||||
res += gauss7[2][1]*tex2D(SamplerBloom1,coord+float2(2,-1)*bof);
|
||||
res += gauss7[3][1]*tex2D(SamplerBloom1,coord+float2(3,-1)*bof);
|
||||
res += gauss7[3][0]*tex2D(SamplerBloom1,coord+float2(-3,0)*bof);
|
||||
res += gauss7[2][0]*tex2D(SamplerBloom1,coord+float2(-2,0)*bof);
|
||||
res += gauss7[1][0]*tex2D(SamplerBloom1,coord+float2(-1,0)*bof);
|
||||
res += gauss7[0][0]*tex2D(SamplerBloom1,coord+float2(0,0)*bof);
|
||||
res += gauss7[1][0]*tex2D(SamplerBloom1,coord+float2(1,0)*bof);
|
||||
res += gauss7[2][0]*tex2D(SamplerBloom1,coord+float2(2,0)*bof);
|
||||
res += gauss7[3][0]*tex2D(SamplerBloom1,coord+float2(3,0)*bof);
|
||||
res += gauss7[3][1]*tex2D(SamplerBloom1,coord+float2(-3,1)*bof);
|
||||
res += gauss7[2][1]*tex2D(SamplerBloom1,coord+float2(-2,1)*bof);
|
||||
res += gauss7[1][1]*tex2D(SamplerBloom1,coord+float2(-1,1)*bof);
|
||||
res += gauss7[0][1]*tex2D(SamplerBloom1,coord+float2(0,1)*bof);
|
||||
res += gauss7[1][1]*tex2D(SamplerBloom1,coord+float2(1,1)*bof);
|
||||
res += gauss7[2][1]*tex2D(SamplerBloom1,coord+float2(2,1)*bof);
|
||||
res += gauss7[3][1]*tex2D(SamplerBloom1,coord+float2(3,1)*bof);
|
||||
res += gauss7[3][2]*tex2D(SamplerBloom1,coord+float2(-3,2)*bof);
|
||||
res += gauss7[2][2]*tex2D(SamplerBloom1,coord+float2(-2,2)*bof);
|
||||
res += gauss7[1][2]*tex2D(SamplerBloom1,coord+float2(-1,2)*bof);
|
||||
res += gauss7[0][2]*tex2D(SamplerBloom1,coord+float2(0,2)*bof);
|
||||
res += gauss7[1][2]*tex2D(SamplerBloom1,coord+float2(1,2)*bof);
|
||||
res += gauss7[2][2]*tex2D(SamplerBloom1,coord+float2(2,2)*bof);
|
||||
res += gauss7[3][2]*tex2D(SamplerBloom1,coord+float2(3,2)*bof);
|
||||
res += gauss7[3][3]*tex2D(SamplerBloom1,coord+float2(-3,3)*bof);
|
||||
res += gauss7[2][3]*tex2D(SamplerBloom1,coord+float2(-2,3)*bof);
|
||||
res += gauss7[1][3]*tex2D(SamplerBloom1,coord+float2(-1,3)*bof);
|
||||
res += gauss7[0][3]*tex2D(SamplerBloom1,coord+float2(0,3)*bof);
|
||||
res += gauss7[1][3]*tex2D(SamplerBloom1,coord+float2(1,3)*bof);
|
||||
res += gauss7[2][3]*tex2D(SamplerBloom1,coord+float2(2,3)*bof);
|
||||
res += gauss7[3][3]*tex2D(SamplerBloom1,coord+float2(3,3)*bof);
|
||||
return res;
|
||||
}
|
||||
/* end pass */
|
||||
float4 PS_BloomPostPass(VS_OUTPUT_POST In) : COLOR
|
||||
{
|
||||
float2 coord = In.txcoord0.xy;
|
||||
float4 res = (tex2D(SamplerBloom1,coord)+tex2D(SamplerBloom2,coord)
|
||||
+tex2D(SamplerBloom3,coord)+tex2D(SamplerBloom4,coord)
|
||||
+tex2D(SamplerBloom5,coord)+tex2D(SamplerBloom6,coord)
|
||||
+tex2D(SamplerBloom7,coord)+tex2D(SamplerBloom8,coord))*0.125;
|
||||
return res;
|
||||
}
|
||||
/* techniques */
|
||||
technique BloomPrePass
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Bloom();
|
||||
PixelShader = compile ps_3_0 PS_BloomPrePass();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique BloomTexture1
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Bloom();
|
||||
PixelShader = compile ps_3_0 PS_BloomTexture();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique BloomPostPass
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Bloom();
|
||||
PixelShader = compile ps_3_0 PS_BloomPostPass();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
135
enbseries/menbbloominternals.fx
Normal file
135
enbseries/menbbloominternals.fx
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
menbbloominternals.fx : MariENB bloom internal variables.
|
||||
(C)2013-2014 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the WTFPL.
|
||||
*/
|
||||
/* gaussian blur matrices */
|
||||
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
|
||||
};
|
||||
/* standard stuff */
|
||||
float4 ScreenSize;
|
||||
float4 TempParameters;
|
||||
float ENightDayFactor;
|
||||
float EInteriorFactor;
|
||||
/* samplers and textures */
|
||||
texture2D texBloom1;
|
||||
texture2D texBloom2;
|
||||
texture2D texBloom3;
|
||||
texture2D texBloom4;
|
||||
texture2D texBloom5;
|
||||
texture2D texBloom6;
|
||||
texture2D texBloom7;
|
||||
texture2D texBloom8;
|
||||
sampler2D SamplerBloom1 = sampler_state
|
||||
{
|
||||
Texture = <texBloom1>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom2 = sampler_state
|
||||
{
|
||||
Texture = <texBloom2>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom3 = sampler_state
|
||||
{
|
||||
Texture = <texBloom3>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom4 = sampler_state
|
||||
{
|
||||
Texture = <texBloom4>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom5 = sampler_state
|
||||
{
|
||||
Texture = <texBloom5>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom6 = sampler_state
|
||||
{
|
||||
Texture = <texBloom6>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom7 = sampler_state
|
||||
{
|
||||
Texture = <texBloom7>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom8 = sampler_state
|
||||
{
|
||||
Texture = <texBloom8>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
/* whatever */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
90
enbseries/menbbloomsettings.fx
Normal file
90
enbseries/menbbloomsettings.fx
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
menbbloomsettings.fx : MariENB bloom user-tweakable variables.
|
||||
(C)2013-2014 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the WTFPL.
|
||||
*/
|
||||
/* bloom intensity */
|
||||
float bloomintensity_n
|
||||
<
|
||||
string UIName = "BloomIntensityNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.25};
|
||||
float bloomintensity_d
|
||||
<
|
||||
string UIName = "BloomIntensityDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.25};
|
||||
float bloomintensity_in
|
||||
<
|
||||
string UIName = "BloomIntensityInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.25};
|
||||
float bloomintensity_id
|
||||
<
|
||||
string UIName = "BloomIntensityInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.25};
|
||||
/* bloom power */
|
||||
float bloompower_n
|
||||
<
|
||||
string UIName = "BloomPowerNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.4};
|
||||
float bloompower_d
|
||||
<
|
||||
string UIName = "BloomPowerDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.4};
|
||||
float bloompower_in
|
||||
<
|
||||
string UIName = "BloomPowerInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.4};
|
||||
float bloompower_id
|
||||
<
|
||||
string UIName = "BloomPowerInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.4};
|
||||
/* bloom saturation */
|
||||
float bloomsaturation_n
|
||||
<
|
||||
string UIName = "BloomSaturationNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.3};
|
||||
float bloomsaturation_d
|
||||
<
|
||||
string UIName = "BloomSaturationDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.3};
|
||||
float bloomsaturation_in
|
||||
<
|
||||
string UIName = "BloomSaturationInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.3};
|
||||
float bloomsaturation_id
|
||||
<
|
||||
string UIName = "BloomSaturationInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.3};
|
||||
/* bloom offset */
|
||||
float bloombump_n
|
||||
<
|
||||
string UIName = "BloomBumpNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.10};
|
||||
float bloombump_d
|
||||
<
|
||||
string UIName = "BloomBumpDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.10};
|
||||
float bloombump_in
|
||||
<
|
||||
string UIName = "BloomBumpInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.10};
|
||||
float bloombump_id
|
||||
<
|
||||
string UIName = "BloomBumpInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.10};
|
||||
221
enbseries/menbeffectfilters.fx
Normal file
221
enbseries/menbeffectfilters.fx
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
/*
|
||||
menbeffectfilters.fx : MariENB base 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.txcoord0.xy = IN.txcoord0.xy;
|
||||
return OUT;
|
||||
}
|
||||
/* MariENB shader */
|
||||
float4 PS_Mari( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord0.xy;
|
||||
float4 res = tex2D(_s0,coord);
|
||||
float tod = ENightDayFactor;
|
||||
float ind = EInteriorFactor;
|
||||
/* Border darken, commonly known as "vignette" */
|
||||
float2 bresl = float2(1.0,ScreenSize.w);
|
||||
float dkradius = lerp(lerp(dkradius_n,dkradius_d,tod),lerp(dkradius_in,
|
||||
dkradius_id,tod),ind);
|
||||
float dkbump = lerp(lerp(dkbump_n,dkbump_d,tod),lerp(dkbump_in,
|
||||
dkbump_id,tod),ind);
|
||||
float dkcurve = lerp(lerp(dkcurve_n,dkcurve_d,tod),lerp(dkcurve_in,
|
||||
dkcurve_id,tod),ind);
|
||||
float2 bof = bresl*dkradius;
|
||||
float val = 0.0;
|
||||
if ( coord.x < bof.x )
|
||||
val = lerp(val,1,1.0-coord.x/bof.x);
|
||||
if ( coord.y < bof.y )
|
||||
val = lerp(val,1,1.0-coord.y/bof.y);
|
||||
if ( 1.0-coord.x < bof.x )
|
||||
val = lerp(val,1,1.0-(1.0-coord.x)/bof.x);
|
||||
if ( 1.0-coord.y < bof.y )
|
||||
val = lerp(val,1,1.0-(1.0-coord.y)/bof.y);
|
||||
val = clamp(val*dkbump,0,1);
|
||||
res.rgb = lerp(res.rgb,float3(0,0,0),pow(val,dkcurve));
|
||||
/* adaptation */
|
||||
float4 adapt = tex2D(_s4,0.5);
|
||||
float adapts = clamp((adapt.r+adapt.g+adapt.b)/3.0,0.0,50.0);
|
||||
float amin = lerp(lerp(amin_n,amin_d,tod),lerp(amin_in,amin_id,tod),
|
||||
ind);
|
||||
float amax = lerp(lerp(amax_n,amax_d,tod),lerp(amax_in,amax_id,tod),
|
||||
ind);
|
||||
res.rgb = res.rgb/(adapts*amax+amin);
|
||||
/* color grading prepass overbright/oversaturation compensation */
|
||||
float comppow = lerp(lerp(comppow_n,comppow_d,tod),lerp(comppow_in,
|
||||
comppow_id,tod),ind);
|
||||
float compsat = lerp(lerp(compsat_n,compsat_d,tod),lerp(compsat_in,
|
||||
compsat_id,tod),ind);
|
||||
float compfactor = lerp(lerp(compfactor_n,compfactor_d,tod),
|
||||
lerp(compfactor_in,compfactor_id,tod),ind);
|
||||
float4 ovr = pow(res,comppow);
|
||||
float ovrs = (ovr.r+ovr.g+ovr.b)/3.0;
|
||||
ovr = ovr*compsat+ovrs*(1.0-compsat);
|
||||
res.rgb -= ovr.rgb*compfactor;
|
||||
/* screen mud goes here */
|
||||
if ( softbloom )
|
||||
{
|
||||
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);
|
||||
res += gauss5[0][2]*tex2D(_s3,coord+float2(0,-2)*bof);
|
||||
res += gauss5[1][2]*tex2D(_s3,coord+float2(1,-2)*bof);
|
||||
res += gauss5[2][2]*tex2D(_s3,coord+float2(2,-2)*bof);
|
||||
res += gauss5[2][1]*tex2D(_s3,coord+float2(-2,-1)*bof);
|
||||
res += gauss5[1][1]*tex2D(_s3,coord+float2(-1,-1)*bof);
|
||||
res += gauss5[0][1]*tex2D(_s3,coord+float2(0,-1)*bof);
|
||||
res += gauss5[1][1]*tex2D(_s3,coord+float2(1,-1)*bof);
|
||||
res += gauss5[2][1]*tex2D(_s3,coord+float2(2,-1)*bof);
|
||||
res += gauss5[2][0]*tex2D(_s3,coord+float2(-2,0)*bof);
|
||||
res += gauss5[1][0]*tex2D(_s3,coord+float2(-1,0)*bof);
|
||||
res += gauss5[0][0]*tex2D(_s3,coord+float2(0,0)*bof);
|
||||
res += gauss5[1][0]*tex2D(_s3,coord+float2(1,0)*bof);
|
||||
res += gauss5[2][0]*tex2D(_s3,coord+float2(2,0)*bof);
|
||||
res += gauss5[2][1]*tex2D(_s3,coord+float2(-2,1)*bof);
|
||||
res += gauss5[1][1]*tex2D(_s3,coord+float2(-1,1)*bof);
|
||||
res += gauss5[0][1]*tex2D(_s3,coord+float2(0,1)*bof);
|
||||
res += gauss5[1][1]*tex2D(_s3,coord+float2(1,1)*bof);
|
||||
res += gauss5[2][1]*tex2D(_s3,coord+float2(2,1)*bof);
|
||||
res += gauss5[2][2]*tex2D(_s3,coord+float2(-2,2)*bof);
|
||||
res += gauss5[1][2]*tex2D(_s3,coord+float2(-1,2)*bof);
|
||||
res += gauss5[0][2]*tex2D(_s3,coord+float2(0,2)*bof);
|
||||
res += gauss5[1][2]*tex2D(_s3,coord+float2(1,2)*bof);
|
||||
res += gauss5[2][2]*tex2D(_s3,coord+float2(2,2)*bof);
|
||||
res *= EBloomAmount;
|
||||
}
|
||||
else
|
||||
res += tex2D(_s3,coord)*EBloomAmount;
|
||||
/*
|
||||
color grading (brightness, contrast, gamma, tinting, everything you
|
||||
could ever need)
|
||||
*/
|
||||
float grademul_r = lerp(lerp(grademul_r_n,grademul_r_d,tod),
|
||||
lerp(grademul_r_in,grademul_r_id,tod),ind);
|
||||
float grademul_g = lerp(lerp(grademul_g_n,grademul_g_d,tod),
|
||||
lerp(grademul_g_in,grademul_g_id,tod),ind);
|
||||
float grademul_b = lerp(lerp(grademul_b_n,grademul_b_d,tod),
|
||||
lerp(grademul_b_in,grademul_b_id,tod),ind);
|
||||
float gradepow_r = lerp(lerp(gradepow_r_n,gradepow_r_d,tod),
|
||||
lerp(gradepow_r_in,gradepow_r_id,tod),ind);
|
||||
float gradepow_g = lerp(lerp(gradepow_g_n,gradepow_g_d,tod),
|
||||
lerp(gradepow_g_in,gradepow_g_id,tod),ind);
|
||||
float gradepow_b = lerp(lerp(gradepow_b_n,gradepow_b_d,tod),
|
||||
lerp(gradepow_b_in,gradepow_b_id,tod),ind);
|
||||
float gradecol_r = lerp(lerp(gradecol_r_n,gradecol_r_d,tod),
|
||||
lerp(gradecol_r_in,gradecol_r_id,tod),ind);
|
||||
float gradecol_g = lerp(lerp(gradecol_g_n,gradecol_g_d,tod),
|
||||
lerp(gradecol_g_in,gradecol_g_id,tod),ind);
|
||||
float gradecol_b = lerp(lerp(gradecol_b_n,gradecol_b_d,tod),
|
||||
lerp(gradecol_b_in,gradecol_b_id,tod),ind);
|
||||
float gradecolfact = lerp(lerp(gradecolfact_n,gradecolfact_d,
|
||||
tod),lerp(gradecolfact_in,gradecolfact_id,tod),ind);
|
||||
float3 grademul = float3(grademul_r,grademul_g,grademul_b);
|
||||
float3 gradepow = float3(gradepow_r,gradepow_g,gradepow_b);
|
||||
float3 gradecol = float3(gradecol_r,gradecol_g,gradecol_b);
|
||||
res.rgb = saturate(pow(res.rgb,gradepow));
|
||||
res.rgb = saturate(res.rgb*grademul);
|
||||
float tonev = (res.r+res.g+res.b)/3.0;
|
||||
float3 tonecolor = gradecol*tonev;
|
||||
res.rgb = res.rgb*(1.0-gradecolfact)+tonecolor*gradecolfact;
|
||||
/* letterbox filter */
|
||||
res.rgb = saturate(res.rgb);
|
||||
float boxf = pow(clamp(boxv-abs(2.0*coord.y-1.0),0.0,1.0),boxb);
|
||||
res.rgb = lerp(res.rgb*(1.0-boxa),res.rgb,boxf);
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
/*
|
||||
So... let me get this straight... rather than simply switching techniques,
|
||||
Boris just compiles the program twice with and without this macro, then
|
||||
toggling "UseEffect" switches between each variation? What the fuck?
|
||||
*/
|
||||
#ifndef ENB_FLIPTECHNIQUE
|
||||
technique Shader_D6EC7DD1
|
||||
#else
|
||||
technique Shader_ORIGINALPOSTPROCESS
|
||||
#endif
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Mari();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
ZEnable = FALSE;
|
||||
ZWriteEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
AlphaTestEnable = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
#ifndef ENB_FLIPTECHNIQUE
|
||||
technique Shader_ORIGINALPOSTPROCESS
|
||||
#else
|
||||
technique Shader_D6EC7DD1
|
||||
#endif
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
/*
|
||||
>2014
|
||||
>inline assembly
|
||||
Have to keep this part intact, sadly
|
||||
Boris what the fuck have you done
|
||||
*/
|
||||
PixelShader = asm
|
||||
{
|
||||
ps_3_0
|
||||
def c6,0,0,0,0
|
||||
def c7,0.212500006,0.715399981,0.0720999986,1
|
||||
dcl_texcoord v0.xy
|
||||
dcl_2d s0
|
||||
dcl_2d s1
|
||||
dcl_2d s2
|
||||
rcp r0.x,c2.y
|
||||
texld r1,v0,s2
|
||||
mul r0.yz,r1.xxyw,c1.y
|
||||
rcp r0.w,r0.y
|
||||
mul r0.z,r0.w,r0.z
|
||||
texld r1,v0,s1
|
||||
mul r1.xyz,r1,c1.y
|
||||
dp3 r0.w,c7,r1
|
||||
mul r1.w,r0.w,r0.z
|
||||
mad r0.z,r0.z,r0.w,c7.w
|
||||
rcp r0.z,r0.z
|
||||
mad r0.x,r1.w,r0.x,c7.w
|
||||
mul r0.x,r0.x,r1.w
|
||||
mul r0.x,r0.z,r0.x
|
||||
cmp r0.x,-r0.w,c6.x,r0.x
|
||||
rcp r0.z,r0.w
|
||||
mul r0.z,r0.z,r0.x
|
||||
add_sat r0.x,-r0.x,c2.x
|
||||
texld r2,v0,s0
|
||||
mul r2.xyz,r2,c1.y
|
||||
mul r2.xyz,r0.x,r2
|
||||
mad r1.xyz,r1,r0.z,r2
|
||||
dp3 r0.x,r1,c7
|
||||
mov r1.w,c7.w
|
||||
lrp r2,c3.x,r1,r0.x
|
||||
mad r1,r0.x,c4,-r2
|
||||
mad r1,c4.w,r1,r2
|
||||
mad r1,c3.w,r1,-r0.y
|
||||
mad r0,c3.z,r1,r0.y
|
||||
add r1,-r0,c5
|
||||
mad oC0,c5.w,r1,r0
|
||||
};
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
ZEnable = FALSE;
|
||||
ZWriteEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
AlphaTestEnable = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
108
enbseries/menbeffectinternals.fx
Normal file
108
enbseries/menbeffectinternals.fx
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
menbeffectinternals.fx : MariENB base internal variables.
|
||||
(C)2013-2014 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the WTFPL.
|
||||
*/
|
||||
/* gaussian blur matrices */
|
||||
static const float3x3 gauss5 =
|
||||
{
|
||||
0.0865051903114,0.0692041522491,0.0346020761246,
|
||||
0.0692041522491,0.0553633217993,0.0276816609,
|
||||
0.0346020761246,0.0276816609,0.01384083045
|
||||
};
|
||||
/* standard stuff */
|
||||
float4 ScreenSize;
|
||||
float ENightDayFactor;
|
||||
float EInteriorFactor;
|
||||
float EBloomAmount;
|
||||
/* samplers and textures */
|
||||
texture2D texs0;
|
||||
texture2D texs1;
|
||||
texture2D texs2;
|
||||
texture2D texs3;
|
||||
texture2D texs4;
|
||||
texture2D texs7;
|
||||
sampler2D _s0 = sampler_state
|
||||
{
|
||||
Texture = <texs0>;
|
||||
MinFilter = POINT;
|
||||
MagFilter = POINT;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s1 = sampler_state
|
||||
{
|
||||
Texture = <texs1>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s2 = sampler_state
|
||||
{
|
||||
Texture = <texs2>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s3 = sampler_state
|
||||
{
|
||||
Texture = <texs3>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s4 = sampler_state
|
||||
{
|
||||
Texture = <texs4>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s7 = sampler_state
|
||||
{
|
||||
Texture = <texs7>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
/* whatever */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
402
enbseries/menbeffectsettings.fx
Normal file
402
enbseries/menbeffectsettings.fx
Normal file
|
|
@ -0,0 +1,402 @@
|
|||
/*
|
||||
menbeffectsettings.fx : MariENB base user-tweakable variables.
|
||||
(C)2013-2014 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the WTFPL.
|
||||
*/
|
||||
/* Border darkening */
|
||||
/* radius of darkening (relative to screen width) */
|
||||
float dkradius_n
|
||||
<
|
||||
string UIName = "DarkRadiusNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.40};
|
||||
float dkradius_d
|
||||
<
|
||||
string UIName = "DarkRadiusDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.29};
|
||||
float dkradius_in
|
||||
<
|
||||
string UIName = "DarkRadiusInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.50};
|
||||
float dkradius_id
|
||||
<
|
||||
string UIName = "DarkRadiusInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.39};
|
||||
/* falloff of darkening */
|
||||
float dkcurve_n
|
||||
<
|
||||
string UIName = "DarkCurveNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.70};
|
||||
float dkcurve_d
|
||||
<
|
||||
string UIName = "DarkCurveDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {2.30};
|
||||
float dkcurve_in
|
||||
<
|
||||
string UIName = "DarkCurveInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.35};
|
||||
float dkcurve_id
|
||||
<
|
||||
string UIName = "DarkCurveInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.67};
|
||||
/* bump of darkening */
|
||||
float dkbump_n
|
||||
<
|
||||
string UIName = "DarkBumpNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.74};
|
||||
float dkbump_d
|
||||
<
|
||||
string UIName = "DarkBumpDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.33};
|
||||
float dkbump_in
|
||||
<
|
||||
string UIName = "DarkBumpInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.82};
|
||||
float dkbump_id
|
||||
<
|
||||
string UIName = "DarkBumpInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.61};
|
||||
/* Adaptation */
|
||||
float amin_n
|
||||
<
|
||||
string UIName = "AdaptationMinNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.20};
|
||||
float amin_d
|
||||
<
|
||||
string UIName = "AdaptationMinDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.09};
|
||||
float amin_in
|
||||
<
|
||||
string UIName = "AdaptationMinInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.17};
|
||||
float amin_id
|
||||
<
|
||||
string UIName = "AdaptationMinInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.10};
|
||||
float amax_n
|
||||
<
|
||||
string UIName = "AdaptationMaxNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.21};
|
||||
float amax_d
|
||||
<
|
||||
string UIName = "AdaptationMaxDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.94};
|
||||
float amax_in
|
||||
<
|
||||
string UIName = "AdaptationMaxInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.26};
|
||||
float amax_id
|
||||
<
|
||||
string UIName = "AdaptationMaxInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.91};
|
||||
/* Shine/bloom compensation */
|
||||
/* compensation factor */
|
||||
float compfactor_n
|
||||
<
|
||||
string UIName = "CompensateFactorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.23};
|
||||
float compfactor_d
|
||||
<
|
||||
string UIName = "CompensateFactorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.46};
|
||||
float compfactor_in
|
||||
<
|
||||
string UIName = "CompensateFactorInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.30};
|
||||
float compfactor_id
|
||||
<
|
||||
string UIName = "CompensateFactorInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.39};
|
||||
/* compensation power */
|
||||
float comppow_n
|
||||
<
|
||||
string UIName = "CompensatePowerNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.08};
|
||||
float comppow_d
|
||||
<
|
||||
string UIName = "CompensatePowerDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.11};
|
||||
float comppow_in
|
||||
<
|
||||
string UIName = "CompensatePowerInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.05};
|
||||
float comppow_id
|
||||
<
|
||||
string UIName = "CompensatePowerInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.14};
|
||||
/* compensation saturation */
|
||||
float compsat_n
|
||||
<
|
||||
string UIName = "CompensateSaturationNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.97};
|
||||
float compsat_d
|
||||
<
|
||||
string UIName = "CompensateSaturationDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.85};
|
||||
float compsat_in
|
||||
<
|
||||
string UIName = "CompensateSaturationInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.89};
|
||||
float compsat_id
|
||||
<
|
||||
string UIName = "CompensateSaturationInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.74};
|
||||
/* Color grading */
|
||||
/* miscellaneous color grading parameters */
|
||||
float grademul_r_n
|
||||
<
|
||||
string UIName = "GradingMulRNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.04};
|
||||
float grademul_g_n
|
||||
<
|
||||
string UIName = "GradingMulGNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.08};
|
||||
float grademul_b_n
|
||||
<
|
||||
string UIName = "GradingMulBNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.15};
|
||||
float grademul_r_d
|
||||
<
|
||||
string UIName = "GradingMulRDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.66};
|
||||
float grademul_g_d
|
||||
<
|
||||
string UIName = "GradingMulGDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.45};
|
||||
float grademul_b_d
|
||||
<
|
||||
string UIName = "GradingMulBDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.29};
|
||||
float grademul_r_in
|
||||
<
|
||||
string UIName = "GradingMulRInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.35};
|
||||
float grademul_g_in
|
||||
<
|
||||
string UIName = "GradingMulGInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.18};
|
||||
float grademul_b_in
|
||||
<
|
||||
string UIName = "GradingMulBInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.22};
|
||||
float grademul_r_id
|
||||
<
|
||||
string UIName = "GradingMulRInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.71};
|
||||
float grademul_g_id
|
||||
<
|
||||
string UIName = "GradingMulGInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.60};
|
||||
float grademul_b_id
|
||||
<
|
||||
string UIName = "GradingMulBInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.41};
|
||||
float gradepow_r_n
|
||||
<
|
||||
string UIName = "GradingPowRNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.02};
|
||||
float gradepow_g_n
|
||||
<
|
||||
string UIName = "GradingPowGNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.06};
|
||||
float gradepow_b_n
|
||||
<
|
||||
string UIName = "GradingPowBNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.03};
|
||||
float gradepow_r_d
|
||||
<
|
||||
string UIName = "GradingPowRDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.09};
|
||||
float gradepow_g_d
|
||||
<
|
||||
string UIName = "GradingPowGDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.08};
|
||||
float gradepow_b_d
|
||||
<
|
||||
string UIName = "GradingPowBDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.05};
|
||||
float gradepow_r_in
|
||||
<
|
||||
string UIName = "GradingPowRInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.08};
|
||||
float gradepow_g_in
|
||||
<
|
||||
string UIName = "GradingPowGInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.11};
|
||||
float gradepow_b_in
|
||||
<
|
||||
string UIName = "GradingPowBInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.06};
|
||||
float gradepow_r_id
|
||||
<
|
||||
string UIName = "GradingPowRInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.05};
|
||||
float gradepow_g_id
|
||||
<
|
||||
string UIName = "GradingPowGInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.04};
|
||||
float gradepow_b_id
|
||||
<
|
||||
string UIName = "GradingPowBInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.04};
|
||||
float gradecol_r_n
|
||||
<
|
||||
string UIName = "GradingColRNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.59};
|
||||
float gradecol_g_n
|
||||
<
|
||||
string UIName = "GradingColGNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.26};
|
||||
float gradecol_b_n
|
||||
<
|
||||
string UIName = "GradingColBNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.73};
|
||||
float gradecol_r_d
|
||||
<
|
||||
string UIName = "GradingColRDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.62};
|
||||
float gradecol_g_d
|
||||
<
|
||||
string UIName = "GradingColGDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.10};
|
||||
float gradecol_b_d
|
||||
<
|
||||
string UIName = "GradingColBDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.81};
|
||||
float gradecol_r_in
|
||||
<
|
||||
string UIName = "GradingColRInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.41};
|
||||
float gradecol_g_in
|
||||
<
|
||||
string UIName = "GradingColGInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.18};
|
||||
float gradecol_b_in
|
||||
<
|
||||
string UIName = "GradingColBInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-1.69};
|
||||
float gradecol_r_id
|
||||
<
|
||||
string UIName = "GradingColRInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.60};
|
||||
float gradecol_g_id
|
||||
<
|
||||
string UIName = "GradingColGInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.45};
|
||||
float gradecol_b_id
|
||||
<
|
||||
string UIName = "GradingColBInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.85};
|
||||
float gradecolfact_n
|
||||
<
|
||||
string UIName = "GradingColFactorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.11};
|
||||
float gradecolfact_d
|
||||
<
|
||||
string UIName = "GradingColFactorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.14};
|
||||
float gradecolfact_in
|
||||
<
|
||||
string UIName = "GradingColFactorInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.14};
|
||||
float gradecolfact_id
|
||||
<
|
||||
string UIName = "GradingColFactorInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.20};
|
||||
/* Letterbox */
|
||||
/* vertical factor */
|
||||
float boxv
|
||||
<
|
||||
string UIName = "BoxVertical";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.90};
|
||||
/* softening */
|
||||
float boxb
|
||||
<
|
||||
string UIName = "BoxSoften";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.01};
|
||||
/* box alpha */
|
||||
float boxa
|
||||
<
|
||||
string UIName = "BoxAlpha";
|
||||
string UIWidget = "Spinner";
|
||||
> = {12.00};
|
||||
/* soften bloom texture */
|
||||
bool softbloom
|
||||
<
|
||||
string UIName = "BloomSoften";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
298
enbseries/menbprepassfilters.fx
Normal file
298
enbseries/menbprepassfilters.fx
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
/*
|
||||
menbprepassfilters.fx : MariENB prepass 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;
|
||||
}
|
||||
/*
|
||||
Whoever wrote this shit deserves to die a slow, painful death for
|
||||
commiting a crime against good programming. I'm leaving the algorithm
|
||||
itself unaltered so you can see for yourself just how fucking disgusting it
|
||||
is (yes, it says "linearlize").
|
||||
*/
|
||||
float linearlizeDepth( float nonlinearDepth )
|
||||
{
|
||||
float2 dofProj = float2(0.0509804,3098.0392);
|
||||
float2 dofDist = float2(0.0,0.0509804);
|
||||
float4 depth = nonlinearDepth;
|
||||
depth.y = -dofProj.x+dofProj.y;
|
||||
depth.y = 1.0/depth.y;
|
||||
depth.z = depth.y*dofProj.y;
|
||||
depth.z = depth.z*-dofProj.x;
|
||||
depth.x = dofProj.y*-depth.y+depth.x;
|
||||
depth.x = 1.0/depth.x;
|
||||
depth.y = depth.z*depth.x;
|
||||
depth.x = depth.z*depth.x-dofDist.y;
|
||||
depth.x += dofDist.x*-0.5;
|
||||
depth.x = max(depth.x,0.0);
|
||||
return depth.x;
|
||||
}
|
||||
#define depthlinear(x) linearlizeDepth(tex2D(SamplerDepth,x).r)
|
||||
/* New and improved edge detection, generally useful for contour shading */
|
||||
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 bof = float2(1.0/bresl.x,1.0/bresl.y);
|
||||
float mdx, mdy, mud;
|
||||
/* this reduces texture fetches by half, big difference */
|
||||
float3x3 depths;
|
||||
depths[0][0] = depthlinear(coord+float2(-1,-1)*bof);
|
||||
depths[1][0] = depthlinear(coord+float2(0,-1)*bof);
|
||||
depths[2][0] = depthlinear(coord+float2(1,-1)*bof);
|
||||
depths[0][1] = depthlinear(coord+float2(-1,0)*bof);
|
||||
depths[1][1] = depthlinear(coord);
|
||||
depths[2][1] = depthlinear(coord+float2(1,0)*bof);
|
||||
depths[0][2] = depthlinear(coord+float2(-1,1)*bof);
|
||||
depths[1][2] = depthlinear(coord+float2(0,1)*bof);
|
||||
depths[2][2] = depthlinear(coord+float2(1,1)*bof);
|
||||
mdx = GX[0][0]*depths[0][0];
|
||||
mdx += GX[1][0]*depths[1][0];
|
||||
mdx += GX[2][0]*depths[2][0];
|
||||
mdx += GX[0][1]*depths[0][1];
|
||||
mdx += GX[1][1]*depths[1][1];
|
||||
mdx += GX[2][1]*depths[2][1];
|
||||
mdx += GX[0][2]*depths[0][2];
|
||||
mdx += GX[1][2]*depths[1][2];
|
||||
mdx += GX[2][2]*depths[2][2];
|
||||
mdy = GY[0][0]*depths[0][0];
|
||||
mdy += GY[1][0]*depths[1][0];
|
||||
mdy += GY[2][0]*depths[2][0];
|
||||
mdy += GY[0][1]*depths[0][1];
|
||||
mdy += GY[1][1]*depths[1][1];
|
||||
mdy += GY[2][1]*depths[2][1];
|
||||
mdy += GY[0][2]*depths[0][2];
|
||||
mdy += GY[1][2]*depths[1][2];
|
||||
mdy += GY[2][2]*depths[2][2];
|
||||
mud = pow(mdx*mdx+mdy*mdy,0.5);
|
||||
float fade = 1.0-tex2D(SamplerDepth,coord).x;
|
||||
mud *= saturate(pow(fade,edgefadepow)*edgefademult);
|
||||
mud = saturate(pow(mud,edgepow)*edgemult);
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
if ( edgeview )
|
||||
res.rgb = mud;
|
||||
else
|
||||
res.rgb -= mud;
|
||||
return saturate(res);
|
||||
}
|
||||
/* Focus */
|
||||
float4 PS_ReadFocus( VS_OUTPUT_POST IN ) : COLOR
|
||||
{
|
||||
if ( dofdisable )
|
||||
return 0.0;
|
||||
float tod = ENightDayFactor;
|
||||
float ind = EInteriorFactor;
|
||||
float focusmax = lerp(lerp(focusmax_n,focusmax_d,tod),lerp(focusmax_in,
|
||||
focusmax_id,tod),ind);
|
||||
float cfocus = min(tex2D(SamplerDepth,0.5),focusmax*0.001);
|
||||
if ( !focuscircle )
|
||||
return cfocus;
|
||||
float focusradius = lerp(lerp(focusradius_n,focusradius_d,tod),
|
||||
lerp(focusradius_in,focusradius_id,tod),ind);
|
||||
float focusmix = lerp(lerp(focusmix_n,focusmix_d,tod),lerp(focusmix_in,
|
||||
focusmix_id,tod),ind);
|
||||
float step = (1.0/3.0);
|
||||
float mfocus;
|
||||
float2 coord;
|
||||
float2 bof = float2(1.0,ScreenSize.w)*focusradius*0.001;
|
||||
/* unrolled this too... *sigh* */
|
||||
coord.x = 0.5+sin(0.0)*bof.x;
|
||||
coord.y = 0.5+cos(0.0)*bof.y;
|
||||
mfocus = step*min(tex2D(SamplerDepth,coord),focusmax*0.001);
|
||||
coord.x = 0.5+sin(2.0*pi*step)*bof.x;
|
||||
coord.y = 0.5+cos(2.0*pi*step)*bof.y;
|
||||
mfocus += step*min(tex2D(SamplerDepth,coord),focusmax*0.001);
|
||||
coord.x = 0.5+sin(4.0*pi*step)*bof.x;
|
||||
coord.y = 0.5+cos(4.0*pi*step)*bof.y;
|
||||
mfocus += step*min(tex2D(SamplerDepth,coord),focusmax*0.001);
|
||||
cfocus = (1.0-focusmix)*cfocus+focusmix*mfocus;
|
||||
return cfocus;
|
||||
}
|
||||
float4 PS_WriteFocus( VS_OUTPUT_POST IN ) : COLOR
|
||||
{
|
||||
if ( dofdisable )
|
||||
return 0.0;
|
||||
return max(lerp(tex2D(SamplerPrev,0.5).x,tex2D(SamplerCurr,0.5).x,
|
||||
saturate(FadeFactor)),0.0);
|
||||
}
|
||||
/* Depth of Field */
|
||||
float4 PS_DoF( VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform int p ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
if ( dofdisable || (!doftwopass && (p != 0)) )
|
||||
return tex2D(SamplerColor,coord);
|
||||
float tod = ENightDayFactor;
|
||||
float ind = EInteriorFactor;
|
||||
float dofpow = lerp(lerp(dofpow_n,dofpow_d,tod),lerp(dofpow_in,
|
||||
dofpow_id,tod),ind);
|
||||
float dofmult = lerp(lerp(dofmult_n,dofmult_d,tod),lerp(dofmult_in,
|
||||
dofmult_id,tod),ind);
|
||||
float doffixedfocuspow = lerp(lerp(doffixedfocuspow_n,
|
||||
doffixedfocuspow_d,tod),lerp(doffixedfocuspow_in,
|
||||
doffixedfocuspow_id,tod),ind);
|
||||
float doffixedfocusmult = lerp(lerp(doffixedfocusmult_n,
|
||||
doffixedfocusmult_d,tod),lerp(doffixedfocusmult_in,
|
||||
doffixedfocusmult_id,tod),ind);
|
||||
float doffixedfocusblend = lerp(lerp(doffixedfocusblend_n,
|
||||
doffixedfocusblend_d,tod),lerp(doffixedfocusblend_in,
|
||||
doffixedfocusblend_id,tod),ind);
|
||||
float doffixedunfocuspow = lerp(lerp(doffixedunfocuspow_n,
|
||||
doffixedunfocuspow_d,tod),lerp(doffixedunfocuspow_in,
|
||||
doffixedunfocuspow_id,tod),ind);
|
||||
float doffixedunfocusmult = lerp(lerp(doffixedunfocusmult_n,
|
||||
doffixedunfocusmult_d,tod),lerp(doffixedunfocusmult_in,
|
||||
doffixedunfocusmult_id,tod),ind);
|
||||
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 bof = float2(1.0/bresl.x,1.0/bresl.y);
|
||||
float dep;
|
||||
if ( dofsmooth )
|
||||
{
|
||||
dep = gauss3[1][1]*tex2D(SamplerDepth,coord+float2(-1,-1)*bof);
|
||||
dep += gauss3[0][1]*tex2D(SamplerDepth,coord+float2(0,-1)*bof);
|
||||
dep += gauss3[1][1]*tex2D(SamplerDepth,coord+float2(1,-1)*bof);
|
||||
dep += gauss3[1][0]*tex2D(SamplerDepth,coord+float2(-1,0)*bof);
|
||||
dep += gauss3[0][0]*tex2D(SamplerDepth,coord+float2(0,0)*bof);
|
||||
dep += gauss3[1][0]*tex2D(SamplerDepth,coord+float2(1,0)*bof);
|
||||
dep += gauss3[1][1]*tex2D(SamplerDepth,coord+float2(-1,1)*bof);
|
||||
dep += gauss3[0][1]*tex2D(SamplerDepth,coord+float2(0,1)*bof);
|
||||
dep += gauss3[1][1]*tex2D(SamplerDepth,coord+float2(1,1)*bof);
|
||||
}
|
||||
else
|
||||
dep = tex2D(SamplerDepth,coord);
|
||||
float foc = tex2D(SamplerFocus,coord).x;
|
||||
float dfc = abs(dep-foc);
|
||||
float dff = abs(dep);
|
||||
float dfu = dff;
|
||||
dfc = saturate(pow(dfc,dofpow)*dofmult);
|
||||
dff = saturate(pow(dff,doffixedfocuspow)*doffixedfocusmult);
|
||||
dfu = saturate(pow(dfu,doffixedunfocuspow)*doffixedunfocusmult);
|
||||
dfc *= lerp(1.0,dff,doffixedfocusblend);
|
||||
dfc += lerp(0.0,dfu,doffixedunfocusblend);
|
||||
if ( dofcutoff && (dep >= 0.999999) )
|
||||
dfc = 0.0;
|
||||
dfc = saturate(dfc);
|
||||
/* aaand another unrolled loop */
|
||||
float4 res;
|
||||
bof *= pow(2,p);
|
||||
res = gauss5[2][2]*tex2D(SamplerColor,coord+float2(-2,-2)*bof*dfc);
|
||||
res += gauss5[1][2]*tex2D(SamplerColor,coord+float2(-1,-2)*bof*dfc);
|
||||
res += gauss5[0][2]*tex2D(SamplerColor,coord+float2(0,-2)*bof*dfc);
|
||||
res += gauss5[1][2]*tex2D(SamplerColor,coord+float2(1,-2)*bof*dfc);
|
||||
res += gauss5[2][2]*tex2D(SamplerColor,coord+float2(2,-2)*bof*dfc);
|
||||
res += gauss5[2][1]*tex2D(SamplerColor,coord+float2(-2,-1)*bof*dfc);
|
||||
res += gauss5[1][1]*tex2D(SamplerColor,coord+float2(-1,-1)*bof*dfc);
|
||||
res += gauss5[0][1]*tex2D(SamplerColor,coord+float2(0,-1)*bof*dfc);
|
||||
res += gauss5[1][1]*tex2D(SamplerColor,coord+float2(1,-1)*bof*dfc);
|
||||
res += gauss5[2][1]*tex2D(SamplerColor,coord+float2(2,-1)*bof*dfc);
|
||||
res += gauss5[2][0]*tex2D(SamplerColor,coord+float2(-2,0)*bof*dfc);
|
||||
res += gauss5[1][0]*tex2D(SamplerColor,coord+float2(-1,0)*bof*dfc);
|
||||
res += gauss5[0][0]*tex2D(SamplerColor,coord+float2(0,0)*bof*dfc);
|
||||
res += gauss5[1][0]*tex2D(SamplerColor,coord+float2(1,0)*bof*dfc);
|
||||
res += gauss5[2][0]*tex2D(SamplerColor,coord+float2(2,0)*bof*dfc);
|
||||
res += gauss5[2][1]*tex2D(SamplerColor,coord+float2(-2,1)*bof*dfc);
|
||||
res += gauss5[1][1]*tex2D(SamplerColor,coord+float2(-1,1)*bof*dfc);
|
||||
res += gauss5[0][1]*tex2D(SamplerColor,coord+float2(0,1)*bof*dfc);
|
||||
res += gauss5[1][1]*tex2D(SamplerColor,coord+float2(1,1)*bof*dfc);
|
||||
res += gauss5[2][1]*tex2D(SamplerColor,coord+float2(2,1)*bof*dfc);
|
||||
res += gauss5[2][2]*tex2D(SamplerColor,coord+float2(-2,2)*bof*dfc);
|
||||
res += gauss5[1][2]*tex2D(SamplerColor,coord+float2(-1,2)*bof*dfc);
|
||||
res += gauss5[0][2]*tex2D(SamplerColor,coord+float2(0,2)*bof*dfc);
|
||||
res += gauss5[1][2]*tex2D(SamplerColor,coord+float2(1,2)*bof*dfc);
|
||||
res += gauss5[2][2]*tex2D(SamplerColor,coord+float2(2,2)*bof*dfc);
|
||||
if ( dofdebug )
|
||||
return dfc;
|
||||
return res;
|
||||
}
|
||||
technique ReadFocus
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_ReadFocus();
|
||||
ZENABLE = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique WriteFocus
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_WriteFocus();
|
||||
ZENABLE = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Edge();
|
||||
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_DoF(0);
|
||||
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_DoF(1);
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
116
enbseries/menbprepassinternals.fx
Normal file
116
enbseries/menbprepassinternals.fx
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
menbprepassinternals.fx : MariENB prepass internal variables.
|
||||
(C)2013-2014 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the WTFPL.
|
||||
*/
|
||||
/* mathematical constants */
|
||||
static const float pi = 3.1415926535898;
|
||||
/* edge detect factors */
|
||||
static const float3x3 GX =
|
||||
{
|
||||
-1, 0, 1,
|
||||
-2, 0, 2,
|
||||
-1, 0, 1
|
||||
};
|
||||
static const float3x3 GY =
|
||||
{
|
||||
1, 2, 1,
|
||||
0, 0, 0,
|
||||
-1,-2,-1
|
||||
};
|
||||
/* gaussian blur matrices */
|
||||
static const float2x2 gauss3 =
|
||||
{
|
||||
0.16,0.12,
|
||||
0.12,0.09
|
||||
};
|
||||
static const float3x3 gauss5 =
|
||||
{
|
||||
0.0865051903114,0.0692041522491,0.0346020761246,
|
||||
0.0692041522491,0.0553633217993,0.0276816609,
|
||||
0.0346020761246,0.0276816609,0.01384083045
|
||||
};
|
||||
/* standard stuff */
|
||||
float4 ScreenSize;
|
||||
float ENightDayFactor;
|
||||
float EInteriorFactor;
|
||||
float FadeFactor;
|
||||
float4 Timer;
|
||||
/* samplers and textures */
|
||||
texture2D texColor;
|
||||
texture2D texDepth;
|
||||
texture2D texFocus;
|
||||
texture2D texCurr;
|
||||
texture2D texPrev;
|
||||
sampler2D SamplerColor = sampler_state
|
||||
{
|
||||
Texture = <texColor>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Mirror;
|
||||
AddressV = Mirror;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerDepth = sampler_state
|
||||
{
|
||||
Texture = <texDepth>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerFocus = sampler_state
|
||||
{
|
||||
Texture = <texFocus>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerCurr = sampler_state
|
||||
{
|
||||
Texture = <texCurr>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = LINEAR;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerPrev = sampler_state
|
||||
{
|
||||
Texture = <texPrev>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
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;
|
||||
};
|
||||
306
enbseries/menbprepasssettings.fx
Normal file
306
enbseries/menbprepasssettings.fx
Normal file
|
|
@ -0,0 +1,306 @@
|
|||
/*
|
||||
menbprepasssettings.fx : MariENB prepass user-tweakable variables.
|
||||
(C)2013-2014 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the WTFPL.
|
||||
*/
|
||||
/* circle average focus */
|
||||
bool focuscircle
|
||||
<
|
||||
string UIName = "FocusCircleEnable";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* radius of the outmost circle */
|
||||
float focusradius_n
|
||||
<
|
||||
string UIName = "FocusCircleRadiusNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {12.5};
|
||||
float focusradius_d
|
||||
<
|
||||
string UIName = "FocusCircleRadiusDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {12.5};
|
||||
float focusradius_in
|
||||
<
|
||||
string UIName = "FocusCircleRadiusInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {12.5};
|
||||
float focusradius_id
|
||||
<
|
||||
string UIName = "FocusCircleRadiusInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {12.5};
|
||||
/* mix factor with sample at screen center */
|
||||
float focusmix_n
|
||||
<
|
||||
string UIName = "FocusCircleMixNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.25};
|
||||
float focusmix_d
|
||||
<
|
||||
string UIName = "FocusCircleMixDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.25};
|
||||
float focusmix_in
|
||||
<
|
||||
string UIName = "FocusCircleMixInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.25};
|
||||
float focusmix_id
|
||||
<
|
||||
string UIName = "FocusCircleMixInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.25};
|
||||
/* maximum focus depth */
|
||||
float focusmax_n
|
||||
<
|
||||
string UIName = "FocusMaxNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float focusmax_d
|
||||
<
|
||||
string UIName = "FocusMaxDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float focusmax_in
|
||||
<
|
||||
string UIName = "FocusMaxInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float focusmax_id
|
||||
<
|
||||
string UIName = "FocusMaxInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
/* dof filter */
|
||||
/* depth multiplier */
|
||||
float dofmult_n
|
||||
<
|
||||
string UIName = "DoFMultNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float dofmult_d
|
||||
<
|
||||
string UIName = "DoFMultDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float dofmult_in
|
||||
<
|
||||
string UIName = "DoFMultInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float dofmult_id
|
||||
<
|
||||
string UIName = "DoFMultInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
/* depth power */
|
||||
float dofpow_n
|
||||
<
|
||||
string UIName = "DoFPowNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float dofpow_d
|
||||
<
|
||||
string UIName = "DoFPowDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float dofpow_in
|
||||
<
|
||||
string UIName = "DoFPowInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float dofpow_id
|
||||
<
|
||||
string UIName = "DoFPowInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
/* fixed depth multiplier */
|
||||
float doffixedfocusmult_n
|
||||
<
|
||||
string UIName = "DoFFixedFocusedMultNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedfocusmult_d
|
||||
<
|
||||
string UIName = "DoFFixedFocusedMultDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedfocusmult_in
|
||||
<
|
||||
string UIName = "DoFFixedFocusedMultInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedfocusmult_id
|
||||
<
|
||||
string UIName = "DoFFixedFocusedMultInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
/* fixed depth power */
|
||||
float doffixedfocuspow_n
|
||||
<
|
||||
string UIName = "DoFFixedFocusedPowNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedfocuspow_d
|
||||
<
|
||||
string UIName = "DoFFixedFocusedPowDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedfocuspow_in
|
||||
<
|
||||
string UIName = "DoFFixedFocusedPowInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedfocuspow_id
|
||||
<
|
||||
string UIName = "DoFFixedFocusedPowInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
/* fixed depth blending */
|
||||
float doffixedfocusblend_n
|
||||
<
|
||||
string UIName = "DoFFixedFocusedBlendNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float doffixedfocusblend_d
|
||||
<
|
||||
string UIName = "DoFFixedFocusedBlendDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float doffixedfocusblend_in
|
||||
<
|
||||
string UIName = "DoFFixedFocusedBlendInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float doffixedfocusblend_id
|
||||
<
|
||||
string UIName = "DoFFixedFocusedBlendInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float doffixedunfocusmult_n
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedMultNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedunfocusmult_d
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedMultDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedunfocusmult_in
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedMultInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedunfocusmult_id
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedMultInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
/* fixed depth power */
|
||||
float doffixedunfocuspow_n
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedPowNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedunfocuspow_d
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedPowDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedunfocuspow_in
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedPowInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float doffixedunfocuspow_id
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedPowInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
/* fixed depth blending */
|
||||
float doffixedunfocusblend_n
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedBlendNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float doffixedunfocusblend_d
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedBlendDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float doffixedunfocusblend_in
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedBlendInteriorNight";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float doffixedunfocusblend_id
|
||||
<
|
||||
string UIName = "DoFFixedUnfocusedBlendInteriorDay";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
/* display dof factors per pixel */
|
||||
bool dofdebug
|
||||
<
|
||||
string UIName = "DoFDebug";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* two-pass blur, makes you shortsighted */
|
||||
bool doftwopass
|
||||
<
|
||||
string UIName = "DoFTwoPass";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* disable depth of field, in case you want just the contour filter */
|
||||
bool dofdisable
|
||||
<
|
||||
string UIName = "DoFDisable";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* enable depth of field smoothing (3x3 gaussian blur, slight fps loss) */
|
||||
bool dofsmooth
|
||||
<
|
||||
string UIName = "DoFSmoothing";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {true};
|
||||
/* enable depth of field sky cutoff (keeps sky sharp, but may look awful) */
|
||||
bool dofcutoff
|
||||
<
|
||||
string UIName = "DoFCutoff";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* disable edge detect filters */
|
||||
bool noedge
|
||||
<
|
||||
string UIName = "EdgeDisable";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {true};
|
||||
/* use "edge vision" instead of contour filter (just because it looks fancy) */
|
||||
bool edgeview
|
||||
<
|
||||
string UIName = "EdgeView";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
/* factors */
|
||||
float edgefadepow
|
||||
<
|
||||
string UIName = "EdgeFadePower";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.6};
|
||||
float edgefademult
|
||||
<
|
||||
string UIName = "EdgeFadeMultiplier";
|
||||
string UIWidget = "Spinner";
|
||||
> = {16.0};
|
||||
float edgepow
|
||||
<
|
||||
string UIName = "EdgePower";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.5};
|
||||
float edgemult
|
||||
<
|
||||
string UIName = "EdgeMultiplier";
|
||||
string UIWidget = "Spinner";
|
||||
> = {32.0};
|
||||
Reference in a new issue