diff --git a/Logo.png b/Logo.png
deleted file mode 100644
index dba3d72..0000000
Binary files a/Logo.png and /dev/null differ
diff --git a/README.md b/README.md
deleted file mode 100644
index 56118da..0000000
--- a/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-This repo contains every single version of MariENB ever made.
-For the sake of neater organization, they are divided in specific branches:
-
-- **historic**: Alpha versions of MariENB.
-- **legacy**: 1.x releases.
-- **twopoint-modular**: 2.0.x releases that used a modular packaging model.
-- **twopoint-dust**: 2.x releases for Fallout: DUST.
-- **twopoint-fnv**: 2.x releases for Fallout: New Vegas.
-- **twopoint-skyrim**: 2.x releases for Skyrim.
-- **threepoint-frost**: 3.x releases for Fallout: FROST.
-- **threepoint-fo4**: 3.x releases for Fallout 4.
\ No newline at end of file
diff --git a/enbseries.ini b/enbseries.ini
new file mode 100644
index 0000000..301a215
--- /dev/null
+++ b/enbseries.ini
@@ -0,0 +1,338 @@
+[GLOBAL]
+UseEffect=true
+
+[EFFECT]
+UseOriginalObjectsProcessing=false
+UseOriginalPostProcessing=false
+UseOriginalColorFilter=false
+UseOriginalBloom=false
+UseOriginalAdaptation=false
+EnablePostPassShader=true
+EnableDithering=true
+EnableAdaptation=true
+EnableBloom=true
+EnableDepthOfField=true
+EnableLens=false
+EnableSSAO=false
+
+[COLORCORRECTION]
+UseProceduralCorrection=true
+Brightness=1.0
+GammaCurve=1.0
+
+[TIMEOFDAY]
+DawnDuration=2.0
+SunriseTime=6.0
+DayTime=12.0
+SunsetTime=18.0
+DuskDuration=2.0
+NightTime=0.0
+
+[ADAPTATION]
+AdaptationSensitivity=0.2
+AdaptationTime=0.65
+ForceMinMaxValues=true
+AdaptationMin=0.0
+AdaptationMax=0.25
+
+[DEPTHOFFIELD]
+FocusingTime=0.4
+ApertureTime=1.0
+
+[BLOOM]
+IgnoreWeatherSystem=true
+AmountDawn=1.1
+AmountSunrise=1.2
+AmountDay=1.0
+AmountSunset=1.2
+AmountDusk=1.1
+AmountNight=1.0
+AmountInteriorDay=1.0
+AmountInteriorNight=1.0
+
+[LENS]
+IgnoreWeatherSystem=true
+AmountDawn=1.0
+AmountSunrise=1.0
+AmountDay=1.0
+AmountSunset=1.0
+AmountDusk=1.0
+AmountNight=1.0
+AmountInteriorDay=1.0
+AmountInteriorNight=1.0
+
+[SKY]
+IgnoreWeatherSystem=true
+Enable=true
+GradientIntensityDawn=1.17
+GradientIntensitySunrise=1.11
+GradientIntensityDay=1.15
+GradientIntensitySunset=1.110001
+GradientIntensityDusk=1.160001
+GradientIntensityNight=1.140001
+GradientIntensityInteriorDay=1.12
+GradientIntensityInteriorNight=1.14
+GradientDesaturationDawn=0.38
+GradientDesaturationSunrise=0.3
+GradientDesaturationDay=0.24
+GradientDesaturationSunset=0.29
+GradientDesaturationDusk=0.35
+GradientDesaturationNight=0.49
+GradientDesaturationInteriorDay=0.22
+GradientDesaturationInteriorNight=0.42
+
+GradientTopIntensityDawn=0.59
+GradientTopIntensitySunrise=0.8
+GradientTopIntensityDay=0.920001
+GradientTopIntensitySunset=0.72
+GradientTopIntensityDusk=0.52
+GradientTopIntensityNight=0.43
+GradientTopIntensityInteriorDay=0.97
+GradientTopIntensityInteriorNight=0.48
+GradientTopCurveDawn=0.87
+GradientTopCurveSunrise=0.82
+GradientTopCurveDay=0.97
+GradientTopCurveSunset=0.88
+GradientTopCurveDusk=0.86
+GradientTopCurveNight=0.89
+GradientTopCurveInteriorDay=0.98
+GradientTopCurveInteriorNight=0.82
+GradientTopColorFilterDawn=0.886, 0.773, 0.969
+GradientTopColorFilterSunrise=0.812, 0.859, 0.953
+GradientTopColorFilterDay=0.941, 0.992, 0.996
+GradientTopColorFilterSunset=0.839, 0.875, 0.949
+GradientTopColorFilterDusk=0.902, 0.824, 0.965
+GradientTopColorFilterNight=0.867, 0.753, 0.886
+GradientTopColorFilterInteriorDay=0.949, 0.996, 0.992
+GradientTopColorFilterInteriorNight=0.898, 0.835, 0.906
+
+GradientMiddleIntensityDawn=1.1
+GradientMiddleIntensitySunrise=1.13
+GradientMiddleIntensityDay=1.18
+GradientMiddleIntensitySunset=1.13
+GradientMiddleIntensityDusk=1.11
+GradientMiddleIntensityNight=1.09
+GradientMiddleIntensityInteriorDay=1.1
+GradientMiddleIntensityInteriorNight=1.09
+GradientMiddleCurveDawn=0.86
+GradientMiddleCurveSunrise=0.85
+GradientMiddleCurveDay=0.72
+GradientMiddleCurveSunset=0.85
+GradientMiddleCurveDusk=0.8
+GradientMiddleCurveNight=0.91
+GradientMiddleCurveInteriorDay=0.74
+GradientMiddleCurveInteriorNight=0.92
+GradientMiddleColorFilterDawn=0.78, 0.753, 0.988
+GradientMiddleColorFilterSunrise=0.729, 0.843, 0.988
+GradientMiddleColorFilterDay=0.847, 0.914, 0.957
+GradientMiddleColorFilterSunset=0.792, 0.835, 0.973
+GradientMiddleColorFilterDusk=0.733, 0.741, 0.984
+GradientMiddleColorFilterNight=0.871, 0.929, 0.996
+GradientMiddleColorFilterInteriorDay=0.82, 0.878, 0.969
+GradientMiddleColorFilterInteriorNight=0.906, 0.882, 0.945
+
+GradientHorizonIntensityDawn=1.11
+GradientHorizonIntensitySunrise=1.07
+GradientHorizonIntensityDay=1.050001
+GradientHorizonIntensitySunset=1.08
+GradientHorizonIntensityDusk=1.1
+GradientHorizonIntensityNight=1.03
+GradientHorizonIntensityInteriorDay=1.03
+GradientHorizonIntensityInteriorNight=1.1
+GradientHorizonCurveDawn=0.93
+GradientHorizonCurveSunrise=0.95
+GradientHorizonCurveDay=0.92
+GradientHorizonCurveSunset=0.94
+GradientHorizonCurveDusk=0.92
+GradientHorizonCurveNight=0.97
+GradientHorizonCurveInteriorDay=0.9
+GradientHorizonCurveInteriorNight=0.98
+GradientHorizonColorFilterDawn=0.757, 0.792, 0.882
+GradientHorizonColorFilterSunrise=0.875, 0.929, 0.992
+GradientHorizonColorFilterDay=0.89, 0.984, 0.961
+GradientHorizonColorFilterSunset=0.784, 0.851, 0.949
+GradientHorizonColorFilterDusk=0.882, 0.89, 0.953
+GradientHorizonColorFilterNight=0.773, 0.827, 0.929
+GradientHorizonColorFilterInteriorDay=0.788, 0.91, 0.953
+GradientHorizonColorFilterInteriorNight=0.851, 0.863, 0.89
+
+CloudsIntensityDawn=0.58
+CloudsIntensitySunrise=0.870001
+CloudsIntensityDay=1.180001
+CloudsIntensitySunset=0.860001
+CloudsIntensityDusk=0.540001
+CloudsIntensityNight=0.330001
+CloudsIntensityInteriorDay=0.94
+CloudsIntensityInteriorNight=0.28
+CloudsCurveDawn=1.06
+CloudsCurveSunrise=1.01
+CloudsCurveDay=1.0
+CloudsCurveSunset=1.02
+CloudsCurveDusk=1.06
+CloudsCurveNight=1.07
+CloudsCurveInteriorDay=0.97
+CloudsCurveInteriorNight=1.08
+CloudsDesaturationDawn=0.28
+CloudsDesaturationSunrise=0.22
+CloudsDesaturationDay=0.33
+CloudsDesaturationSunset=0.21
+CloudsDesaturationDusk=0.26
+CloudsDesaturationNight=0.32
+CloudsDesaturationInteriorDay=0.31
+CloudsDesaturationInteriorNight=0.28
+CloudsOpacityDawn=0.81
+CloudsOpacitySunrise=0.89
+CloudsOpacityDay=0.93
+CloudsOpacitySunset=0.89
+CloudsOpacityDusk=0.82
+CloudsOpacityNight=0.73
+CloudsOpacityInteriorDay=0.97
+CloudsOpacityInteriorNight=0.71
+CloudsColorFilterDawn=0.847, 0.753, 0.996
+CloudsColorFilterSunrise=0.792, 0.816, 0.973
+CloudsColorFilterDay=0.937, 0.965, 0.984
+CloudsColorFilterSunset=0.729, 0.839, 0.965
+CloudsColorFilterDusk=0.678, 0.62, 0.973
+CloudsColorFilterNight=0.718, 0.553, 0.882
+CloudsColorFilterInteriorDay=0.788, 0.886, 0.914
+CloudsColorFilterInteriorNight=0.678, 0.549, 0.871
+
+SunIntensityDawn=4.0
+SunIntensitySunrise=6.0
+SunIntensityDay=5.0
+SunIntensitySunset=6.0
+SunIntensityDusk=4.0
+SunIntensityNight=3.0
+SunIntensityInteriorDay=5.0
+SunIntensityInteriorNight=3.0
+SunDesaturationDawn=0.11
+SunDesaturationSunrise=0.2
+SunDesaturationDay=0.35
+SunDesaturationSunset=0.28
+SunDesaturationDusk=0.14
+SunDesaturationNight=0.08
+SunDesaturationInteriorDay=0.35
+SunDesaturationInteriorNight=0.22
+SunColorFilterDawn=0.992, 0.537, 0.412
+SunColorFilterSunrise=0.996, 0.831, 0.729
+SunColorFilterDay=1, 0.894, 0.71
+SunColorFilterSunset=0.992, 0.749, 0.608
+SunColorFilterDusk=0.961, 0.451, 0.396
+SunColorFilterNight=0.914, 0.145, 0.145
+SunColorFilterInteriorDay=0.996, 0.827, 0.706
+SunColorFilterInteriorNight=0.816, 0.114, 0.0784
+
+MoonIntensityDawn=1.21
+MoonIntensitySunrise=0.95
+MoonIntensityDay=0.67
+MoonIntensitySunset=0.95
+MoonIntensityDusk=1.16
+MoonIntensityNight=1.78
+MoonIntensityInteriorDay=0.57
+MoonIntensityInteriorNight=1.84
+MoonDesaturationDawn=0.47
+MoonDesaturationSunrise=0.41
+MoonDesaturationDay=0.36
+MoonDesaturationSunset=0.42
+MoonDesaturationDusk=0.48
+MoonDesaturationNight=0.56
+MoonDesaturationInteriorDay=0.43
+MoonDesaturationInteriorNight=0.59
+MoonColorFilterDawn=0.553, 0.498, 0.804
+MoonColorFilterSunrise=0.82, 0.847, 0.882
+MoonColorFilterDay=1, 1, 1
+MoonColorFilterSunset=0.757, 0.812, 0.89
+MoonColorFilterDusk=0.537, 0.51, 0.706
+MoonColorFilterNight=0.486, 0.596, 0.8
+MoonColorFilterInteriorDay=1, 1, 1
+MoonColorFilterInteriorNight=0.455, 0.522, 0.816
+[ENVIRONMENT]
+IgnoreWeatherSystem=true
+DirectLightingIntensityDawn=2.45
+DirectLightingIntensitySunrise=2.9
+DirectLightingIntensityDay=3.59
+DirectLightingIntensitySunset=2.73
+DirectLightingIntensityDusk=2.31
+DirectLightingIntensityNight=1.98
+DirectLightingIntensityInteriorDay=3.85
+DirectLightingIntensityInteriorNight=2.12
+DirectLightingDesaturationDawn=0.16
+DirectLightingDesaturationSunrise=0.25
+DirectLightingDesaturationDay=0.29
+DirectLightingDesaturationSunset=0.18
+DirectLightingDesaturationDusk=0.14
+DirectLightingDesaturationNight=0.08
+DirectLightingDesaturationInteriorDay=0.31
+DirectLightingDesaturationInteriorNight=0.07
+DirectLightingColorFilterDawn=0.988, 0.761, 0.953
+DirectLightingColorFilterSunrise=0.992, 0.741, 0.8
+DirectLightingColorFilterDay=0.992, 0.855, 0.812
+DirectLightingColorFilterSunset=0.984, 0.804, 0.871
+DirectLightingColorFilterDusk=0.965, 0.745, 0.98
+DirectLightingColorFilterNight=0.722, 0.71, 0.976
+DirectLightingColorFilterInteriorDay=0.98, 0.953, 0.941
+DirectLightingColorFilterInteriorNight=0.886, 0.863, 0.996
+AmbientLightingIntensityDawn=0.42
+AmbientLightingIntensitySunrise=0.61
+AmbientLightingIntensityDay=0.87
+AmbientLightingIntensitySunset=0.66
+AmbientLightingIntensityDusk=0.44
+AmbientLightingIntensityNight=0.21
+AmbientLightingIntensityInteriorDay=0.22
+AmbientLightingIntensityInteriorNight=0.19
+[SSAO_SSIL]
+UseIndirectLighting=true
+ResolutionScale=1.0
+SourceTexturesScale=0.5
+SamplingQuality=0
+SamplingRange=0.15
+AOIntensity=1.0
+AOIntensityInterior=1.0
+AOAmount=0.5
+AOAmountInterior=0.5
+ILAmount=4.0
+ILAmountInterior=4.0
+AOMixingType=0
+AOMixingTypeInterior=0
+[FOG]
+IgnoreWeatherSystem=true
+DistanceFadeDawn=1.0
+DistanceFadeSunrise=1.0
+DistanceFadeDay=1.0
+DistanceFadeSunset=1.0
+DistanceFadeDusk=1.0
+DistanceFadeNight=1.0
+DistanceFadeInteriorDay=1.0
+DistanceFadeInteriorNight=1.0
+VerticalFadeDawn=1.0
+VerticalFadeSunrise=1.0
+VerticalFadeDay=1.0
+VerticalFadeSunset=1.0
+VerticalFadeDusk=1.0
+VerticalFadeNight=1.0
+VerticalFadeInteriorDay=1.0
+VerticalFadeInteriorNight=1.0
+SunIntensityDawn=1.0
+SunIntensitySunrise=1.0
+SunIntensityDay=1.0
+SunIntensitySunset=1.0
+SunIntensityDusk=1.0
+SunIntensityNight=1.0
+SunIntensityInteriorDay=1.0
+SunIntensityInteriorNight=1.0
+SunDesaturationDawn=0.0
+SunDesaturationSunrise=0.0
+SunDesaturationDay=0.0
+SunDesaturationSunset=0.0
+SunDesaturationDusk=0.0
+SunDesaturationNight=0.0
+SunDesaturationInteriorDay=0.0
+SunDesaturationInteriorNight=0.0
+SunColorFilterDawn=1, 1, 1
+SunColorFilterSunrise=1, 1, 1
+SunColorFilterDay=1, 1, 1
+SunColorFilterSunset=1, 1, 1
+SunColorFilterDusk=1, 1, 1
+SunColorFilterNight=1, 1, 1
+SunColorFilterInteriorDay=1, 1, 1
+SunColorFilterInteriorNight=1, 1, 1
diff --git a/enbseries/COPYING b/enbseries/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/enbseries/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/enbseries/VERSION b/enbseries/VERSION
new file mode 100644
index 0000000..0ea8df7
--- /dev/null
+++ b/enbseries/VERSION
@@ -0,0 +1 @@
+3.1.1 BETA "Stay FROSTy"
diff --git a/enbseries/_coldweather.ini b/enbseries/_coldweather.ini
new file mode 100644
index 0000000..934b439
--- /dev/null
+++ b/enbseries/_coldweather.ini
@@ -0,0 +1,269 @@
+[BLOOM]
+AmountDawn=0.1
+AmountSunrise=0.1
+AmountDay=0.1
+AmountSunset=0.1
+AmountDusk=0.1
+AmountNight=0.1
+AmountInteriorDay=0.1
+AmountInteriorNight=0.1
+[LENS]
+AmountDawn=1.0
+AmountSunrise=1.0
+AmountDay=1.0
+AmountSunset=1.0
+AmountDusk=1.0
+AmountNight=1.0
+AmountInteriorDay=1.0
+AmountInteriorNight=1.0
+[SKY]
+GradientIntensityDawn=1.0
+GradientIntensitySunrise=1.0
+GradientIntensityDay=1.0
+GradientIntensitySunset=1.0
+GradientIntensityDusk=1.0
+GradientIntensityNight=1.0
+GradientIntensityInteriorDay=1.0
+GradientIntensityInteriorNight=1.0
+GradientDesaturationDawn=0.0
+GradientDesaturationSunrise=0.0
+GradientDesaturationDay=0.0
+GradientDesaturationSunset=0.0
+GradientDesaturationDusk=0.0
+GradientDesaturationNight=0.0
+GradientDesaturationInteriorDay=0.0
+GradientDesaturationInteriorNight=0.0
+GradientTopIntensityDawn=1.0
+GradientTopIntensitySunrise=1.0
+GradientTopIntensityDay=1.0
+GradientTopIntensitySunset=1.0
+GradientTopIntensityDusk=1.0
+GradientTopIntensityNight=1.0
+GradientTopIntensityInteriorDay=1.0
+GradientTopIntensityInteriorNight=1.0
+GradientTopCurveDawn=1.0
+GradientTopCurveSunrise=1.0
+GradientTopCurveDay=1.0
+GradientTopCurveSunset=1.0
+GradientTopCurveDusk=1.0
+GradientTopCurveNight=1.0
+GradientTopCurveInteriorDay=1.0
+GradientTopCurveInteriorNight=1.0
+GradientTopColorFilterDawn=1, 1, 1
+GradientTopColorFilterSunrise=1, 1, 1
+GradientTopColorFilterDay=1, 1, 1
+GradientTopColorFilterSunset=1, 1, 1
+GradientTopColorFilterDusk=1, 1, 1
+GradientTopColorFilterNight=1, 1, 1
+GradientTopColorFilterInteriorDay=1, 1, 1
+GradientTopColorFilterInteriorNight=1, 1, 1
+GradientMiddleIntensityDawn=1.0
+GradientMiddleIntensitySunrise=1.0
+GradientMiddleIntensityDay=1.0
+GradientMiddleIntensitySunset=1.0
+GradientMiddleIntensityDusk=1.0
+GradientMiddleIntensityNight=1.0
+GradientMiddleIntensityInteriorDay=1.0
+GradientMiddleIntensityInteriorNight=1.0
+GradientMiddleCurveDawn=1.0
+GradientMiddleCurveSunrise=1.0
+GradientMiddleCurveDay=1.0
+GradientMiddleCurveSunset=1.0
+GradientMiddleCurveDusk=1.0
+GradientMiddleCurveNight=1.0
+GradientMiddleCurveInteriorDay=1.0
+GradientMiddleCurveInteriorNight=1.0
+GradientMiddleColorFilterDawn=1, 1, 1
+GradientMiddleColorFilterSunrise=1, 1, 1
+GradientMiddleColorFilterDay=1, 1, 1
+GradientMiddleColorFilterSunset=1, 1, 1
+GradientMiddleColorFilterDusk=1, 1, 1
+GradientMiddleColorFilterNight=1, 1, 1
+GradientMiddleColorFilterInteriorDay=1, 1, 1
+GradientMiddleColorFilterInteriorNight=1, 1, 1
+GradientHorizonIntensityDawn=1.0
+GradientHorizonIntensitySunrise=1.0
+GradientHorizonIntensityDay=1.0
+GradientHorizonIntensitySunset=1.0
+GradientHorizonIntensityDusk=1.0
+GradientHorizonIntensityNight=1.0
+GradientHorizonIntensityInteriorDay=1.0
+GradientHorizonIntensityInteriorNight=1.0
+GradientHorizonCurveDawn=1.0
+GradientHorizonCurveSunrise=1.0
+GradientHorizonCurveDay=1.0
+GradientHorizonCurveSunset=1.0
+GradientHorizonCurveDusk=1.0
+GradientHorizonCurveNight=1.0
+GradientHorizonCurveInteriorDay=1.0
+GradientHorizonCurveInteriorNight=1.0
+GradientHorizonColorFilterDawn=1, 1, 1
+GradientHorizonColorFilterSunrise=1, 1, 1
+GradientHorizonColorFilterDay=1, 1, 1
+GradientHorizonColorFilterSunset=1, 1, 1
+GradientHorizonColorFilterDusk=1, 1, 1
+GradientHorizonColorFilterNight=1, 1, 1
+GradientHorizonColorFilterInteriorDay=1, 1, 1
+GradientHorizonColorFilterInteriorNight=1, 1, 1
+CloudsIntensityDawn=1.0
+CloudsIntensitySunrise=1.0
+CloudsIntensityDay=1.0
+CloudsIntensitySunset=1.0
+CloudsIntensityDusk=1.0
+CloudsIntensityNight=1.0
+CloudsIntensityInteriorDay=1.0
+CloudsIntensityInteriorNight=1.0
+CloudsCurveDawn=1.0
+CloudsCurveSunrise=1.0
+CloudsCurveDay=1.0
+CloudsCurveSunset=1.0
+CloudsCurveDusk=1.0
+CloudsCurveNight=1.0
+CloudsCurveInteriorDay=1.0
+CloudsCurveInteriorNight=1.0
+CloudsDesaturationDawn=0.0
+CloudsDesaturationSunrise=0.0
+CloudsDesaturationDay=0.0
+CloudsDesaturationSunset=0.0
+CloudsDesaturationDusk=0.0
+CloudsDesaturationNight=0.0
+CloudsDesaturationInteriorDay=0.0
+CloudsDesaturationInteriorNight=0.0
+CloudsOpacityDawn=1.0
+CloudsOpacitySunrise=1.0
+CloudsOpacityDay=1.0
+CloudsOpacitySunset=1.0
+CloudsOpacityDusk=1.0
+CloudsOpacityNight=1.0
+CloudsOpacityInteriorDay=1.0
+CloudsOpacityInteriorNight=1.0
+CloudsColorFilterDawn=1, 1, 1
+CloudsColorFilterSunrise=1, 1, 1
+CloudsColorFilterDay=1, 1, 1
+CloudsColorFilterSunset=1, 1, 1
+CloudsColorFilterDusk=1, 1, 1
+CloudsColorFilterNight=1, 1, 1
+CloudsColorFilterInteriorDay=1, 1, 1
+CloudsColorFilterInteriorNight=1, 1, 1
+SunIntensityDawn=1.0
+SunIntensitySunrise=1.0
+SunIntensityDay=1.0
+SunIntensitySunset=1.0
+SunIntensityDusk=1.0
+SunIntensityNight=1.0
+SunIntensityInteriorDay=1.0
+SunIntensityInteriorNight=1.0
+SunDesaturationDawn=0.0
+SunDesaturationSunrise=0.0
+SunDesaturationDay=0.0
+SunDesaturationSunset=0.0
+SunDesaturationDusk=0.0
+SunDesaturationNight=0.0
+SunDesaturationInteriorDay=0.0
+SunDesaturationInteriorNight=0.0
+SunColorFilterDawn=1, 1, 1
+SunColorFilterSunrise=1, 1, 1
+SunColorFilterDay=1, 1, 1
+SunColorFilterSunset=1, 1, 1
+SunColorFilterDusk=1, 1, 1
+SunColorFilterNight=1, 1, 1
+SunColorFilterInteriorDay=1, 1, 1
+SunColorFilterInteriorNight=1, 1, 1
+MoonIntensityDawn=1.0
+MoonIntensitySunrise=1.0
+MoonIntensityDay=1.0
+MoonIntensitySunset=1.0
+MoonIntensityDusk=1.0
+MoonIntensityNight=1.0
+MoonIntensityInteriorDay=1.0
+MoonIntensityInteriorNight=1.0
+MoonDesaturationDawn=0.0
+MoonDesaturationSunrise=0.0
+MoonDesaturationDay=0.0
+MoonDesaturationSunset=0.0
+MoonDesaturationDusk=0.0
+MoonDesaturationNight=0.0
+MoonDesaturationInteriorDay=0.0
+MoonDesaturationInteriorNight=0.0
+MoonColorFilterDawn=1, 1, 1
+MoonColorFilterSunrise=1, 1, 1
+MoonColorFilterDay=1, 1, 1
+MoonColorFilterSunset=1, 1, 1
+MoonColorFilterDusk=1, 1, 1
+MoonColorFilterNight=1, 1, 1
+MoonColorFilterInteriorDay=1, 1, 1
+MoonColorFilterInteriorNight=1, 1, 1
+[ENVIRONMENT]
+DirectLightingIntensityDawn=1.0
+DirectLightingIntensitySunrise=1.0
+DirectLightingIntensityDay=1.0
+DirectLightingIntensitySunset=1.0
+DirectLightingIntensityDusk=1.0
+DirectLightingIntensityNight=1.0
+DirectLightingIntensityInteriorDay=1.0
+DirectLightingIntensityInteriorNight=1.0
+DirectLightingDesaturationDawn=0.0
+DirectLightingDesaturationSunrise=0.0
+DirectLightingDesaturationDay=0.0
+DirectLightingDesaturationSunset=0.0
+DirectLightingDesaturationDusk=0.0
+DirectLightingDesaturationNight=0.0
+DirectLightingDesaturationInteriorDay=0.0
+DirectLightingDesaturationInteriorNight=0.0
+DirectLightingColorFilterDawn=1, 1, 1
+DirectLightingColorFilterSunrise=1, 1, 1
+DirectLightingColorFilterDay=1, 1, 1
+DirectLightingColorFilterSunset=1, 1, 1
+DirectLightingColorFilterDusk=1, 1, 1
+DirectLightingColorFilterNight=1, 1, 1
+DirectLightingColorFilterInteriorDay=1, 1, 1
+DirectLightingColorFilterInteriorNight=1, 1, 1
+AmbientLightingIntensityDawn=1.0
+AmbientLightingIntensitySunrise=1.0
+AmbientLightingIntensityDay=1.0
+AmbientLightingIntensitySunset=1.0
+AmbientLightingIntensityDusk=1.0
+AmbientLightingIntensityNight=1.0
+AmbientLightingIntensityInteriorDay=1.0
+AmbientLightingIntensityInteriorNight=1.0
+[FOG]
+DistanceFadeDawn=1.0
+DistanceFadeSunrise=1.0
+DistanceFadeDay=1.0
+DistanceFadeSunset=1.0
+DistanceFadeDusk=1.0
+DistanceFadeNight=1.0
+DistanceFadeInteriorDay=1.0
+DistanceFadeInteriorNight=1.0
+VerticalFadeDawn=1.0
+VerticalFadeSunrise=1.0
+VerticalFadeDay=1.0
+VerticalFadeSunset=1.0
+VerticalFadeDusk=1.0
+VerticalFadeNight=1.0
+VerticalFadeInteriorDay=1.0
+VerticalFadeInteriorNight=1.0
+SunIntensityDawn=1.0
+SunIntensitySunrise=1.0
+SunIntensityDay=1.0
+SunIntensitySunset=1.0
+SunIntensityDusk=1.0
+SunIntensityNight=1.0
+SunIntensityInteriorDay=1.0
+SunIntensityInteriorNight=1.0
+SunDesaturationDawn=0.0
+SunDesaturationSunrise=0.0
+SunDesaturationDay=0.0
+SunDesaturationSunset=0.0
+SunDesaturationDusk=0.0
+SunDesaturationNight=0.0
+SunDesaturationInteriorDay=0.0
+SunDesaturationInteriorNight=0.0
+SunColorFilterDawn=1, 1, 1
+SunColorFilterSunrise=1, 1, 1
+SunColorFilterDay=1, 1, 1
+SunColorFilterSunset=1, 1, 1
+SunColorFilterDusk=1, 1, 1
+SunColorFilterNight=1, 1, 1
+SunColorFilterInteriorDay=1, 1, 1
+SunColorFilterInteriorNight=1, 1, 1
diff --git a/enbseries/_hotweather.ini b/enbseries/_hotweather.ini
new file mode 100644
index 0000000..934b439
--- /dev/null
+++ b/enbseries/_hotweather.ini
@@ -0,0 +1,269 @@
+[BLOOM]
+AmountDawn=0.1
+AmountSunrise=0.1
+AmountDay=0.1
+AmountSunset=0.1
+AmountDusk=0.1
+AmountNight=0.1
+AmountInteriorDay=0.1
+AmountInteriorNight=0.1
+[LENS]
+AmountDawn=1.0
+AmountSunrise=1.0
+AmountDay=1.0
+AmountSunset=1.0
+AmountDusk=1.0
+AmountNight=1.0
+AmountInteriorDay=1.0
+AmountInteriorNight=1.0
+[SKY]
+GradientIntensityDawn=1.0
+GradientIntensitySunrise=1.0
+GradientIntensityDay=1.0
+GradientIntensitySunset=1.0
+GradientIntensityDusk=1.0
+GradientIntensityNight=1.0
+GradientIntensityInteriorDay=1.0
+GradientIntensityInteriorNight=1.0
+GradientDesaturationDawn=0.0
+GradientDesaturationSunrise=0.0
+GradientDesaturationDay=0.0
+GradientDesaturationSunset=0.0
+GradientDesaturationDusk=0.0
+GradientDesaturationNight=0.0
+GradientDesaturationInteriorDay=0.0
+GradientDesaturationInteriorNight=0.0
+GradientTopIntensityDawn=1.0
+GradientTopIntensitySunrise=1.0
+GradientTopIntensityDay=1.0
+GradientTopIntensitySunset=1.0
+GradientTopIntensityDusk=1.0
+GradientTopIntensityNight=1.0
+GradientTopIntensityInteriorDay=1.0
+GradientTopIntensityInteriorNight=1.0
+GradientTopCurveDawn=1.0
+GradientTopCurveSunrise=1.0
+GradientTopCurveDay=1.0
+GradientTopCurveSunset=1.0
+GradientTopCurveDusk=1.0
+GradientTopCurveNight=1.0
+GradientTopCurveInteriorDay=1.0
+GradientTopCurveInteriorNight=1.0
+GradientTopColorFilterDawn=1, 1, 1
+GradientTopColorFilterSunrise=1, 1, 1
+GradientTopColorFilterDay=1, 1, 1
+GradientTopColorFilterSunset=1, 1, 1
+GradientTopColorFilterDusk=1, 1, 1
+GradientTopColorFilterNight=1, 1, 1
+GradientTopColorFilterInteriorDay=1, 1, 1
+GradientTopColorFilterInteriorNight=1, 1, 1
+GradientMiddleIntensityDawn=1.0
+GradientMiddleIntensitySunrise=1.0
+GradientMiddleIntensityDay=1.0
+GradientMiddleIntensitySunset=1.0
+GradientMiddleIntensityDusk=1.0
+GradientMiddleIntensityNight=1.0
+GradientMiddleIntensityInteriorDay=1.0
+GradientMiddleIntensityInteriorNight=1.0
+GradientMiddleCurveDawn=1.0
+GradientMiddleCurveSunrise=1.0
+GradientMiddleCurveDay=1.0
+GradientMiddleCurveSunset=1.0
+GradientMiddleCurveDusk=1.0
+GradientMiddleCurveNight=1.0
+GradientMiddleCurveInteriorDay=1.0
+GradientMiddleCurveInteriorNight=1.0
+GradientMiddleColorFilterDawn=1, 1, 1
+GradientMiddleColorFilterSunrise=1, 1, 1
+GradientMiddleColorFilterDay=1, 1, 1
+GradientMiddleColorFilterSunset=1, 1, 1
+GradientMiddleColorFilterDusk=1, 1, 1
+GradientMiddleColorFilterNight=1, 1, 1
+GradientMiddleColorFilterInteriorDay=1, 1, 1
+GradientMiddleColorFilterInteriorNight=1, 1, 1
+GradientHorizonIntensityDawn=1.0
+GradientHorizonIntensitySunrise=1.0
+GradientHorizonIntensityDay=1.0
+GradientHorizonIntensitySunset=1.0
+GradientHorizonIntensityDusk=1.0
+GradientHorizonIntensityNight=1.0
+GradientHorizonIntensityInteriorDay=1.0
+GradientHorizonIntensityInteriorNight=1.0
+GradientHorizonCurveDawn=1.0
+GradientHorizonCurveSunrise=1.0
+GradientHorizonCurveDay=1.0
+GradientHorizonCurveSunset=1.0
+GradientHorizonCurveDusk=1.0
+GradientHorizonCurveNight=1.0
+GradientHorizonCurveInteriorDay=1.0
+GradientHorizonCurveInteriorNight=1.0
+GradientHorizonColorFilterDawn=1, 1, 1
+GradientHorizonColorFilterSunrise=1, 1, 1
+GradientHorizonColorFilterDay=1, 1, 1
+GradientHorizonColorFilterSunset=1, 1, 1
+GradientHorizonColorFilterDusk=1, 1, 1
+GradientHorizonColorFilterNight=1, 1, 1
+GradientHorizonColorFilterInteriorDay=1, 1, 1
+GradientHorizonColorFilterInteriorNight=1, 1, 1
+CloudsIntensityDawn=1.0
+CloudsIntensitySunrise=1.0
+CloudsIntensityDay=1.0
+CloudsIntensitySunset=1.0
+CloudsIntensityDusk=1.0
+CloudsIntensityNight=1.0
+CloudsIntensityInteriorDay=1.0
+CloudsIntensityInteriorNight=1.0
+CloudsCurveDawn=1.0
+CloudsCurveSunrise=1.0
+CloudsCurveDay=1.0
+CloudsCurveSunset=1.0
+CloudsCurveDusk=1.0
+CloudsCurveNight=1.0
+CloudsCurveInteriorDay=1.0
+CloudsCurveInteriorNight=1.0
+CloudsDesaturationDawn=0.0
+CloudsDesaturationSunrise=0.0
+CloudsDesaturationDay=0.0
+CloudsDesaturationSunset=0.0
+CloudsDesaturationDusk=0.0
+CloudsDesaturationNight=0.0
+CloudsDesaturationInteriorDay=0.0
+CloudsDesaturationInteriorNight=0.0
+CloudsOpacityDawn=1.0
+CloudsOpacitySunrise=1.0
+CloudsOpacityDay=1.0
+CloudsOpacitySunset=1.0
+CloudsOpacityDusk=1.0
+CloudsOpacityNight=1.0
+CloudsOpacityInteriorDay=1.0
+CloudsOpacityInteriorNight=1.0
+CloudsColorFilterDawn=1, 1, 1
+CloudsColorFilterSunrise=1, 1, 1
+CloudsColorFilterDay=1, 1, 1
+CloudsColorFilterSunset=1, 1, 1
+CloudsColorFilterDusk=1, 1, 1
+CloudsColorFilterNight=1, 1, 1
+CloudsColorFilterInteriorDay=1, 1, 1
+CloudsColorFilterInteriorNight=1, 1, 1
+SunIntensityDawn=1.0
+SunIntensitySunrise=1.0
+SunIntensityDay=1.0
+SunIntensitySunset=1.0
+SunIntensityDusk=1.0
+SunIntensityNight=1.0
+SunIntensityInteriorDay=1.0
+SunIntensityInteriorNight=1.0
+SunDesaturationDawn=0.0
+SunDesaturationSunrise=0.0
+SunDesaturationDay=0.0
+SunDesaturationSunset=0.0
+SunDesaturationDusk=0.0
+SunDesaturationNight=0.0
+SunDesaturationInteriorDay=0.0
+SunDesaturationInteriorNight=0.0
+SunColorFilterDawn=1, 1, 1
+SunColorFilterSunrise=1, 1, 1
+SunColorFilterDay=1, 1, 1
+SunColorFilterSunset=1, 1, 1
+SunColorFilterDusk=1, 1, 1
+SunColorFilterNight=1, 1, 1
+SunColorFilterInteriorDay=1, 1, 1
+SunColorFilterInteriorNight=1, 1, 1
+MoonIntensityDawn=1.0
+MoonIntensitySunrise=1.0
+MoonIntensityDay=1.0
+MoonIntensitySunset=1.0
+MoonIntensityDusk=1.0
+MoonIntensityNight=1.0
+MoonIntensityInteriorDay=1.0
+MoonIntensityInteriorNight=1.0
+MoonDesaturationDawn=0.0
+MoonDesaturationSunrise=0.0
+MoonDesaturationDay=0.0
+MoonDesaturationSunset=0.0
+MoonDesaturationDusk=0.0
+MoonDesaturationNight=0.0
+MoonDesaturationInteriorDay=0.0
+MoonDesaturationInteriorNight=0.0
+MoonColorFilterDawn=1, 1, 1
+MoonColorFilterSunrise=1, 1, 1
+MoonColorFilterDay=1, 1, 1
+MoonColorFilterSunset=1, 1, 1
+MoonColorFilterDusk=1, 1, 1
+MoonColorFilterNight=1, 1, 1
+MoonColorFilterInteriorDay=1, 1, 1
+MoonColorFilterInteriorNight=1, 1, 1
+[ENVIRONMENT]
+DirectLightingIntensityDawn=1.0
+DirectLightingIntensitySunrise=1.0
+DirectLightingIntensityDay=1.0
+DirectLightingIntensitySunset=1.0
+DirectLightingIntensityDusk=1.0
+DirectLightingIntensityNight=1.0
+DirectLightingIntensityInteriorDay=1.0
+DirectLightingIntensityInteriorNight=1.0
+DirectLightingDesaturationDawn=0.0
+DirectLightingDesaturationSunrise=0.0
+DirectLightingDesaturationDay=0.0
+DirectLightingDesaturationSunset=0.0
+DirectLightingDesaturationDusk=0.0
+DirectLightingDesaturationNight=0.0
+DirectLightingDesaturationInteriorDay=0.0
+DirectLightingDesaturationInteriorNight=0.0
+DirectLightingColorFilterDawn=1, 1, 1
+DirectLightingColorFilterSunrise=1, 1, 1
+DirectLightingColorFilterDay=1, 1, 1
+DirectLightingColorFilterSunset=1, 1, 1
+DirectLightingColorFilterDusk=1, 1, 1
+DirectLightingColorFilterNight=1, 1, 1
+DirectLightingColorFilterInteriorDay=1, 1, 1
+DirectLightingColorFilterInteriorNight=1, 1, 1
+AmbientLightingIntensityDawn=1.0
+AmbientLightingIntensitySunrise=1.0
+AmbientLightingIntensityDay=1.0
+AmbientLightingIntensitySunset=1.0
+AmbientLightingIntensityDusk=1.0
+AmbientLightingIntensityNight=1.0
+AmbientLightingIntensityInteriorDay=1.0
+AmbientLightingIntensityInteriorNight=1.0
+[FOG]
+DistanceFadeDawn=1.0
+DistanceFadeSunrise=1.0
+DistanceFadeDay=1.0
+DistanceFadeSunset=1.0
+DistanceFadeDusk=1.0
+DistanceFadeNight=1.0
+DistanceFadeInteriorDay=1.0
+DistanceFadeInteriorNight=1.0
+VerticalFadeDawn=1.0
+VerticalFadeSunrise=1.0
+VerticalFadeDay=1.0
+VerticalFadeSunset=1.0
+VerticalFadeDusk=1.0
+VerticalFadeNight=1.0
+VerticalFadeInteriorDay=1.0
+VerticalFadeInteriorNight=1.0
+SunIntensityDawn=1.0
+SunIntensitySunrise=1.0
+SunIntensityDay=1.0
+SunIntensitySunset=1.0
+SunIntensityDusk=1.0
+SunIntensityNight=1.0
+SunIntensityInteriorDay=1.0
+SunIntensityInteriorNight=1.0
+SunDesaturationDawn=0.0
+SunDesaturationSunrise=0.0
+SunDesaturationDay=0.0
+SunDesaturationSunset=0.0
+SunDesaturationDusk=0.0
+SunDesaturationNight=0.0
+SunDesaturationInteriorDay=0.0
+SunDesaturationInteriorNight=0.0
+SunColorFilterDawn=1, 1, 1
+SunColorFilterSunrise=1, 1, 1
+SunColorFilterDay=1, 1, 1
+SunColorFilterSunset=1, 1, 1
+SunColorFilterDusk=1, 1, 1
+SunColorFilterNight=1, 1, 1
+SunColorFilterInteriorDay=1, 1, 1
+SunColorFilterInteriorNight=1, 1, 1
diff --git a/enbseries/_weatherlist.ini b/enbseries/_weatherlist.ini
new file mode 100644
index 0000000..0f2bb5f
--- /dev/null
+++ b/enbseries/_weatherlist.ini
@@ -0,0 +1,64 @@
+[WEATHER001]
+FileName=_hotweather.ini
+WeatherIDs=15e, 2b52a, a1588, f1033, ff98f, 1256fb, 12a18e, 1a6994, 1bd481, 1c3d5e, 1d670e, 1eb2ff, 1f61fd, 211221, 216a98, 21a563, 21a564, 222394, 2385fd, 2392a3, 2392a4, 2392a6, 23ab9c, 2486a4, 74c6, 247b6, 45f6f, 56638
+[WEATHER002]
+FileName=_coldweather.ini
+WeatherIDs=10f781, 1209af, 1c3473, 1ca7e4, 1cd096, 2115d7, 22239a, 225922, 2392a2, 2486a5, 74f2, 74f5, 74fa, 7fba, 427eb, 5d0c4
+[WEATHER003]
+FileName=
+[WEATHER004]
+FileName=
+[WEATHER005]
+FileName=
+[WEATHER006]
+FileName=
+[WEATHER007]
+FileName=
+[WEATHER008]
+FileName=
+[WEATHER009]
+FileName=
+[WEATHER010]
+FileName=
+[WEATHER011]
+FileName=
+[WEATHER012]
+FileName=
+[WEATHER013]
+FileName=
+[WEATHER014]
+FileName=
+[WEATHER015]
+FileName=
+[WEATHER016]
+FileName=
+[WEATHER017]
+FileName=
+[WEATHER018]
+FileName=
+[WEATHER019]
+FileName=
+[WEATHER020]
+FileName=
+[WEATHER021]
+FileName=
+[WEATHER022]
+FileName=
+[WEATHER023]
+FileName=
+[WEATHER024]
+FileName=
+[WEATHER025]
+FileName=
+[WEATHER026]
+FileName=
+[WEATHER027]
+FileName=
+[WEATHER028]
+FileName=
+[WEATHER029]
+FileName=
+[WEATHER030]
+FileName=
+[WEATHER031]
+FileName=
diff --git a/enbseries/enbadaptation.fx b/enbseries/enbadaptation.fx
new file mode 100644
index 0000000..985789d
--- /dev/null
+++ b/enbseries/enbadaptation.fx
@@ -0,0 +1,100 @@
+/*
+ enbadaptation.fx : MariENB3 eye adaptation shader.
+ (C)2016-2017 Marisa Kirisame, UnSX Team.
+ Part of MariENB3, the personal ENB of Marisa for Fallout 4.
+ Released under the GNU GPLv3 (or later).
+*/
+#include "menbglobaldefs.fx"
+
+float4 AdaptationParameters;
+
+Texture2D TextureCurrent;
+Texture2D TexturePrevious;
+
+SamplerState Sampler0
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+
+struct VS_INPUT_POST
+{
+ float3 pos : POSITION;
+ float2 txcoord : TEXCOORD0;
+};
+struct VS_OUTPUT_POST
+{
+ float4 pos : SV_POSITION;
+ float2 txcoord0 : TEXCOORD0;
+};
+
+VS_OUTPUT_POST VS_Quad( VS_INPUT_POST IN )
+{
+ VS_OUTPUT_POST OUT;
+ OUT.pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
+ OUT.txcoord0.xy = IN.txcoord.xy;
+ return OUT;
+}
+
+/* helper functions */
+/* photometric */
+#define luminance(x) dot(x,float3(0.2126,0.7152,0.0722))
+/* CCIR601 */
+//#define luminance(x) dot(x,float3(0.299,0.587,0.114))
+
+float4 PS_Downsample( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord0.xy;
+ float ssz = 1.0/16.0;
+ float4 res = float4(0,0,0,0);
+ int x, y;
+ [unroll] for ( y=-8; y<8; y++ ) [unroll] for ( x=-8; x<8; x++ )
+ res += TextureCurrent.Sample(Sampler0,coord+float2(x,y)*ssz);
+ res /= 256.0;
+ res = luminance(res.rgb);
+ res.w = 1.0;
+ return res;
+}
+
+float4 PS_Adaptation(VS_OUTPUT_POST IN, float4 v0 : SV_Position0) : SV_Target
+{
+ float2 coord = IN.txcoord0.xy;
+ float prev = TexturePrevious.Sample(Sampler0,coord).x;
+ float ssz = 1.0/16.0;
+ float4 res = float4(0,0,0,0);
+ float smpmax = 0.0, smp;
+ int x, y;
+ [unroll] for ( y=-8; y<8; y++ ) [unroll] for ( x=-8; x<8; x++ )
+ {
+ smp = TextureCurrent.Sample(Sampler0,coord+float2(x,y)*ssz).x;
+ smpmax = max(smpmax,smp);
+ res += smp;
+ }
+ res /= 256.0;
+ res = lerp(res,smpmax,AdaptationParameters.z);
+ res = lerp(prev,res,AdaptationParameters.w);
+ res = clamp(res,0.0,16384.0);
+ float vclip = clamp(res.x,AdaptationParameters.x,
+ AdaptationParameters.y);
+ res *= vclip/(res+0.000000001);
+ res.w = 1.0;
+ return res;
+}
+
+technique11 Downsample
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsample()));
+ }
+}
+technique11 Draw
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Adaptation()));
+ }
+}
diff --git a/enbseries/enbadaptation.fx.ini b/enbseries/enbadaptation.fx.ini
new file mode 100644
index 0000000..5bcee41
--- /dev/null
+++ b/enbseries/enbadaptation.fx.ini
@@ -0,0 +1,2 @@
+[ENBADAPTATION.FX]
+TECHNIQUE=0
diff --git a/enbseries/enbbloom.fx b/enbseries/enbbloom.fx
new file mode 100644
index 0000000..805a739
--- /dev/null
+++ b/enbseries/enbbloom.fx
@@ -0,0 +1,947 @@
+/*
+ enbbloom.fx : MariENB3 bloom shader.
+ (C)2016-2017 Marisa Kirisame, UnSX Team.
+ Part of MariENB3, the personal ENB of Marisa for Fallout 4.
+ Released under the GNU GPLv3 (or later).
+*/
+#include "menbglobaldefs.fx"
+
+string str_bloompre = "Bloom Prepass";
+/* bloom intensity */
+float bloomintensity_n
+<
+ string UIName = "Bloom Intensity Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float bloomintensity_d
+<
+ string UIName = "Bloom Intensity Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float bloomintensity_i
+<
+ string UIName = "Bloom Intensity Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+/* bloom power (contrast) */
+float bloompower_n
+<
+ string UIName = "Bloom Contrast Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float bloompower_d
+<
+ string UIName = "Bloom Contrast Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float bloompower_i
+<
+ string UIName = "Bloom Contrast Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+/* bloom saturation */
+float bloomsaturation_n
+<
+ string UIName = "Bloom Saturation Night";
+ string UIWidget = "Spinner";
+> = {0.75};
+float bloomsaturation_d
+<
+ string UIName = "Bloom Saturation Day";
+ string UIWidget = "Spinner";
+> = {0.75};
+float bloomsaturation_i
+<
+ string UIName = "Bloom Saturation Interior";
+ string UIWidget = "Spinner";
+> = {0.75};
+/* bloom offset (negative values keep dark areas from muddying up) */
+float bloombump_n
+<
+ string UIName = "Bloom Offset Night";
+ string UIWidget = "Spinner";
+> = {-0.5};
+float bloombump_d
+<
+ string UIName = "Bloom Offset Day";
+ string UIWidget = "Spinner";
+> = {-0.5};
+float bloombump_i
+<
+ string UIName = "Bloom Offset Interior";
+ string UIWidget = "Spinner";
+> = {-0.5};
+/* bloom cap (maximum brightness samples can have) */
+float bloomcap_n
+<
+ string UIName = "Bloom Intensity Cap Night";
+ string UIWidget = "Spinner";
+> = {20.0};
+float bloomcap_d
+<
+ string UIName = "Bloom Intensity Cap Day";
+ string UIWidget = "Spinner";
+> = {20.0};
+float bloomcap_i
+<
+ string UIName = "Bloom Intensity Cap Interior";
+ string UIWidget = "Spinner";
+> = {20.0};
+string str_bloomper = "Bloom Per-pass";
+/* bloom blur radius */
+float bloomradiusx
+<
+ string UIName = "Bloom Blur Radius X";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float bloomradiusy
+<
+ string UIName = "Bloom Blur Radius Y";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float bloomtheta
+<
+ string UIName = "Bloom Angle";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.0};
+/* bloom tint/blueshift parameters */
+float3 blu_n
+<
+ string UIName = "Blue Shift Night";
+ string UIWidget = "Color";
+> = {0.2,0.6,1.0};
+float3 blu_d
+<
+ string UIName = "Blue Shift Day";
+ string UIWidget = "Color";
+> = {0.2,0.6,1.0};
+float3 blu_i
+<
+ string UIName = "Blue Shift Interior";
+ string UIWidget = "Color";
+> = {0.2,0.6,1.0};
+float bsi_n
+<
+ string UIName = "Blue Shift Intensity Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.5};
+float bsi_d
+<
+ string UIName = "Blue Shift Intensity Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.5};
+float bsi_i
+<
+ string UIName = "Blue Shift Intensity Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.5};
+float bslp
+<
+ string UIName = "Blue Shift Luminance Factor Per-pass";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.22};
+float bsbp
+<
+ string UIName = "Blue Shift Color Factor Per-pass";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.33};
+/* anamorphic bloom (very intensive) */
+string str_bloomalf = "Anamorphic Bloom";
+bool alfenable
+<
+ string UIName = "Enable Anamorphic Bloom";
+ string UIWidget = "Checkbox";
+> = {true};
+float fbl_n
+<
+ string UIName = "Anamorphic Bloom Blend Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.75};
+float fbl_d
+<
+ string UIName = "Anamorphic Bloom Blend Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.75};
+float fbl_i
+<
+ string UIName = "Anamorphic Bloom Blend Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.75};
+float3 flu_n
+<
+ string UIName = "Anamorphic Bloom Blue Shift Night";
+ string UIWidget = "Color";
+> = {0.4,0.1,1.0};
+float3 flu_d
+<
+ string UIName = "Anamorphic Bloom Blue Shift Day";
+ string UIWidget = "Color";
+> = {0.4,0.1,1.0};
+float3 flu_i
+<
+ string UIName = "Anamorphic Bloom Blue Shift Interior";
+ string UIWidget = "Color";
+> = {0.4,0.1,1.0};
+float fsi_n
+<
+ string UIName = "Anamorphic Bloom Blue Shift Intensity Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float fsi_d
+<
+ string UIName = "Anamorphic Bloom Blue Shift Intensity Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float fsi_i
+<
+ string UIName = "Anamorphic Bloom Blue Shift Intensity Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float fpw_n
+<
+ string UIName = "Anamorphic Bloom Contrast Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float fpw_d
+<
+ string UIName = "Anamorphic Bloom Contrast Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float fpw_i
+<
+ string UIName = "Anamorphic Bloom Contrast Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float flen
+<
+ string UIName = "Anamorphic Bloom Radius Multiplier";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {4.0};
+string str_bloompost = "Bloom Post-pass";
+/* bloom mix factors */
+float bloommix1
+<
+ string UIName = "Bloom Pass 1 Blend";
+ string UIWidget = "Spinner";
+> = {0.75};
+float bloommix2
+<
+ string UIName = "Bloom Pass 2 Blend";
+ string UIWidget = "Spinner";
+> = {0.8};
+float bloommix3
+<
+ string UIName = "Bloom Pass 3 Blend";
+ string UIWidget = "Spinner";
+> = {0.85};
+float bloommix4
+<
+ string UIName = "Bloom Pass 4 Blend";
+ string UIWidget = "Spinner";
+> = {0.9};
+float bloommix5
+<
+ string UIName = "Bloom Pass 5 Blend";
+ string UIWidget = "Spinner";
+> = {0.95};
+float bloommix6
+<
+ string UIName = "Bloom Pass 6 Blend";
+ string UIWidget = "Spinner";
+> = {1.0};
+float bloommixs
+<
+ string UIName = "Bloom Single Pass Blend";
+ string UIWidget = "Spinner";
+> = {1.0};
+string str_bloomdirt = "Lens Dirt";
+bool dirtenable
+<
+ string UIName = "Enable Lens Dirt";
+ string UIWidget = "Checkbox";
+> = {false};
+float dirtmix1
+<
+ string UIName = "Dirt Pass 1 Blend";
+ string UIWidget = "Spinner";
+> = {0.0};
+float dirtmix2
+<
+ string UIName = "Dirt Pass 2 Blend";
+ string UIWidget = "Spinner";
+> = {0.1};
+float dirtmix3
+<
+ string UIName = "Dirt Pass 3 Blend";
+ string UIWidget = "Spinner";
+> = {1.2};
+float dirtmix4
+<
+ string UIName = "Dirt Pass 4 Blend";
+ string UIWidget = "Spinner";
+> = {0.5};
+float dirtmix5
+<
+ string UIName = "Dirt Pass 5 Blend";
+ string UIWidget = "Spinner";
+> = {0.25};
+float dirtmix6
+<
+ string UIName = "Dirt Pass 6 Blend";
+ string UIWidget = "Spinner";
+> = {0.1};
+float dirtmixs
+<
+ string UIName = "Dirt Single Pass Blend";
+ string UIWidget = "Spinner";
+> = {1.0};
+float dirtsaturation
+<
+ string UIName = "Dirt Saturation";
+ string UIWidget = "Spinner";
+> = {1.0};
+float ldirtpow
+<
+ string UIName = "Dirt Texture Contrast";
+ string UIWidget = "Spinner";
+> = {1.25};
+float dirtpow
+<
+ string UIName = "Dirt Contrast";
+ string UIWidget = "Spinner";
+> = {1.25};
+float ldirtfactor
+<
+ string UIName = "Dirt Factor";
+ string UIWidget = "Spinner";
+> = {1.5};
+
+
+/* gaussian blur matrices */
+/* radius: 4, std dev: 1.5 */
+/*static const float gauss4[4] =
+{
+ 0.270682, 0.216745, 0.111281, 0.036633
+};*/
+/* radius: 8, std dev: 3 */
+static const float gauss8[8] =
+{
+ 0.134598, 0.127325, 0.107778, 0.081638,
+ 0.055335, 0.033562, 0.018216, 0.008847
+};
+/* radius: 40, std dev: 15 */
+/*static const float gauss40[40] =
+{
+ 0.026823, 0.026763, 0.026585, 0.026291,
+ 0.025886, 0.025373, 0.024760, 0.024055,
+ 0.023267, 0.022404, 0.021478, 0.020499,
+ 0.019477, 0.018425, 0.017352, 0.016269,
+ 0.015186, 0.014112, 0.013056, 0.012025,
+ 0.011027, 0.010067, 0.009149, 0.008279,
+ 0.007458, 0.006688, 0.005972, 0.005308,
+ 0.004697, 0.004139, 0.003630, 0.003170,
+ 0.002756, 0.002385, 0.002055, 0.001763,
+ 0.001506, 0.001280, 0.001084, 0.000913
+};*/
+/* radius: 80, std dev: 30 */
+static const float gauss80[80] =
+{
+ 0.013406, 0.013398, 0.013376, 0.013339, 0.013287, 0.013221,
+ 0.013140, 0.013046, 0.012938, 0.012816, 0.012681, 0.012534,
+ 0.012375, 0.012205, 0.012023, 0.011831, 0.011629, 0.011417,
+ 0.011198, 0.010970, 0.010735, 0.010493, 0.010245, 0.009992,
+ 0.009735, 0.009473, 0.009209, 0.008941, 0.008672, 0.008402,
+ 0.008131, 0.007860, 0.007590, 0.007321, 0.007053, 0.006788,
+ 0.006525, 0.006266, 0.006010, 0.005759, 0.005511, 0.005269,
+ 0.005031, 0.004799, 0.004573, 0.004352, 0.004138, 0.003929,
+ 0.003727, 0.003532, 0.003343, 0.003160, 0.002985, 0.002816,
+ 0.002653, 0.002497, 0.002348, 0.002205, 0.002068, 0.001938,
+ 0.001814, 0.001696, 0.001584, 0.001478, 0.001377, 0.001282,
+ 0.001192, 0.001107, 0.001027, 0.000952, 0.000881, 0.000815,
+ 0.000753, 0.000694, 0.000640, 0.000589, 0.000542, 0.000497,
+ 0.000456, 0.000418
+};
+/* mathematical constants */
+static const float pi = 3.1415926535898;
+
+float4 ScreenSize;
+float ENightDayFactor;
+float EInteriorFactor;
+float4 TimeOfDay1;
+float4 TimeOfDay2;
+
+Texture2D TextureDownsampled;
+Texture2D TextureColor;
+
+Texture2D RenderTarget1024;
+Texture2D RenderTarget512;
+Texture2D RenderTarget256;
+Texture2D RenderTarget128;
+Texture2D RenderTarget64;
+Texture2D RenderTarget32;
+Texture2D RenderTargetRGBA64F;
+
+Texture2D TextureLens
+<
+#ifdef LENSDIRT_DDS
+ string ResourceName = "menblens.dds";
+#else
+ string ResourceName = "menblens.png";
+#endif
+>;
+
+SamplerState Sampler
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Border;
+ AddressV = Border;
+};
+SamplerState Sampler2
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+
+SamplerState SamplerLens
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Mirror;
+ AddressV = Mirror;
+};
+
+struct VS_INPUT_POST
+{
+ float3 pos : POSITION;
+ float2 txcoord : TEXCOORD0;
+};
+struct VS_OUTPUT_POST
+{
+ float4 pos : SV_POSITION;
+ float2 txcoord0 : TEXCOORD0;
+};
+
+VS_OUTPUT_POST VS_Quad(VS_INPUT_POST IN)
+{
+ VS_OUTPUT_POST OUT;
+ OUT.pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
+ OUT.txcoord0.xy = IN.txcoord.xy;
+ return OUT;
+}
+
+/* helper functions */
+/* photometric */
+#define luminance(x) dot(x,float3(0.2126,0.7152,0.0722))
+/* CCIR601 */
+//#define luminance(x) dot(x,float3(0.299,0.587,0.114))
+float3 rgb2hsv( float3 c )
+{
+ float4 K = float4(0.0,-1.0/3.0,2.0/3.0,-1.0);
+ float4 p = (c.g=0.0)&&(pp.x<1.0))?gauss80[abs(i)]:0.0;
+ }
+ res *= 1.0/sum;
+ float3 flu = tod_ind(flu);
+ float fsi = tod_ind(fsi);
+ float lm = max(0,luminance(res.rgb)-luminance(base.rgb))*fsi;
+ lm = lm/(1.0+lm);
+ res.rgb *= lerp(1.0,flu,lm);
+ float fbl = tod_ind(fbl);
+ float fpw = tod_ind(fpw);
+ res.rgb = pow(max(0,res.rgb),fpw)*fbl;
+ return res;
+}
+
+/* blur step goes here */
+float4 PS_HorizontalBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0,
+ uniform Texture2D intex, uniform float insz ) : SV_Target
+{
+ float2 coord = IN.txcoord0.xy;
+ float4 res = float4(0.0,0.0,0.0,0.0);
+ int i;
+ float sum = 0.0;
+ float2 pp;
+ float2 dir = float2(cos(bloomtheta*2*pi),sin(bloomtheta*2*pi))
+ *bloomradiusx/insz;
+ [unroll] for ( i=-7; i<=7; i++ )
+ {
+ pp = coord+dir*i;
+ res += gauss8[abs(i)]*intex.Sample(Sampler,pp);
+ sum += ((pp.x>=0.0)&&(pp.x<1.0))?gauss8[abs(i)]:0.0;
+ }
+ res *= 1.0/sum;
+ if ( alfenable ) res += Anamorphic(coord,intex,insz);
+ res.a = 1.0;
+ return res;
+}
+
+/* This is the vertical step */
+float4 PS_VerticalBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0,
+ uniform Texture2D intex, uniform float insz,
+ uniform float bpass ) : SV_Target
+{
+
+ float2 coord = IN.txcoord0.xy;
+ float4 res = float4(0.0,0.0,0.0,0.0),
+ base = RenderTargetRGBA64F.Sample(Sampler,coord);
+ int i;
+ float sum = 0.0;
+ float2 pp;
+ float2 dir = float2(sin(bloomtheta*2*pi),-cos(bloomtheta*2*pi))
+ *bloomradiusy/insz;
+ [unroll] for ( i=-7; i<=7; i++ )
+ {
+ pp = coord+dir*i;
+ res += gauss8[abs(i)]*intex.Sample(Sampler,pp);
+ sum += ((pp.y>=0.0)&&(pp.y<1.0))?gauss8[abs(i)]:0.0;
+ }
+ res *= 1.0/sum;
+ float3 blu = tod_ind(blu);
+ float bsi = tod_ind(bsi);
+ float lm = max(0,luminance(res.rgb)-luminance(base.rgb))*bsi;
+ lm = lm/(1.0+lm);
+ lm *= 1.0-saturate(bpass*bslp);
+ blu = saturate(blu+bpass*bsbp);
+ res.rgb *= lerp(1.0,blu,lm);
+ res.a = 1.0;
+ return res;
+}
+
+/* end pass, mix it all up */
+float4 PS_PostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord0.xy;
+ float4 res = bloommix1*RenderTarget1024.Sample(Sampler2,coord);
+ res += bloommix2*RenderTarget512.Sample(Sampler2,coord);
+ res += bloommix3*RenderTarget256.Sample(Sampler2,coord);
+ res += bloommix4*RenderTarget128.Sample(Sampler2,coord);
+ res += bloommix5*RenderTarget64.Sample(Sampler2,coord);
+ res += bloommix6*RenderTarget32.Sample(Sampler2,coord);
+ res.rgb /= 6.0;
+ res.rgb = clamp(res.rgb,0.0,32768.0);
+ res.a = 1.0;
+ if ( !dirtenable ) return res;
+ /* crappy lens filter, useful when playing characters with glasses */
+ float2 ccoord = coord;
+#ifdef ASPECT_LENSDIRT
+ ccoord.y = (coord.y-0.5)*ScreenSize.w+0.5;
+#endif
+ float4 crap = TextureLens.Sample(SamplerLens,ccoord);
+ float4 mud = dirtmix1*RenderTarget1024.Sample(Sampler2,coord);
+ mud += dirtmix2*RenderTarget512.Sample(Sampler2,coord);
+ mud += dirtmix3*RenderTarget256.Sample(Sampler2,coord);
+ mud += dirtmix4*RenderTarget128.Sample(Sampler2,coord);
+ mud += dirtmix5*RenderTarget64.Sample(Sampler2,coord);
+ mud += dirtmix6*RenderTarget32.Sample(Sampler2,coord);
+ mud.rgb /= 6.0;
+ float3 hsv = rgb2hsv(mud.rgb);
+ hsv.y = clamp(hsv.y*dirtsaturation,0.0,1.0);
+ mud.rgb = clamp(hsv2rgb(hsv),0.0,32768.0);
+ mud.rgb = pow(mud.rgb,dirtpow);
+ float mudmax = luminance(mud.rgb);
+ float mudn = max(mudmax/(1.0+mudmax),0.0);
+ mudn = pow(mudn,max(ldirtpow-crap.a,0.0));
+ mud.rgb *= mudn*ldirtfactor*crap.rgb;
+ res += max(mud,0.0);
+ res.a = 1.0;
+ return res;
+}
+
+float4 PS_SPostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord0.xy;
+ float4 res = bloommixs*RenderTarget128.Sample(Sampler2,coord);
+ res.rgb = clamp(res.rgb,0.0,32768.0);
+ res.a = 1.0;
+ if ( !dirtenable ) return res;
+ /* crappy lens filter, useful when playing characters with glasses */
+ float2 ccoord = coord;
+#ifdef ASPECT_LENSDIRT
+ ccoord.y = (coord.y-0.5)*ScreenSize.w+0.5;
+#endif
+ float4 crap = TextureLens.Sample(SamplerLens,ccoord);
+ float4 mud = dirtmixs*RenderTarget32.Sample(Sampler2,coord);
+ mud.rgb = pow(mud.rgb,dirtpow);
+ float3 hsv = rgb2hsv(mud.rgb);
+ hsv.y = clamp(hsv.y*dirtsaturation,0.0,1.0);
+ mud.rgb = clamp(hsv2rgb(hsv),0.0,32768.0);
+ float mudmax = luminance(mud.rgb);
+ float mudn = max(mudmax/(1.0+mudmax),0.0);
+ mudn = pow(mudn,max(ldirtpow-crap.a,0.0));
+ mud.rgb *= mudn*ldirtfactor*crap.rgb;
+ res += max(mud,0.0);
+ res.a = 1.0;
+ return res;
+}
+
+technique11 BloomSimplePass
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_PrePass()));
+ }
+}
+
+technique11 BloomSimplePass1
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTargetRGBA64F,0.0)));
+ }
+}
+technique11 BloomSimplePass2
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget1024,1024.0)));
+ }
+}
+technique11 BloomSimplePass3
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget512,512.0)));
+ }
+}
+technique11 BloomSimplePass4
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget256,256.0)));
+ }
+}
+technique11 BloomSimplePass5
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget128,128.0)));
+ }
+}
+technique11 BloomSimplePass6
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget64,64.0)));
+ }
+}
+
+technique11 BloomSimplePass7
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget128,128.0)));
+ }
+}
+technique11 BloomSimplePass8
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,128.0,3.0)));
+ }
+}
+
+technique11 BloomSimplePass9
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget32,32.0)));
+ }
+}
+technique11 BloomSimplePass10
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,32.0,5.0)));
+ }
+}
+
+technique11 BloomSimplePass11
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SPostPass()));
+ }
+}
+
+technique11 BloomPass
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_PrePass()));
+ }
+}
+
+technique11 BloomPass1
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTargetRGBA64F,0.0)));
+ }
+}
+technique11 BloomPass2
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget1024,1024.0)));
+ }
+}
+technique11 BloomPass3
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget512,512.0)));
+ }
+}
+technique11 BloomPass4
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget256,256.0)));
+ }
+}
+technique11 BloomPass5
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget128,128.0)));
+ }
+}
+technique11 BloomPass6
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Downsize(RenderTarget64,64.0)));
+ }
+}
+
+technique11 BloomPass7
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget1024,1024.0)));
+ }
+}
+technique11 BloomPass8
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,1024.0,0.0)));
+ }
+}
+
+technique11 BloomPass9
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget512,512.0)));
+ }
+}
+technique11 BloomPass10
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,512.0,1.0)));
+ }
+}
+
+technique11 BloomPass11
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget256,256.0)));
+ }
+}
+technique11 BloomPass12
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,256.0,2.0)));
+ }
+}
+
+technique11 BloomPass13
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget128,128.0)));
+ }
+}
+technique11 BloomPass14
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,128.0,3.0)));
+ }
+}
+
+technique11 BloomPass15
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget64,64.0)));
+ }
+}
+technique11 BloomPass16
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,64.0,4.0)));
+ }
+}
+
+technique11 BloomPass17
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_HorizontalBlur(RenderTarget32,32.0)));
+ }
+}
+technique11 BloomPass18
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_VerticalBlur(TextureColor,32.0,5.0)));
+ }
+}
+
+technique11 BloomPass19
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_PostPass()));
+ }
+}
diff --git a/enbseries/enbbloom.fx.ini b/enbseries/enbbloom.fx.ini
new file mode 100644
index 0000000..d7a475b
--- /dev/null
+++ b/enbseries/enbbloom.fx.ini
@@ -0,0 +1,104 @@
+[ENBBLOOM.FX]
+TECHNIQUE=1
+Bloom Intensity Night=0.69
+Bloom Intensity Day=0.38
+Bloom Intensity Interior=0.53
+Bloom Contrast Night=1.07
+Bloom Contrast Day=1.18
+Bloom Contrast Interior=1.11
+Bloom Saturation Night=1.05
+Bloom Saturation Day=1.03
+Bloom Saturation Interior=1.05
+Bloom Offset Night=-0.02
+Bloom Offset Day=-0.07
+Bloom Offset Interior=-0.04
+Bloom Intensity Cap Night=10.0
+Bloom Intensity Cap Day=10.0
+Bloom Intensity Cap Interior=10.0
+Bloom Blur Radius=1.0
+Blue Shift Night=0.294, 0.424, 0.859
+Blue Shift Day=0.22, 0.537, 0.855
+Blue Shift Interior=0.337, 0.525, 0.878
+Blue Shift Intensity Night=0.97
+Blue Shift Intensity Day=0.71
+Blue Shift Intensity Interior=0.84
+Blue Shift Luminance Factor Per-pass=0.33
+Blue Shift Color Factor Per-pass=0.79
+Enable Anamorphic Bloom=true
+Anamorphic Bloom Blend Night=0.51
+Anamorphic Bloom Blend Day=0.32
+Anamorphic Bloom Blend Interior=0.45
+Anamorphic Bloom Blue Shift Night=0.553, 0.404, 0.851
+Anamorphic Bloom Blue Shift Day=0.424, 0.384, 0.831
+Anamorphic Bloom Blue Shift Interior=0.537, 0.475, 0.89
+Anamorphic Bloom Blue Shift Intensity Night=1.94
+Anamorphic Bloom Blue Shift Intensity Day=1.59
+Anamorphic Bloom Blue Shift Intensity Interior=1.85
+Anamorphic Bloom Contrast Night=1.13
+Anamorphic Bloom Contrast Day=1.06
+Anamorphic Bloom Contrast Interior=1.09
+Anamorphic Bloom Radius Multiplier=1.0
+Bloom Intensity Interior Night=1.33
+Bloom Intensity Interior Day=1.26
+Bloom Contrast Interior Night=0.73
+Bloom Contrast Interior Day=0.75
+Bloom Saturation Interior Night=0.81
+Bloom Saturation Interior Day=0.75
+Bloom Offset Interior Night=-0.43
+Bloom Offset Interior Day=-0.42
+Bloom Intensity Cap Interior Night=100.0
+Bloom Intensity Cap Interior Day=100.0
+Blue Shift Night Red=0.2
+Blue Shift Night Green=0.6
+Blue Shift Night Blue=1.0
+Blue Shift Day Red=0.2
+Blue Shift Day Green=0.6
+Blue Shift Day Blue=1.0
+Blue Shift Interior Night Red=0.2
+Blue Shift Interior Night Green=0.6
+Blue Shift Interior Night Blue=1.0
+Blue Shift Interior Day Red=0.2
+Blue Shift Interior Day Green=0.6
+Blue Shift Interior Day Blue=1.0
+Blue Shift Intensity Interior Night=0.59
+Blue Shift Intensity Interior Day=0.48
+Anamorphic Bloom Blend Interior Night=0.69
+Anamorphic Bloom Blend Interior Day=0.63
+Anamorphic Bloom Blue Shift Night Red=0.4
+Anamorphic Bloom Blue Shift Night Green=0.1
+Anamorphic Bloom Blue Shift Night Blue=1.0
+Anamorphic Bloom Blue Shift Day Red=0.5
+Anamorphic Bloom Blue Shift Day Green=0.1
+Anamorphic Bloom Blue Shift Day Blue=1.0
+Anamorphic Bloom Blue Shift Interior Night Red=0.5
+Anamorphic Bloom Blue Shift Interior Night Green=0.1
+Anamorphic Bloom Blue Shift Interior Night Blue=1.0
+Anamorphic Bloom Blue Shift Interior Day Red=0.5
+Anamorphic Bloom Blue Shift Interior Day Green=0.1
+Anamorphic Bloom Blue Shift Interior Day Blue=1.0
+Anamorphic Bloom Blue Shift Interior Night=1.86
+Anamorphic Bloom Blue Shift Interior Day=1.86
+Anamorphic Bloom Contrast Interior Night=1.12
+Anamorphic Bloom Contrast Interior Day=1.22
+Bloom Pass 1 Blend=0.34
+Bloom Pass 2 Blend=0.59
+Bloom Pass 3 Blend=0.71
+Bloom Pass 4 Blend=0.79
+Bloom Pass 5 Blend=0.88
+Bloom Pass 6 Blend=0.94
+Enable Lens Dirt=false
+Dirt Pass 1 Blend=0.08
+Dirt Pass 2 Blend=0.25
+Dirt Pass 3 Blend=0.54
+Dirt Pass 4 Blend=1.09
+Dirt Pass 5 Blend=2.71
+Dirt Pass 6 Blend=5.68
+Dirt Contrast=2.069999
+Dirt Factor=0.53
+Bloom Blur Radius X=1.0
+Bloom Blur Radius Y=1.0
+Bloom Single Pass Blend=0.81
+Dirt Single Pass Blend=1.43
+Dirt Saturation=0.38
+Bloom Angle=0.0
+Dirt Texture Contrast=0.86
diff --git a/enbseries/enbdepthoffield.fx b/enbseries/enbdepthoffield.fx
new file mode 100644
index 0000000..8c00595
--- /dev/null
+++ b/enbseries/enbdepthoffield.fx
@@ -0,0 +1,1676 @@
+/*
+ enbdepthoffield.fx : MariENB3 prepass shaders.
+ (C)2016-2017 Marisa Kirisame, UnSX Team.
+ Part of MariENB3, the personal ENB of Marisa for Fallout 4.
+ Released under the GNU GPLv3 (or later).
+*/
+#include "menbglobaldefs.fx"
+
+string str_misc = "Miscellaneous";
+/* fixed resolution, keeps blur filters at a consistent internal resolution */
+int2 fixed
+<
+ string UIName = "Fixed Resolution";
+ string UIWidget = "Vector";
+ int2 UIMin = {0,0};
+> = {1920,1080};
+float cutoff
+<
+ string UIName = "Depth Cutoff";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1000000.0;
+> = {999949.0};
+float zNear
+<
+ string UIName = "Near Z";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.05};
+float zFar
+<
+ string UIName = "Far Z";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {3098.0};
+string str_dist = "Distortion Filters";
+float distcha
+<
+ string UIName = "Distortion Chromatic Aberration";
+ string UIWidget = "Spinner";
+> = {10.0};
+bool waterenable
+<
+ string UIName = "Enable Underwater";
+ string UIWidget = "Checkbox";
+> = {false};
+float3 uwm
+<
+ string UIName = "Underwater Frequency";
+ string UIWidget = "Vector";
+ float3 UIMin = {0.0,0.0,0.0};
+> = {1.4,1.6,1.4};
+float3 uwf
+<
+ string UIName = "Underwater Speed";
+ string UIWidget = "Vector";
+ float3 UIMin = {0.0,0.0,0.0};
+> = {10.0,8.0,16.0};
+float3 uws
+<
+ string UIName = "Underwater Amplitude";
+ string UIWidget = "Vector";
+ float3 UIMin = {0.0,0.0,0.0};
+> = {0.3,0.5,0.8};
+float uwz
+<
+ string UIName = "Underwater Zoom";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.5};
+bool wateralways
+<
+ string UIName = "Always Underwater";
+ string UIWidget = "Checkbox";
+> = {false};
+bool heatenable
+<
+ string UIName = "Enable Hot Air Refraction";
+ string UIWidget = "Checkbox";
+> = {false};
+float heatsize
+<
+ string UIName = "Heat Texture Size";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {3.5};
+float heatspeed
+<
+ string UIName = "Heat Speed";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.5};
+float heatfadepow
+<
+ string UIName = "Heat Fade Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {200.0};
+float heatfademul
+<
+ string UIName = "Heat Fade Intensity";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.5};
+float heatfadebump
+<
+ string UIName = "Heat Fade Offset";
+ string UIWidget = "Spinner";
+> = {0.0};
+float heatstrength
+<
+ string UIName = "Heat Intensity";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.25};
+float heatpow
+<
+ string UIName = "Heat Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.2};
+float heatfactor_dw
+<
+ string UIName = "Heat Factor Dawn";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.2};
+float heatfactor_sr
+<
+ string UIName = "Heat Factor Sunrise";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.5};
+float heatfactor_dy
+<
+ string UIName = "Heat Factor Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float heatfactor_ss
+<
+ string UIName = "Heat Factor Sunset";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.7};
+float heatfactor_ds
+<
+ string UIName = "Heat Factor Dusk";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.1};
+float heatfactor_nt
+<
+ string UIName = "Heat Factor Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float heatfactor_i
+<
+ string UIName = "Heat Factor Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+bool heatalways
+<
+ string UIName = "Heat Always Enable";
+ string UIWidget = "Checkbox";
+> = {false};
+bool frostenable
+<
+ string UIName = "Enable Screen Frost";
+ string UIWidget = "Checkbox";
+> = {false};
+float frostpow
+<
+ string UIName = "Frost Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float froststrength
+<
+ string UIName = "Frost Strength";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float frostrpow
+<
+ string UIName = "Frost Radial Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float frostrmult
+<
+ string UIName = "Frost Radial Intensity";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float frostrbump
+<
+ string UIName = "Frost Radial Offset";
+ string UIWidget = "Spinner";
+> = {0.0};
+float frostblend
+<
+ string UIName = "Frost Texture Blend";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float frostbpow
+<
+ string UIName = "Frost Texture Blend Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float frostsize
+<
+ string UIName = "Frost Texture Size";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float frostfactor_dw
+<
+ string UIName = "Frost Factor Dawn";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.1};
+float frostfactor_sr
+<
+ string UIName = "Frost Factor Sunrise";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float frostfactor_dy
+<
+ string UIName = "Frost Factor Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float frostfactor_ss
+<
+ string UIName = "Frost Factor Sunset";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float frostfactor_ds
+<
+ string UIName = "Frost Factor Dusk";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.1};
+float frostfactor_nt
+<
+ string UIName = "Frost Factor Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.25};
+float frostfactor_i
+<
+ string UIName = "Frost Factor Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+bool frostalways
+<
+ string UIName = "Frost Always Enable";
+ string UIWidget = "Checkbox";
+> = {false};
+string str_focus = "Focusing Parameters";
+/* circle (triangle, actually) average focus */
+bool focuscircle
+<
+ string UIName = "Enable Focus Triangle";
+ string UIWidget = "Checkbox";
+> = {true};
+bool focusdisplay
+<
+ string UIName = "Display Focus Points";
+ string UIWidget = "Checkbox";
+> = {false};
+bool focusmanual
+<
+ string UIName = "Enable Manual Focus";
+ string UIWidget = "Checkbox";
+> = {false};
+float focusmanualvalue
+<
+ string UIName = "Manual Focus Depth";
+ string UIWidget = "Checkbox";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.5};
+/* center point of focus */
+float2 focuscenter
+<
+ string UIName = "Focus Point Center";
+ string UIWidget = "Vector";
+ float2 UIMin = {0.0,0.0};
+ float2 UIMax = {1.0,1.0};
+> = {0.5,0.5};
+float focuscircleangle
+<
+ string UIName = "Focus Triangle Angle";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.0};
+/* radius of the focus point triangle */
+float focusradius_n
+<
+ string UIName = "Focus Triangle Radius Night";
+ string UIWidget = "Spinner";
+> = {20.0};
+float focusradius_d
+<
+ string UIName = "Focus Triangle Radius Day";
+ string UIWidget = "Spinner";
+> = {20.0};
+float focusradius_i
+<
+ string UIName = "Focus Triangle Radius Interior";
+ string UIWidget = "Spinner";
+> = {20.0};
+/* mix factor with sample at screen center */
+float focusmix_n
+<
+ string UIName = "Focus Triangle Blending Night";
+ string UIWidget = "Spinner";
+> = {0.5};
+float focusmix_d
+<
+ string UIName = "Focus Triangle Blending Day";
+ string UIWidget = "Spinner";
+> = {0.5};
+float focusmix_i
+<
+ string UIName = "Focus Triangle Blending Interior";
+ string UIWidget = "Spinner";
+> = {0.5};
+/* maximum focus depth */
+float focusmax_n
+<
+ string UIName = "Focus Maximum Depth Night";
+ string UIWidget = "Spinner";
+> = {1000.0};
+float focusmax_d
+<
+ string UIName = "Focus Maximum Depth Day";
+ string UIWidget = "Spinner";
+> = {1000.0};
+float focusmax_i
+<
+ string UIName = "Focus Maximum Depth Interior";
+ string UIWidget = "Spinner";
+> = {1000.0};
+float focuscenterdiscard
+<
+ string UIName = "Focus Circle Discard Center Depth";
+ string UIWidget = "Spinner";
+> = {0.0};
+/* dof filter */
+string str_dof = "Depth Of Field";
+/* dof multiplier (makes unfocused depths more blurry) */
+float dofmult_n
+<
+ string UIName = "DOF Intensity Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {500.0};
+float dofmult_d
+<
+ string UIName = "DOF Intensity Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {500.0};
+float dofmult_i
+<
+ string UIName = "DOF Intensity Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {500.0};
+/* dof power (falloff, kinda) */
+float dofpow_n
+<
+ string UIName = "DOF Contrast Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {4.0};
+float dofpow_d
+<
+ string UIName = "DOF Contrast Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {4.0};
+float dofpow_i
+<
+ string UIName = "DOF Contrast Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {4.0};
+/* dof bump (negative values are useful for "widening" the focused area) */
+float dofbump_n
+<
+ string UIName = "DOF Shift Night";
+ string UIWidget = "Spinner";
+> = {0.0};
+float dofbump_d
+<
+ string UIName = "DOF Shift Day";
+ string UIWidget = "Spinner";
+> = {0.0};
+float dofbump_i
+<
+ string UIName = "DOF Shift Interior";
+ string UIWidget = "Spinner";
+> = {0.0};
+/* fixed focused depth factors */
+float doffixedfocusmult_n
+<
+ string UIName = "DOF Fixed Focus Intensity Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float doffixedfocusmult_d
+<
+ string UIName = "DOF Fixed Focus Intensity Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float doffixedfocusmult_i
+<
+ string UIName = "DOF Fixed Focus Intensity Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float doffixedfocuspow_n
+<
+ string UIName = "DOF Fixed Focus Contrast Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float doffixedfocuspow_d
+<
+ string UIName = "DOF Fixed Focus Contrast Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float doffixedfocuspow_i
+<
+ string UIName = "DOF Fixed Focus Contrast Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float doffixedfocusbump_n
+<
+ string UIName = "DOF Fixed Focus Shift Night";
+ string UIWidget = "Spinner";
+> = {0.0};
+float doffixedfocusbump_d
+<
+ string UIName = "DOF Fixed Focus Shift Day";
+ string UIWidget = "Spinner";
+> = {0.0};
+float doffixedfocusbump_i
+<
+ string UIName = "DOF Fixed Focus Shift Interior";
+ string UIWidget = "Spinner";
+> = {0.0};
+float doffixedfocusblend_n
+<
+ string UIName = "DOF Fixed Focus Blend Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float doffixedfocusblend_d
+<
+ string UIName = "DOF Fixed Focus Blend Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float doffixedfocusblend_i
+<
+ string UIName = "DOF Fixed Focus Blend Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+/* fixed unfocused depth factors */
+float doffixedunfocusmult_n
+<
+ string UIName = "DOF Fixed Unfocus Intensity Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.0};
+float doffixedunfocusmult_d
+<
+ string UIName = "DOF Fixed Unfocus Intensity Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.0};
+float doffixedunfocusmult_i
+<
+ string UIName = "DOF Fixed Unfocus Intensity Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.0};
+float doffixedunfocuspow_n
+<
+ string UIName = "DOF Fixed Unfocus Contrast Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1000.0};
+float doffixedunfocuspow_d
+<
+ string UIName = "DOF Fixed Unfocus Contrast Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1000.0};
+float doffixedunfocuspow_i
+<
+ string UIName = "DOF Fixed Unfocus Contrast Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1000.0};
+float doffixedunfocusbump_n
+<
+ string UIName = "DOF Fixed Unfocus Shift Night";
+ string UIWidget = "Spinner";
+> = {0.0};
+float doffixedunfocusbump_d
+<
+ string UIName = "DOF Fixed Unfocus Shift Day";
+ string UIWidget = "Spinner";
+> = {0.0};
+float doffixedunfocusbump_i
+<
+ string UIName = "DOF Fixed Unfocus Shift Interior";
+ string UIWidget = "Spinner";
+> = {0.0};
+float doffixedunfocusblend_n
+<
+ string UIName = "DOF Fixed Unfocus Blend Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float doffixedunfocusblend_d
+<
+ string UIName = "DOF Fixed Unfocus Blend Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float doffixedunfocusblend_i
+<
+ string UIName = "DOF Fixed Unfocus Blend Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+/* prevents fixed dof from blurring the skybox */
+bool doffixedcut
+<
+ string UIName = "DOF Fixed Use Cutoff";
+ string UIWidget = "Checkbox";
+> = {true};
+/* disable depth of field */
+bool dofdisable
+<
+ string UIName = "Disable DOF";
+ string UIWidget = "Checkbox";
+> = {false};
+float dofpradius
+<
+ string UIName = "DOF Blur Radius";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {6.0};
+float dofpcha
+<
+ string UIName = "DOF Blur Chromatic Aberration";
+ string UIWidget = "Spinner";
+> = {0.0};
+/* tilting */
+float doftiltxcenter
+<
+ string UIName = "Focus Plane Horizontal Tilt Center";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.5};
+float doftiltycenter
+<
+ string UIName = "Focus Plane Vertical Tilt Center";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.5};
+float doftiltx
+<
+ string UIName = "Focus Plane Horizontal Tilt";
+ string UIWidget = "Spinner";
+> = {0.0};
+float doftilty
+<
+ string UIName = "Focus Plane Vertical Tilt";
+ string UIWidget = "Spinner";
+> = {0.0};
+/* cheap performance option */
+float dofminblur
+<
+ string UIName = "DOF Minimum Blur";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.0};
+bool dofdebug
+<
+ string UIName = "Debug Depth";
+ string UIWidget = "Checkbox";
+> = {false};
+bool dfcdebug
+<
+ string UIName = "Debug Focus";
+ string UIWidget = "Checkbox";
+> = {false};
+/* use "edge vision" filter */
+string str_view = "Edgevision";
+bool edgevenable
+<
+ string UIName = "Enable Edgevision";
+ string UIWidget = "Checkbox";
+> = {false};
+/* factors */
+float edgevfadepow_n
+<
+ string UIName = "Edgevision Fade Contrast Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.0};
+float edgevfadepow_d
+<
+ string UIName = "Edgevision Fade Contrast Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.0};
+float edgevfadepow_i
+<
+ string UIName = "Edgevision Fade Contrast Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.0};
+float edgevfademult_n
+<
+ string UIName = "Edgevision Fade Intensity Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {500.0};
+float edgevfademult_d
+<
+ string UIName = "Edgevision Fade Intensity Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {500.0};
+float edgevfademult_i
+<
+ string UIName = "Edgevision Fade Intensity Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {500.0};
+float edgevpow
+<
+ string UIName = "Edgevision Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.25};
+float edgevmult
+<
+ string UIName = "Edgevision Intensity";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {4.0};
+float edgevradius
+<
+ string UIName = "Edgevision Radius";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+/* ssao filter */
+string str_ssao = "Ray Marching SSAO";
+bool ssaoenable
+<
+ string UIName = "Enable SSAO";
+ string UIWidget = "Checkbox";
+> = {false};
+float ssaoradius
+<
+ string UIName = "SSAO Radius";
+ string UIWidget = "Spinner";
+> = {1.0};
+int ssaonoise
+<
+ string UIName = "SSAO Noise";
+ string UIWidget = "Spinner";
+ int UIMin = 0;
+ int UIMax = 1;
+> = {1};
+float ssaofadepow_n
+<
+ string UIName = "SSAO Fade Contrast Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.05};
+float ssaofadepow_d
+<
+ string UIName = "SSAO Fade Contrast Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.05};
+float ssaofadepow_i
+<
+ string UIName = "SSAO Fade Contrast Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.05};
+float ssaofademult_n
+<
+ string UIName = "SSAO Fade Intensity Night";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float ssaofademult_d
+<
+ string UIName = "SSAO Fade Intensity Day";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float ssaofademult_i
+<
+ string UIName = "SSAO Fade Intensity Interior";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float ssaomult
+<
+ string UIName = "SSAO Intensity";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.5};
+float ssaopow
+<
+ string UIName = "SSAO Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.5};
+float ssaoblend
+<
+ string UIName = "SSAO Blending";
+ string UIWidget = "Spinner";
+> = {1.0};
+bool ssaobenable
+<
+ string UIName = "SSAO Blur";
+ string UIWidget = "Checkbox";
+> = {true};
+float ssaobfact
+<
+ string UIName = "SSAO Bilateral Factor";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1000.0};
+float ssaoclamp
+<
+ string UIName = "SSAO Range";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float ssaoclampmin
+<
+ string UIName = "SSAO Range Min";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+float ssaobradius
+<
+ string UIName = "SSAO Blur Radius";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+bool ssaodebug
+<
+ string UIName = "Debug SSAO";
+ string UIWidget = "Checkbox";
+> = {false};
+
+/* 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
+};
+/* radius: 16, std dev: 13 */
+static const float gauss16[16] =
+{
+ 0.040012, 0.039893, 0.039541, 0.038960,
+ 0.038162, 0.037159, 0.035969, 0.034612,
+ 0.033109, 0.031485, 0.029764, 0.027971,
+ 0.026131, 0.024268, 0.022405, 0.020563
+};
+/* SSAO samples */
+static const float3 ssao_samples[16] =
+{
+ float3( 0.0000,-0.0002, 0.0000),float3(-0.0004, 0.0013, 0.0014),
+ float3(-0.0030, 0.0048,-0.0034),float3( 0.0147, 0.0046,-0.0026),
+ float3(-0.0097, 0.0275,-0.0092),float3(-0.0178,-0.0072, 0.0491),
+ float3( 0.0227,-0.0431,-0.0681),float3( 0.1052, 0.0332,-0.0588),
+ float3( 0.0997, 0.0056, 0.1473),float3(-0.1252, 0.2019, 0.0564),
+ float3(-0.1054,-0.2072, 0.2271),float3(-0.0542, 0.3096, 0.2814),
+ float3( 0.0072,-0.3534, 0.4035),float3(-0.0024,-0.2385, 0.6260),
+ float3(-0.1940, 0.5722,-0.5602),float3(-0.0910,-0.7548,-0.6497)
+};
+/* For high quality DOF */
+static const float2 poisson32[32] =
+{
+ float2( 0.7284430,-0.1927130),float2( 0.4051600,-0.2312710),
+ float2( 0.9535280, 0.0669683),float2( 0.6544140,-0.4439470),
+ float2( 0.6029910, 0.1058970),float2( 0.2637500,-0.7163810),
+ float2( 0.9105380,-0.3889810),float2( 0.5942730,-0.7400740),
+ float2( 0.8215680, 0.3162520),float2( 0.3577550, 0.4884250),
+ float2( 0.6935990, 0.7070140),float2( 0.0470570, 0.1961800),
+ float2(-0.0977021, 0.6241300),float2( 0.2110300, 0.8778350),
+ float2(-0.3743440, 0.2494580),float2( 0.0144776,-0.0766484),
+ float2(-0.3377660,-0.1255100),float2( 0.3136420, 0.1077710),
+ float2(-0.5204340, 0.8369860),float2(-0.1182680, 0.9801750),
+ float2(-0.6969480,-0.3869330),float2(-0.6156080, 0.0307209),
+ float2(-0.3806790,-0.6055360),float2(-0.1909570,-0.3861330),
+ float2(-0.2449080,-0.8655030),float2( 0.0822108,-0.4975580),
+ float2(-0.5649250, 0.5756740),float2(-0.8741830,-0.1685750),
+ float2( 0.0761715,-0.9631760),float2(-0.9218270, 0.2121210),
+ float2(-0.6378530, 0.3053550),float2(-0.8425180, 0.4753000)
+};
+
+float4 Timer;
+float4 ScreenSize;
+float4 Weather;
+float ENightDayFactor;
+float EInteriorFactor;
+float4 TimeOfDay1;
+float4 TimeOfDay2;
+float4 DofParameters;
+
+Texture2D TextureCurrent;
+Texture2D TexturePrevious;
+Texture2D TextureOriginal;
+Texture2D TextureColor;
+Texture2D TextureDepth;
+Texture2D TextureFocus;
+
+Texture2D RenderTargetR16F; /* for SSAO */
+Texture2D RenderTargetR32F; /* for DOF */
+
+Texture2D TextureNoise3
+<
+ string ResourceName = "menbnoise2.png";
+>;
+Texture2D TextureHeat
+<
+#ifdef HEAT_DDS
+ string ResourceName = "menbheat.dds";
+#else
+ string ResourceName = "menbheat.png";
+#endif
+>;
+Texture2D TextureFrost
+<
+#ifdef FROST_DDS
+ string ResourceName = "menbfrost.dds";
+#else
+ string ResourceName = "menbfrost.png";
+#endif
+>;
+Texture2D TextureFrostBump
+<
+#ifdef FROSTBUMP_DDS
+ string ResourceName = "menbfrostbump.dds";
+#else
+ string ResourceName = "menbfrostbump.png";
+#endif
+>;
+
+SamplerState Sampler0
+{
+ Filter = MIN_MAG_MIP_POINT;
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+SamplerState Sampler1
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+SamplerState Sampler2
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Wrap;
+ AddressV = Wrap;
+};
+
+struct VS_INPUT_POST
+{
+ float3 pos : POSITION;
+ float2 txcoord : TEXCOORD0;
+};
+struct VS_OUTPUT_POST
+{
+ float4 pos : SV_POSITION;
+ float2 txcoord : TEXCOORD0;
+};
+
+VS_OUTPUT_POST VS_Quad( VS_INPUT_POST IN )
+{
+ VS_OUTPUT_POST OUT;
+ OUT.pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
+ OUT.txcoord.xy = IN.txcoord.xy;
+ return OUT;
+}
+
+/* helper functions */
+/* photometric */
+#define luminance(x) dot(x,float3(0.2126,0.7152,0.0722))
+/* CCIR601 */
+//#define luminance(x) dot(x,float3(0.299,0.587,0.114))
+/* these are znear/zfar values for Skyrim, but MAY match Fallout too */
+float depthlinear( float2 coord )
+{
+ float z = TextureDepth.SampleLevel(Sampler1,coord,0).x;
+ return (2*zNear)/(zFar+zNear-z*(zFar-zNear));
+}
+
+/*
+ Thank you Boris for not providing access to a normal buffer. Guesswork using
+ the depth buffer results in imprecise normals that aren't smoothed. Plus
+ there is no way to get the normal data from textures either. Also, three
+ texture fetches are needed instead of one (great!)
+*/
+float3 pseudonormal( float dep, float2 coord )
+{
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 ofs1 = float2(0,1.0/bresl.y);
+ float2 ofs2 = float2(1.0/bresl.x,0);
+ float dep1 = TextureDepth.SampleLevel(Sampler1,coord+ofs1,0).x;
+ float dep2 = TextureDepth.SampleLevel(Sampler1,coord+ofs2,0).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);
+}
+
+/* SSAO Prepass */
+float4 PS_SSAOPre( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ /* get occlusion using single-step Ray Marching with 64 samples */
+ float ssaofadepow = tod_ind(ssaofadepow);
+ float ssaofademult = tod_ind(ssaofademult);
+ if ( !ssaoenable ) return 0.0;
+ float depth = TextureDepth.Sample(Sampler1,coord).x;
+ float ldepth = depthlinear(coord);
+ if ( depth >= cutoff*0.000001 ) return 1.0;
+ float2 bresl;
+ if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
+ else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float3 normal = pseudonormal(depth,coord);
+ float2 nc = coord*(bresl/256.0);
+ float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*ssaoradius;
+ float2 nc2 = TextureNoise3.SampleLevel(Sampler2,nc+48000.0*Timer.x
+ *ssaonoise,0).xy;
+ float3 rnormal = TextureNoise3.SampleLevel(Sampler2,nc2,0).xyz*2.0-1.0;
+ rnormal = normalize(rnormal);
+ float occ = 0.0;
+ int i;
+ float3 sample;
+ float sdepth, so, delta;
+ float sclamp = ssaoclamp/100000.0;
+ float sclampmin = ssaoclampmin/100000.0;
+ [unroll] for ( i=0; i<16; i++ )
+ {
+ sample = reflect(ssao_samples[i],rnormal);
+ sample *= sign(dot(normal,sample));
+ so = ldepth-sample.z*bof.x;
+ sdepth = depthlinear(coord+bof*sample.xy/ldepth);
+ delta = saturate(so-sdepth);
+ delta *= 1.0-smoothstep(0.0,sclamp,delta);
+ if ( (delta > sclampmin) && (delta < sclamp) )
+ occ += 1.0-delta;
+ }
+ float uocc = saturate(occ/16.0);
+ float fade = 1.0-depth;
+ uocc *= saturate(pow(max(0,fade),ssaofadepow)*ssaofademult);
+ uocc = saturate(pow(max(0,uocc),ssaopow)*ssaomult);
+ return saturate(1.0-(uocc*ssaoblend));
+}
+/*
+ The blur passes use bilateral filtering to mostly preserve borders.
+ An additional factor using difference of normals was tested, but the
+ performance decrease was too much, so it's gone forever.
+*/
+float4 PS_SSAOBlurH( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ if ( !ssaoenable ) return 0.0;
+ if ( !ssaobenable ) return TextureColor.Sample(Sampler1,coord);
+ float bresl = ScreenSize.x;
+ float bof = (1.0/bresl)*ssaobradius;
+ float isd, sd, ds, sw, tw = 0;
+ float res = 0.0;
+ int i;
+ isd = TextureDepth.Sample(Sampler1,coord).x;
+ [unroll] for ( i=-15; i<=15; i++ )
+ {
+ sd = TextureDepth.Sample(Sampler1,coord+float2(i,0)*bof).x;
+ ds = 1.0/pow(1.0+abs(isd-sd),ssaobfact);
+ sw = ds;
+ sw *= gauss16[abs(i)];
+ tw += sw;
+ res += sw*TextureColor.Sample(Sampler1,coord+float2(i,0)
+ *bof).x;
+ }
+ res /= tw;
+ return res;
+}
+float4 PS_SSAOBlurV( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ if ( !ssaoenable ) return 0.0;
+ if ( !ssaobenable ) return TextureColor.Sample(Sampler1,coord);
+ float bresl = ScreenSize.x*ScreenSize.w;
+ float bof = (1.0/bresl)*ssaobradius;
+ float isd, sd, ds, sw, tw = 0;
+ float res = 0.0;
+ int i;
+ isd = TextureDepth.Sample(Sampler1,coord).x;
+ [unroll] for ( i=-15; i<=15; i++ )
+ {
+ sd = TextureDepth.Sample(Sampler1,coord+float2(0,i)*bof).x;
+ ds = 1.0/pow(1.0+abs(isd-sd),ssaobfact);
+ sw = ds;
+ sw *= gauss16[abs(i)];
+ tw += sw;
+ res += sw*TextureColor.Sample(Sampler1,coord+float2(0,i)
+ *bof).x;
+ }
+ res /= tw;
+ return res;
+}
+
+/* precalculate DOF factors */
+float4 PS_DoFPrepass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ if ( dofdisable ) return 0.0;
+ float dofpow = tod_ind(dofpow);
+ float dofmult = tod_ind(dofmult);
+ float dofbump = tod_ind(dofbump);
+ float doffixedfocuspow = tod_ind(doffixedfocuspow);
+ float doffixedfocusmult = tod_ind(doffixedfocusmult);
+ float doffixedfocusbump = tod_ind(doffixedfocusbump);
+ float doffixedfocusblend = tod_ind(doffixedfocusblend);
+ float doffixedunfocuspow = tod_ind(doffixedunfocuspow);
+ float doffixedunfocusmult = tod_ind(doffixedunfocusmult);
+ float doffixedunfocusbump = tod_ind(doffixedunfocusbump);
+ float doffixedunfocusblend = tod_ind(doffixedunfocusblend);
+ float dep = TextureDepth.Sample(Sampler1,coord).x;
+ float foc = TextureFocus.Sample(Sampler1,coord).x;
+ /* cheap tilt */
+ foc = foc+0.01*doftiltx*(doftiltxcenter-coord.x)
+ +0.01*doftilty*(doftiltycenter-coord.y);
+ float dfc = abs(dep-foc);
+ float dff = abs(dep);
+ float dfu = dff;
+ if ( doffixedcut && (dep >= cutoff*0.000001) ) dfu *= 0;
+ dfc = clamp(pow(dfc,dofpow)*dofmult+dofbump,0.0,1.0);
+ dff = clamp(pow(dff,doffixedfocuspow)*doffixedfocusmult
+ +doffixedfocusbump,0.0,1.0);
+ dfu = clamp(pow(dfu,doffixedunfocuspow)*doffixedunfocusmult
+ +doffixedunfocusbump,0.0,1.0);
+ dfc *= lerp(1.0,dff,doffixedfocusblend);
+ dfc += lerp(0.0,dfu,doffixedunfocusblend);
+ return max(0.0,dfc);
+}
+
+/* apply SSAO to screen */
+float4 PS_SSAOApply( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureOriginal.Sample(Sampler1,coord);
+ if ( !ssaoenable ) return res;
+ float mud = RenderTargetR16F.Sample(Sampler1,coord).x;
+ if ( ssaodebug ) return saturate(mud);
+ return res*mud;
+}
+
+/* old Edgevision mode */
+float3 EdgeView( float3 res, float2 coord )
+{
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ if ( fixed.x>0 && fixed.y>0 ) bresl = fixed;
+ float edgevfadepow = tod_ind(edgevfadepow);
+ float edgevfademult = tod_ind(edgevfademult);
+ float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*edgevradius;
+ float mdx = 0, mdy = 0, mud = 0;
+ /* this reduces texture fetches by half, big difference */
+ float3x3 depths;
+ depths[0][0] = depthlinear(coord+float2(-1,-1)*bof);
+ depths[0][1] = depthlinear(coord+float2( 0,-1)*bof);
+ depths[0][2] = depthlinear(coord+float2( 1,-1)*bof);
+ depths[1][0] = depthlinear(coord+float2(-1, 0)*bof);
+ depths[1][1] = depthlinear(coord+float2( 0, 0)*bof);
+ depths[1][2] = depthlinear(coord+float2( 1, 0)*bof);
+ depths[2][0] = depthlinear(coord+float2(-1, 1)*bof);
+ depths[2][1] = depthlinear(coord+float2( 0, 1)*bof);
+ depths[2][2] = depthlinear(coord+float2( 1, 1)*bof);
+ mdx += GX[0][0]*depths[0][0];
+ mdx += GX[0][1]*depths[0][1];
+ mdx += GX[0][2]*depths[0][2];
+ mdx += GX[1][0]*depths[1][0];
+ mdx += GX[1][1]*depths[1][1];
+ mdx += GX[1][2]*depths[1][2];
+ mdx += GX[2][0]*depths[2][0];
+ mdx += GX[2][1]*depths[2][1];
+ mdx += GX[2][2]*depths[2][2];
+ mdy += GY[0][0]*depths[0][0];
+ mdy += GY[0][1]*depths[0][1];
+ mdy += GY[0][2]*depths[0][2];
+ mdy += GY[1][0]*depths[1][0];
+ mdy += GY[1][1]*depths[1][1];
+ mdy += GY[1][2]*depths[1][2];
+ mdy += GY[2][0]*depths[2][0];
+ mdy += GY[2][1]*depths[2][1];
+ mdy += GY[2][2]*depths[2][2];
+ mud = pow(mdx*mdx+mdy*mdy,0.5);
+ float fade = 1.0-TextureDepth.Sample(Sampler1,coord).x;
+ mud *= saturate(pow(max(0,fade),edgevfadepow)*edgevfademult);
+ mud = saturate(pow(max(0,mud),edgevpow)*edgevmult);
+ return mud;
+}
+
+/* Edgevision and Sharpen */
+float4 PS_Edge( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler1,coord);
+ if ( edgevenable ) res.rgb = EdgeView(res.rgb,coord);
+ return res;
+}
+
+/*
+ Underwater distortion, which currently has no real use due to Boris being
+ lazy. fWaterLevel doesn't yet provide any usable values.
+*/
+float2 UnderwaterDistort( float2 coord )
+{
+ if ( !wateralways ) return coord;
+ float2 ofs = float2(0.0,0.0);
+ float siny = sin(pi*2.0*(coord.y*uwm.x+Timer.x*uwf.x*100.0))*uws.x;
+ ofs.y = siny+sin(pi*2.0*(coord.x*uwm.y+Timer.x*uwf.y*100.0))*uws.y;
+ ofs.x = siny+sin(pi*2.0*(coord.x*uwm.z+Timer.x*uwf.z*100.0))*uws.z;
+ ofs -= (coord-0.5)*2.0*uwz;
+ return coord+ofs*0.01;
+}
+
+/* Distant hot air refraction. Not very realistic, but does the job. */
+float2 DistantHeat( float2 coord )
+{
+ float2 bresl;
+ float dep, odep;
+ dep = TextureDepth.Sample(Sampler1,coord).x;
+ float distfade = clamp(pow(max(0,dep),heatfadepow)*heatfademul
+ +heatfadebump,0.0,1.0);
+ if ( distfade <= 0.0 ) return coord;
+ float todpow = todx_ind(heatfactor);
+ if ( !heatalways && (todpow <= 0.0) ) return coord;
+ if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
+ else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 nc = coord*(bresl/HEATSIZE)*heatsize;
+ float2 ts = float2(0.01,1.0)*Timer.x*10000.0*heatspeed;
+ float2 ofs = TextureHeat.SampleLevel(Sampler2,nc+ts,0).xy;
+ ofs = (ofs-0.5)*2.0;
+ ofs *= pow(length(ofs),heatpow);
+ ofs *= todpow;
+ if ( !heatalways ) ofs *= weatherfactor(WT_HOT);
+ odep = TextureDepth.SampleLevel(Sampler1,coord+ofs*heatstrength
+ *distfade*0.01,0).x;
+ float odistfade = clamp(pow(max(0,odep),heatfadepow)*heatfademul
+ +heatfadebump,0.0,1.0);
+ if ( odistfade <= 0.0 ) return coord;
+ return coord+ofs*heatstrength*distfade*0.01;
+}
+
+/* Screen distortion filters */
+float4 PS_Distortion( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float2 bresl;
+ if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
+ else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 ofs = coord;
+ if ( waterenable ) ofs = UnderwaterDistort(ofs);
+ if ( heatenable ) ofs = DistantHeat(ofs);
+ ofs -= coord;
+ float4 res;
+ if ( (distcha == 0.0) || (length(ofs) == 0.0) )
+ return TextureColor.Sample(Sampler1,coord+ofs);
+ float2 ofr, ofg, ofb;
+ ofr = ofs*(1.0-distcha*0.01);
+ ofg = ofs;
+ ofb = ofs*(1.0+distcha*0.01);
+ res = float4(TextureColor.Sample(Sampler1,coord+ofr).r,
+ TextureColor.Sample(Sampler1,coord+ofg).g,
+ TextureColor.Sample(Sampler1,coord+ofb).b,
+ TextureColor.Sample(Sampler1,coord+ofs).a);
+ return res;
+}
+
+/* This will do absolutely nothing */
+float4 PS_Aperture( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ return float4(0,0,0,1);
+}
+
+/* Focus */
+float4 PS_ReadFocus( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ if ( dofdisable ) return 0.0;
+ if ( focusmanual ) return focusmanualvalue;
+ float focusmax = tod_ind(focusmax);
+ float cfocus = min(TextureDepth.Sample(Sampler1,focuscenter).x,
+ focusmax*0.001);
+ if ( !focuscircle ) return cfocus;
+ /* using polygons inscribed into a circle, in this case a triangle */
+ float focusradius = tod_ind(focusradius);
+ float focusmix = tod_ind(focusmix);
+ float cstep = (1.0/3.0);
+ float sfocus, mfocus[4];
+ float2 coord;
+ float2 bof = float2(1.0,1.0/ScreenSize.w)*focusradius*0.01;
+ float fan = focuscircleangle*2.0*pi;
+ coord.x = focuscenter.x+sin(fan)*bof.x;
+ coord.y = focuscenter.y+cos(fan)*bof.y;
+ mfocus[0] = min(TextureDepth.Sample(Sampler1,coord).x,
+ focusmax*0.001);
+ coord.x = focuscenter.x+sin(fan+2.0*pi*cstep)*bof.x;
+ coord.y = focuscenter.y+cos(fan+2.0*pi*cstep)*bof.y;
+ mfocus[1] = min(TextureDepth.Sample(Sampler1,coord).x,
+ focusmax*0.001);
+ coord.x = focuscenter.x+sin(fan+4.0*pi*cstep)*bof.x;
+ coord.y = focuscenter.y+cos(fan+4.0*pi*cstep)*bof.y;
+ mfocus[2] = min(TextureDepth.Sample(Sampler1,coord).x,
+ focusmax*0.001);
+ if ( (mfocus[0] <= focuscenterdiscard)
+ && (mfocus[1] <= focuscenterdiscard)
+ && (mfocus[2] <= focuscenterdiscard) )
+ mfocus[3] = focuscenterdiscard;
+ else if ( mfocus[0] <= focuscenterdiscard )
+ {
+ if ( mfocus[1] <= focuscenterdiscard ) mfocus[3] = mfocus[2];
+ else mfocus[3] = 0.5*(mfocus[1]+mfocus[2]);
+ }
+ else if ( mfocus[1] <= focuscenterdiscard )
+ {
+ if ( mfocus[2] <= focuscenterdiscard ) mfocus[3] = mfocus[0];
+ else mfocus[3] = 0.5*(mfocus[0]+mfocus[2]);
+ }
+ else if ( mfocus[2] <= focuscenterdiscard )
+ mfocus[3] = 0.5*(mfocus[0]+mfocus[1]);
+ else mfocus[3] = cstep*(mfocus[0]+mfocus[1]+mfocus[2]);
+ if ( cfocus <= focuscenterdiscard ) cfocus = mfocus[3];
+ else if ( (mfocus[3] > focuscenterdiscard) )
+ cfocus = (1.0-focusmix)*cfocus+focusmix*mfocus[3];
+ return cfocus;
+}
+
+float4 PS_Focus( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ if ( dofdisable ) return 0.0;
+ return max(lerp(TexturePrevious.Sample(Sampler0,0.5).x,
+ TextureCurrent.Sample(Sampler0,0.5).x,
+ saturate(DofParameters.w)),0.0);
+}
+
+/* gather blur pass */
+float4 PS_DoFBlur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ if ( dofdisable ) return TextureColor.Sample(Sampler1,coord);
+ float dfc = RenderTargetR32F.Sample(Sampler1,coord).x;
+ if ( dofdebug ) return TextureDepth.Sample(Sampler1,coord).x;
+ if ( dfcdebug ) return dfc;
+ float2 bresl;
+ if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
+ else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 bof = 1.0/bresl;
+ if ( dfc <= dofminblur ) return TextureColor.Sample(Sampler1,coord);
+ float4 res = float4(0,0,0,0);
+ float dep = TextureDepth.Sample(Sampler1,coord).x;
+ float sd, ds, sw, tw = 0;
+ float2 bsz = bof*dofpradius*dfc;
+ float4 sc;
+ [unroll] for ( int i=0; i<32; i++ )
+ {
+ sc = float4(TextureColor.SampleLevel(Sampler1,coord
+ +poisson32[i]*bsz*(1+dofpcha*0.1),dfc*4.0).r,
+ TextureColor.SampleLevel(Sampler1,coord
+ +poisson32[i]*bsz,dfc*4.0).g,
+ TextureColor.SampleLevel(Sampler1,coord
+ +poisson32[i]*bsz*(1-dofpcha*0.1),dfc*4.0).b,
+ TextureColor.SampleLevel(Sampler1,coord
+ +poisson32[i]*bsz,dfc*4.0).a);
+ ds = TextureDepth.SampleLevel(Sampler1,coord+poisson32[i]*bsz,
+ 0).x;
+ sd = RenderTargetR32F.SampleLevel(Sampler1,coord+poisson32[i]
+ *bsz,0).x;
+ sw = (ds>dep)?1.0:sd;
+ tw += sw;
+ res += sc*sw;
+ }
+ res /= tw;
+ return res;
+}
+
+/* "bokeh" blur pass */
+float4 PS_DoFBorkeh( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ if ( dofdisable ) return TextureColor.Sample(Sampler1,coord);
+ float dfc = RenderTargetR32F.Sample(Sampler1,coord).x;
+ if ( dofdebug ) return TextureDepth.Sample(Sampler1,coord).x;
+ if ( dfcdebug ) return dfc;
+ float2 bresl;
+ if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
+ else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 bof = 1.0/bresl;
+ float4 res = TextureColor.Sample(Sampler1,coord);
+ /*
+ Skip blurring areas that are perfectly in focus. The performance
+ gain is negligible in most cases, though.
+ */
+ if ( dfc <= dofminblur ) return res;
+ float dep = TextureDepth.Sample(Sampler1,coord).x;
+ float sr = dofpradius*dfc;
+ float w = max(0,(1/(sr*sr+1))*luminance(res.rgb+0.01));
+ res *= w;
+ float tw = w;
+ float2 bsz = bof*sr;
+ float4 pc;
+ float sc, ds;
+ [unroll] for ( int i=0; i<32; i++ )
+ {
+ pc = float4(TextureColor.SampleLevel(Sampler1,coord
+ +poisson32[i]*bsz*(1+dofpcha*0.1),dfc*4.0).r,
+ TextureColor.SampleLevel(Sampler1,coord
+ +poisson32[i]*bsz,dfc*4.0).g,
+ TextureColor.SampleLevel(Sampler1,coord
+ +poisson32[i]*bsz*(1-dofpcha*0.1),dfc*4.0).b,
+ TextureColor.SampleLevel(Sampler1,coord
+ +poisson32[i]*bsz,dfc*4.0).a);
+ ds = TextureDepth.SampleLevel(Sampler1,coord+poisson32[i]*bsz,
+ 0).x;
+ sc = abs(pc.a*dofpradius);
+ if ( sr < 0.0 ) sc = max(abs(sr),sc);
+ w = (1.0/(pow(sc,2)+1))*luminance(pc.rgb+0.01);
+ w *= saturate(1-smoothstep(sc,sc*1.1,length(poisson32[i]*bsz)
+ *abs(sr)));
+ w *= (ds>dep)?1.0:sc;
+ res += pc*w;
+ tw += w;
+ }
+ res /= tw;
+ return res;
+}
+float4 PS_DoFBorkehB( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ if ( dofdisable ) return TextureColor.Sample(Sampler1,coord);
+ float dfc = RenderTargetR32F.Sample(Sampler1,coord).x;
+ if ( dofdebug ) return TextureDepth.Sample(Sampler1,coord).x;
+ if ( dfcdebug ) return dfc;
+ float2 bresl;
+ if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
+ else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 bof = 1.0/bresl;
+ float2 ofs[16] =
+ {
+ float2(1.0,1.0), float2(-1.0,-1.0),
+ float2(-1.0,1.0), float2(1.0,-1.0),
+
+ float2(1.0,0.0), float2(-1.0,0.0),
+ float2(0.0,1.0), float2(0.0,-1.0),
+
+ float2(1.41,0.0), float2(-1.41,0.0),
+ float2(0.0,1.41), float2(0.0,-1.41),
+
+ float2(1.41,1.41), float2(-1.41,-1.41),
+ float2(-1.41,1.41), float2(1.41,-1.41)
+ };
+ float4 res = TextureColor.Sample(Sampler1,coord);
+ int i;
+ [unroll] for ( i=0; i<16; i++ )
+ res += TextureColor.Sample(Sampler1,coord+ofs[i]*bof*dfc);
+ res /= 17.0;
+ return res;
+}
+
+/* Screen frost shader. Not very realistic either, but looks fine too. */
+float2 ScreenFrost( float2 coord )
+{
+ float2 bresl;
+ if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
+ else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 nc = coord*(bresl/FROSTSIZE)*frostsize;
+ float2 ofs = TextureFrostBump.Sample(Sampler2,nc).xy;
+ ofs = (ofs-0.5)*2.0;
+ ofs *= pow(length(ofs),frostpow)*froststrength;
+ float todpow = todx_ind(frostfactor);
+ if ( !frostalways ) ofs *= weatherfactor(WT_COLD)
+ +(1.0-weatherfactor(WT_HOT))*todpow;
+ else ofs *= todpow;
+ float dist = distance(coord,float2(0.5,0.5))*2.0;
+ ofs *= clamp(pow(dist,frostrpow)*frostrmult+frostrbump,0.0,1.0);
+ return coord+ofs;
+}
+
+/* screen frost overlay */
+float4 PS_FrostPass( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float2 bresl;
+ if ( (fixed.x > 0) && (fixed.y > 0) ) bresl = fixed;
+ else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float4 res;
+ [branch] if ( frostenable )
+ {
+ float2 ofs = ScreenFrost(coord);
+ ofs -= coord;
+ if ( (distcha != 0.0) && (length(ofs) != 0.0) )
+ {
+ float2 ofr, ofg, ofb;
+ ofr = ofs*(1.0-distcha*0.01);
+ ofg = ofs;
+ ofb = ofs*(1.0+distcha*0.01);
+ res = float4(TextureColor.Sample(Sampler1,coord+ofr).r,
+ TextureColor.Sample(Sampler1,coord+ofg).g,
+ TextureColor.Sample(Sampler1,coord+ofb).b,1.0);
+ }
+ else res = TextureColor.Sample(Sampler1,coord+ofs);
+ float2 nc = coord*(bresl/FROSTSIZE)*frostsize;
+ float bmp = pow(max(0,TextureFrost.SampleLevel(Sampler2,nc,
+ 0).x),frostbpow);
+ float dist = distance(coord,float2(0.5,0.5))*2.0;
+ dist = clamp(pow(dist,frostrpow)*frostrmult+frostrbump,0.0,
+ 1.0)*frostblend;
+ float todpow = todx_ind(frostfactor);
+ /* Weathers not implemented in FO4 ENB as of 0.291 */
+ if ( !frostalways ) dist *= weatherfactor(WT_COLD)
+ +(1.0-weatherfactor(WT_HOT))*todpow;
+ else dist *= todpow;
+ res.rgb *= 1.0+bmp*dist;
+ }
+ else res = TextureColor.Sample(Sampler1,coord);
+ if ( !focusdisplay ) return res;
+ if ( distance(coord,focuscenter) < 0.01 ) res.rgb = float3(1,0,0);
+ float cstep = (1.0/3.0);
+ float2 tcoord;
+ float focusradius = tod_ind(focusradius);
+ float2 bof = float2(1.0,1.0/ScreenSize.w)*focusradius*0.01;
+ float fan = focuscircleangle*2.0*pi;
+ tcoord.x = focuscenter.x+sin(fan)*bof.x;
+ tcoord.y = focuscenter.y+cos(fan)*bof.y;
+ if ( distance(coord,tcoord) < 0.01 ) res.rgb = float3(1,0,0);
+ tcoord.x = focuscenter.x+sin(fan+2.0*pi*cstep)*bof.x;
+ tcoord.y = focuscenter.y+cos(fan+2.0*pi*cstep)*bof.y;
+ if ( distance(coord,tcoord) < 0.01 ) res.rgb = float3(1,0,0);
+ tcoord.x = focuscenter.x+sin(fan+4.0*pi*cstep)*bof.x;
+ tcoord.y = focuscenter.y+cos(fan+4.0*pi*cstep)*bof.y;
+ if ( distance(coord,tcoord) < 0.01 ) res.rgb = float3(1,0,0);
+ return res;
+}
+
+technique11 Aperture
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Aperture()));
+ }
+}
+
+technique11 ReadFocus
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_ReadFocus()));
+ }
+}
+
+technique11 Focus
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Focus()));
+ }
+}
+
+technique11 Prepass
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SSAOPre()));
+ }
+}
+technique11 Prepass1
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlurH()));
+ }
+}
+technique11 Prepass2
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlurV()));
+ }
+}
+technique11 Prepass3
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_DoFPrepass()));
+ }
+}
+technique11 Prepass4
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SSAOApply()));
+ }
+}
+technique11 Prepass5
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Edge()));
+ }
+}
+technique11 Prepass6
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Distortion()));
+ }
+}
+technique11 Prepass7
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_DoFBlur()));
+ }
+}
+technique11 Prepass8
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_FrostPass()));
+ }
+}
+
+technique11 PrepassB
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SSAOPre()));
+ }
+}
+technique11 PrepassB1
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlurH()));
+ }
+}
+technique11 PrepassB2
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SSAOBlurV()));
+ }
+}
+technique11 PrepassB3
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_DoFPrepass()));
+ }
+}
+technique11 PrepassB4
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_SSAOApply()));
+ }
+}
+technique11 PrepassB5
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Edge()));
+ }
+}
+technique11 PrepassB6
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Distortion()));
+ }
+}
+technique11 PrepassB7
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_DoFBorkeh()));
+ }
+}
+technique11 PrepassB8
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_DoFBorkehB()));
+ }
+}
+technique11 PrepassB9
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_FrostPass()));
+ }
+}
+
diff --git a/enbseries/enbdepthoffield.fx.ini b/enbseries/enbdepthoffield.fx.ini
new file mode 100644
index 0000000..71009c2
--- /dev/null
+++ b/enbseries/enbdepthoffield.fx.ini
@@ -0,0 +1,192 @@
+[ENBDEPTHOFFIELD.FX]
+TECHNIQUE=1
+Fixed Resolution Width=1920
+Fixed Resolution Height=1080
+Depth Cutoff=999998.0
+Near Z=0.05
+Far Z=3098.0
+Distortion Chromatic Aberration=9.5
+Enable Underwater=false
+Underwater Frequency=2.36, 3.39, 2.72
+Underwater Speed=24.3, 21.9, 26.5
+Underwater Amplitude=0.1, 0.11, 0.07
+Underwater Zoom=0.15
+Always Underwater=false
+Enable Hot Air Refraction=false
+Heat Texture Size=6.4
+Heat Speed=0.45
+Heat Fade Contrast=235.0
+Heat Fade Intensity=1.1
+Heat Fade Offset=-0.59
+Heat Intensity=0.6
+Heat Contrast=0.95
+Heat Time-of-day Contrast=0.5
+Heat Always Enable=true
+Enable Screen Frost=true
+Frost Contrast=1.26
+Frost Strength=0.01
+Frost Radial Contrast=1.69
+Frost Radial Intensity=0.83
+Frost Radial Offset=-0.67
+Frost Texture Blend=1.22
+Frost Texture Blend Contrast=2.42
+Frost Texture Size=0.8
+Frost Indoor Factor=0.0
+Frost Night Factor=0.0
+Frost Always Enable=true
+Enable Focus Triangle=true
+Display Focus Points=false
+Enable Manual Focus=false
+Manual Focus Depth=0.8
+Focus Point Center=0.5, 0.48, 0
+Focus Triangle Angle=0.5
+Focus Triangle Radius Night=9.0
+Focus Triangle Radius Day=12.0
+Focus Triangle Radius Interior=10.5
+Focus Triangle Blending Night=0.6
+Focus Triangle Blending Day=0.7
+Focus Triangle Blending Interior=0.6
+Focus Maximum Depth Night=990.0
+Focus Maximum Depth Day=994.0
+Focus Maximum Depth Interior=988.0
+DOF Intensity Night=280.0
+DOF Intensity Day=250.0
+DOF Intensity Interior=280.0
+DOF Contrast Night=3.0
+DOF Contrast Day=3.7
+DOF Contrast Interior=3.6
+DOF Shift Night=0.0
+DOF Shift Day=0.0
+DOF Shift Interior=0.0
+DOF Fixed Focus Intensity Night=1.0
+DOF Fixed Focus Intensity Day=1.0
+DOF Fixed Focus Intensity Interior=1.0
+DOF Fixed Focus Contrast Night=1.0
+DOF Fixed Focus Contrast Day=1.0
+DOF Fixed Focus Contrast Interior=1.0
+DOF Fixed Focus Shift Night=-0.01
+DOF Fixed Focus Shift Day=-0.01
+DOF Fixed Focus Shift Interior=-0.01
+DOF Fixed Focus Blend Night=1.0
+DOF Fixed Focus Blend Day=1.0
+DOF Fixed Focus Blend Interior=1.0
+DOF Fixed Unfocus Intensity Night=1.2
+DOF Fixed Unfocus Intensity Day=1.4
+DOF Fixed Unfocus Intensity Interior=1.3
+DOF Fixed Unfocus Contrast Night=125.0
+DOF Fixed Unfocus Contrast Day=220.0
+DOF Fixed Unfocus Contrast Interior=165.0
+DOF Fixed Unfocus Shift Night=-0.7
+DOF Fixed Unfocus Shift Day=-0.9
+DOF Fixed Unfocus Shift Interior=-0.8
+DOF Fixed Unfocus Blend Night=1.0
+DOF Fixed Unfocus Blend Day=1.0
+DOF Fixed Unfocus Blend Interior=1.0
+DOF Fixed Use Cutoff=false
+Disable DOF=false
+DOF Gather Blur Radius=8.0
+Debug Depth=false
+Debug Focus=false
+Enable Edgevision=false
+Edgevision Fade Contrast Night=2.0
+Edgevision Fade Contrast Day=2.0
+Edgevision Fade Contrast Interior=2.0
+Edgevision Fade Intensity Night=700.0
+Edgevision Fade Intensity Day=800.0
+Edgevision Fade Intensity Interior=600.0
+Edgevision Contrast=0.25
+Edgevision Intensity=1.0
+Edgevision Radius=1.0
+Enable SSAO=false
+SSAO Radius=0.05
+SSAO Noise=0
+SSAO Fade Contrast Night=0.9
+SSAO Fade Contrast Day=0.8
+SSAO Fade Contrast Interior=0.85
+SSAO Fade Intensity Night=10.5
+SSAO Fade Intensity Day=12.5
+SSAO Fade Intensity Interior=11.5
+SSAO Intensity=3.0
+SSAO Contrast=1.5
+SSAO Blending=0.8
+SSAO Blur=true
+SSAO Bilateral Factor=1500.0
+SSAO Range=20.0
+SSAO Range Min=0.0
+SSAO Blur Radius=1.0
+Debug SSAO=false
+SSAO Use Less Samples=true
+SSAO Blur Use Less Samples=true
+Focus Circle Discard Center Depth=0.01
+Underwater Frequency 1=2.36
+Underwater Frequency 2=3.39
+Underwater Frequency 3=2.72
+Underwater Speed 1=24.309999
+Underwater Speed 2=21.9
+Underwater Speed 3=26.549999
+Underwater Amplitude 1=0.1
+Underwater Amplitude 2=0.11
+Underwater Amplitude 3=0.07
+Focus Point Center X=0.5
+Focus Point Center Y=0.48
+Focus Triangle Radius Interior Night=5.0
+Focus Triangle Radius Interior Day=7.0
+Focus Triangle Blending Interior Night=0.5
+Focus Triangle Blending Interior Day=0.6
+Focus Maximum Depth Interior Night=984.0
+Focus Maximum Depth Interior Day=988.0
+DOF Intensity Interior Night=300.0
+DOF Intensity Interior Day=280.0
+DOF Contrast Interior Night=3.45
+DOF Contrast Interior Day=3.6
+DOF Shift Interior Night=0.0
+DOF Shift Interior Day=0.0
+DOF Fixed Focus Intensity Interior Night=1.0
+DOF Fixed Focus Intensity Interior Day=1.0
+DOF Fixed Focus Contrast Interior Night=1.0
+DOF Fixed Focus Contrast Interior Day=1.0
+DOF Fixed Focus Shift Interior Night=-0.01
+DOF Fixed Focus Shift Interior Day=-0.01
+DOF Fixed Focus Blend Interior Night=1.0
+DOF Fixed Focus Blend Interior Day=1.0
+DOF Fixed Unfocus Intensity Interior Night=1.5
+DOF Fixed Unfocus Intensity Interior Day=1.5
+DOF Fixed Unfocus Contrast Interior Night=230.0
+DOF Fixed Unfocus Contrast Interior Day=250.0
+DOF Fixed Unfocus Shift Interior Night=-0.98
+DOF Fixed Unfocus Shift Interior Day=-1.03
+DOF Fixed Unfocus Blend Interior Night=1.0
+DOF Fixed Unfocus Blend Interior Day=1.0
+Edgevision Fade Contrast Interior Night=2.0
+Edgevision Fade Contrast Interior Day=2.0
+Edgevision Fade Intensity Interior Night=500.0
+Edgevision Fade Intensity Interior Day=600.0
+SSAO Fade Contrast Interior Night=0.75
+SSAO Fade Contrast Interior Day=0.85
+SSAO Fade Intensity Interior Night=12.0
+SSAO Fade Intensity Interior Day=11.5
+Fixed ResolutionX=1920
+Fixed ResolutionY=1080
+DOF Minimum Blur=0.01
+Heat Factor Dawn=0.32
+Heat Factor Sunrise=0.83
+Heat Factor Day=1.06
+Heat Factor Sunset=0.85
+Heat Factor Dusk=0.38
+Heat Factor Night=0.0
+Heat Factor Interior=0.0
+Frost Factor Dawn=0.93
+Frost Factor Sunrise=0.74
+Frost Factor Day=0.62
+Frost Factor Sunset=0.77
+Frost Factor Dusk=0.94
+Frost Factor Night=1.16
+Frost Factor Interior=0.27
+DOF Bilateral Factor=20.0
+DOF Bilateral Radius=1.0
+DOF Blur Radius=6.0
+DOF Blur Chromatic Aberration=1.5
+Focus Plane Horizontal Tilt Center=0.5
+Focus Plane Vertical Tilt Center=0.5
+Focus Plane Horizontal Tilt=0.0
+Focus Plane Vertical Tilt=0.0
diff --git a/enbseries/enbeffect.fx b/enbseries/enbeffect.fx
new file mode 100644
index 0000000..901867f
--- /dev/null
+++ b/enbseries/enbeffect.fx
@@ -0,0 +1,993 @@
+/*
+ enbeffect.fx : MariENB3 base shader.
+ (C)2016-2017 Marisa Kirisame, UnSX Team.
+ Part of MariENB3, the personal ENB of Marisa for Fallout 4.
+ Released under the GNU GPLv3 (or later).
+*/
+#include "menbglobaldefs.fx"
+
+string str_noise = "Film Grain";
+bool ne
+<
+ string UIName = "Enable Grain";
+ string UIWidget = "Checkbox";
+> = {false};
+/* speed of grain */
+float nf
+<
+ string UIName = "Grain Speed";
+ string UIWidget = "Spinner";
+> = {2500.0};
+/* intensity of grain */
+float ni
+<
+ string UIName = "Grain Intensity";
+ string UIWidget = "Spinner";
+> = {0.05};
+/* saturation of grain */
+float ns
+<
+ string UIName = "Grain Saturation";
+ string UIWidget = "Spinner";
+> = {0.0};
+/* use two-pass grain (double the texture fetches, but looks less uniform) */
+bool np
+<
+ string UIName = "Grain Two-Pass";
+ string UIWidget = "Checkbox";
+> = {true};
+/*
+ blending mode for grain:
+ 0 -> normal
+ 1 -> add
+ 2 -> overlay
+ 3 -> "dark mask", a personal invention
+*/
+int nb
+<
+ string UIName = "Grain Blending Mode";
+ string UIWidget = "Spinner";
+ int UIMin = 0;
+ int UIMax = 3;
+> = {1};
+/* dark mask blend mode contrast for mask image */
+float bnp
+<
+ string UIName = "Grain Dark Mask Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.5};
+/* two-pass distortion factor (0 = look just like one-pass grain) */
+float nk
+<
+ string UIName = "Grain Two-Pass Factor";
+ string UIWidget = "Spinner";
+> = {0.04};
+/* zoom factors for each component of each noise texture */
+float3 nm
+<
+ string UIName = "Grain Magnification";
+ string UIWidget = "Vector";
+> = {13.25,19.64,17.35};
+float3 nm1
+<
+ string UIName = "Grain Pass 1 Magnification";
+ string UIWidget = "Vector";
+> = {2.05,3.11,2.22};
+float3 nm2
+<
+ string UIName = "Grain Pass 2 Magnification";
+ string UIWidget = "Vector";
+> = {4.25,0.42,6.29};
+/* contrast of grain */
+float nj
+<
+ string UIName = "Grain Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {2.0};
+bool nbt
+<
+ string UIName = "Apply Grain Before Tone Mapping";
+ string UIWidget = "Checkbox";
+> = {true};
+/* eye adaptation */
+string str_adaptation = "Eye Adaptation";
+bool aenable
+<
+ string UIName = "Enable Adaptation";
+ string UIWidget = "Checkbox";
+> = {false};
+/* tone mapping */
+string str_tonemap = "Filmic Tone Mapping";
+bool tmapenable
+<
+ string UIName = "Enable Tonemapping";
+ string UIWidget = "Checkbox";
+> = {false};
+float unA_n
+<
+ string UIName = "Tonemap Shoulder Strength Night";
+ string UIWidget = "Spinner";
+> = {0.5};
+float unA_d
+<
+ string UIName = "Tonemap Shoulder Strength Day";
+ string UIWidget = "Spinner";
+> = {0.5};
+float unA_i
+<
+ string UIName = "Tonemap Shoulder Strength Interior";
+ string UIWidget = "Spinner";
+> = {0.5};
+float unB_n
+<
+ string UIName = "Tonemap Linear Strength Night";
+ string UIWidget = "Spinner";
+> = {1.0};
+float unB_d
+<
+ string UIName = "Tonemap Linear Strength Day";
+ string UIWidget = "Spinner";
+> = {1.0};
+float unB_i
+<
+ string UIName = "Tonemap Linear Strength Interior";
+ string UIWidget = "Spinner";
+> = {1.0};
+float unC_n
+<
+ string UIName = "Tonemap Linear Angle Night";
+ string UIWidget = "Spinner";
+> = {0.2};
+float unC_d
+<
+ string UIName = "Tonemap Linear Angle Day";
+ string UIWidget = "Spinner";
+> = {0.2};
+float unC_i
+<
+ string UIName = "Tonemap Linear Angle Interior";
+ string UIWidget = "Spinner";
+> = {0.2};
+float unD_n
+<
+ string UIName = "Tonemap Toe Strength Night";
+ string UIWidget = "Spinner";
+> = {0.75};
+float unD_d
+<
+ string UIName = "Tonemap Toe Strength Day";
+ string UIWidget = "Spinner";
+> = {0.75};
+float unD_i
+<
+ string UIName = "Tonemap Toe Strength Interior";
+ string UIWidget = "Spinner";
+> = {0.75};
+float unE_n
+<
+ string UIName = "Tonemap Toe Numerator Night";
+ string UIWidget = "Spinner";
+> = {0.02};
+float unE_d
+<
+ string UIName = "Tonemap Toe Numerator Day";
+ string UIWidget = "Spinner";
+> = {0.02};
+float unE_i
+<
+ string UIName = "Tonemap Toe Numerator Interior";
+ string UIWidget = "Spinner";
+> = {0.02};
+float unF_n
+<
+ string UIName = "Tonemap Toe Denominator Night";
+ string UIWidget = "Spinner";
+> = {0.30};
+float unF_d
+<
+ string UIName = "Tonemap Toe Denominator Day";
+ string UIWidget = "Spinner";
+> = {0.30};
+float unF_i
+<
+ string UIName = "Tonemap Toe Denominator Interior";
+ string UIWidget = "Spinner";
+> = {0.30};
+float unW_n
+<
+ string UIName = "Tonemap Linear White Night";
+ string UIWidget = "Spinner";
+> = {10.0};
+float unW_d
+<
+ string UIName = "Tonemap Linear White Day";
+ string UIWidget = "Spinner";
+> = {10.0};
+float unW_i
+<
+ string UIName = "Tonemap Linear White Interior";
+ string UIWidget = "Spinner";
+> = {10.0};
+/* Color grading */
+string str_grade = "Color Grading Suite";
+bool gradeenable1
+<
+ string UIName = "Enable RGB Grading";
+ string UIWidget = "Checkbox";
+> = {false};
+/* color component multipliers */
+float3 grademul_n
+<
+ string UIName = "Grading Intensity Night";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+float3 grademul_d
+<
+ string UIName = "Grading Intensity Day";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+float3 grademul_i
+<
+ string UIName = "Grading Intensity Interior";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+/* color component contrasts */
+float3 gradepow_n
+<
+ string UIName = "Grading Contrast Night";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+float3 gradepow_d
+<
+ string UIName = "Grading Contrast Day";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+float3 gradepow_i
+<
+ string UIName = "Grading Contrast Interior";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+/* colorization factors */
+bool gradeenable2
+<
+ string UIName = "Enable Vibrance Grading";
+ string UIWidget = "Checkbox";
+> = {false};
+float3 gradecol_n
+<
+ string UIName = "Grading Color Night";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+float3 gradecol_d
+<
+ string UIName = "Grading Color Day";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+float3 gradecol_i
+<
+ string UIName = "Grading Color Interior";
+ string UIWidget = "Vector";
+> = {1.0,1.0,1.0};
+/* blend factor for colorization (negative values are quite fancy) */
+float gradecolfact_n
+<
+ string UIName = "Grading Color Factor Night";
+ string UIWidget = "Spinner";
+> = {0.0};
+float gradecolfact_d
+<
+ string UIName = "Grading Color Factor Day";
+ string UIWidget = "Spinner";
+> = {0.0};
+float gradecolfact_i
+<
+ string UIName = "Grading Color Factor Interior";
+ string UIWidget = "Spinner";
+> = {0.0};
+/* HSV grading */
+bool gradeenable3
+<
+ string UIName = "Enable HSV Grading";
+ string UIWidget = "Checkbox";
+> = {false};
+/* saturation multiplier */
+float gradesatmul_n
+<
+ string UIName = "Grading Saturation Intensity Night";
+ string UIWidget = "Spinner";
+> = {1.0};
+float gradesatmul_d
+<
+ string UIName = "Grading Saturation Intensity Day";
+ string UIWidget = "Spinner";
+> = {1.0};
+float gradesatmul_i
+<
+ string UIName = "Grading Saturation Intensity Interior";
+ string UIWidget = "Spinner";
+> = {1.0};
+/* saturation power */
+float gradesatpow_n
+<
+ string UIName = "Grading Saturation Contrast Night";
+ string UIWidget = "Spinner";
+> = {1.0};
+float gradesatpow_d
+<
+ string UIName = "Grading Saturation Contrast Day";
+ string UIWidget = "Spinner";
+> = {1.0};
+float gradesatpow_i
+<
+ string UIName = "Grading Saturation Contrast Interior";
+ string UIWidget = "Spinner";
+> = {1.0};
+/* value multiplier */
+float gradevalmul_n
+<
+ string UIName = "Grading Value Intensity Night";
+ string UIWidget = "Spinner";
+> = {1.0};
+float gradevalmul_d
+<
+ string UIName = "Grading Value Intensity Day";
+ string UIWidget = "Spinner";
+> = {1.0};
+float gradevalmul_i
+<
+ string UIName = "Grading Value Intensity Interior";
+ string UIWidget = "Spinner";
+> = {1.0};
+/* value power */
+float gradevalpow_n
+<
+ string UIName = "Grading Value Contrast Night";
+ string UIWidget = "Spinner";
+> = {1.0};
+float gradevalpow_d
+<
+ string UIName = "Grading Value Contrast Day";
+ string UIWidget = "Spinner";
+> = {1.0};
+float gradevalpow_i
+<
+ string UIName = "Grading Value Contrast Interior";
+ string UIWidget = "Spinner";
+> = {1.0};
+bool colorizeafterhsv
+<
+ string UIName = "Colorize After HSV";
+ string UIWidget = "Checkbox";
+> = {true};
+/* LUT grading */
+string str_lut = "RGB Lookup Table Grading";
+bool lutenable
+<
+ string UIName = "Enable LUT Grading";
+ string UIWidget = "Checkbox";
+> = {false};
+float lutblend_n
+<
+ string UIName = "LUT Blend Night";
+ string UIWidget = "Spinner";
+> = {1.0};
+float lutblend_d
+<
+ string UIName = "LUT Blend Day";
+ string UIWidget = "Spinner";
+> = {1.0};
+float lutblend_i
+<
+ string UIName = "LUT Blend Interior";
+ string UIWidget = "Spinner";
+> = {1.0};
+#ifdef LUTMODE_LEGACY
+int clut
+<
+ string UIName = "LUT Preset";
+ string UIWidget = "Spinner";
+ int UIMin = 0;
+ int UIMax = 63;
+> = {1};
+#endif
+/* technicolor shader */
+string str_tech = "Technicolor";
+bool techenable
+<
+ string UIName = "Enable Technicolor";
+ string UIWidget = "Checkbox";
+> = {false};
+float techblend
+<
+ string UIName = "Technicolor Blend";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {1.0};
+/* vanilla */
+string str_vanilla = "Vanilla Processing";
+bool vtmapenable
+<
+ string UIName = "Enable Vanilla Tone Mapping";
+ string UIWidget = "Checkbox";
+> = {false};
+bool vgradeenable
+<
+ string UIName = "Enable Vanilla Imagespace";
+ string UIWidget = "Checkbox";
+> = {true};
+string str_dither = "Dithering";
+bool dodither
+<
+ string UIName = "Enable Post Dither";
+ string UIWidget = "Checkbox";
+> = {true};
+int dither
+<
+ string UIName = "Dither Pattern";
+ string UIWidget = "Spinner";
+ int UIMin = 0;
+ int UIMax = 4;
+> = {4};
+string str_bloom = "Bloom Settings";
+bool bloomlighten
+<
+ string UIName = "Use Lighten Blend";
+ string UIWidget = "Checkbox";
+> = {false};
+string str_debug = "Debugging";
+bool bloomdebug
+<
+ string UIName = "Display Bloom";
+ string UIWidget = "Checkbox";
+> = {false};
+bool adaptdebug
+<
+ string UIName = "Display Adaptation";
+ string UIWidget = "Checkbox";
+> = {false};
+
+/*
+ dithering threshold maps
+ don't touch unless you know what you're doing
+*/
+static const float checkers[4] =
+{
+ 1.0,0.0,
+ 0.0,1.0
+};
+#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
+
+float4 Timer;
+float4 ScreenSize;
+float ENightDayFactor;
+float EInteriorFactor;
+float4 TimeOfDay1;
+float4 TimeOfDay2;
+
+#ifdef SKYRIMSE
+float4 Params01[7];
+#else
+float4 Params01[6];
+#endif
+float4 ENBParams01;
+Texture2D TextureColor;
+Texture2D TextureBloom;
+Texture2D TextureAdaptation;
+
+Texture2D TextureNoise2
+<
+ string ResourceName = "menbnoise1.png";
+>;
+Texture2D TextureNoise3
+<
+ string ResourceName = "menbnoise2.png";
+>;
+Texture2D TextureLUT
+<
+#ifdef LUTMODE_LEGACY
+ string ResourceName = "menblutpreset.png";
+#endif
+#ifdef LUTMODE_16
+ string ResourceName = "menblut16.png";
+#endif
+#ifdef LUTMODE_64
+ string ResourceName = "menblut64.png";
+#endif
+>;
+
+SamplerState Sampler0
+{
+ Filter = MIN_MAG_MIP_POINT;
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+SamplerState Sampler1
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+SamplerState SamplerLUT
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Wrap;
+ AddressV = Wrap;
+ MaxLOD = 0;
+ MinLOD = 0;
+};
+SamplerState SamplerNoise2
+{
+ Filter = MIN_LINEAR_MAG_MIP_POINT;
+ AddressU = Wrap;
+ AddressV = Wrap;
+ MaxLOD = 0;
+ MinLOD = 0;
+};
+SamplerState SamplerNoise3
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Wrap;
+ AddressV = Wrap;
+ MaxLOD = 0;
+ MinLOD = 0;
+};
+
+struct VS_INPUT_POST
+{
+ float3 pos : POSITION;
+ float2 txcoord : TEXCOORD0;
+};
+struct VS_OUTPUT_POST
+{
+ float4 pos : SV_POSITION;
+ float2 txcoord0 : TEXCOORD0;
+};
+
+VS_OUTPUT_POST VS_Draw( VS_INPUT_POST IN )
+{
+ VS_OUTPUT_POST OUT;
+ OUT.pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
+ OUT.txcoord0.xy = IN.txcoord.xy;
+ return OUT;
+}
+
+/* helper functions */
+/* photometric */
+#define luminance(x) dot(x,float3(0.2126,0.7152,0.0722))
+/* CCIR601 */
+//#define luminance(x) dot(x,float3(0.299,0.587,0.114))
+/* overlay blend */
+#define overlay(a,b) (a<0.5)?(2.0*a*b):(1.0-(2.0*(1.0-a)*(1.0-b)))
+/* "dark mask" blending is something I came up with and can't really explain */
+#define darkmask(a,b) (a>0.5)?(2.0*a*(0.5+b)):(1.0-2.0*(1.0-a)*(1.0-((0.5+b))))
+float3 rgb2hsv( float3 c )
+{
+ float4 K = float4(0.0,-1.0/3.0,2.0/3.0,-1.0);
+ float4 p = (c.g 0.5 ) r1.xy = IN.txcoord0.xy;
+ r1.xyz = TextureBloom.Sample(Sampler1,r1.xy).xyz;
+ r2.xy = TextureAdaptation.Sample(Sampler1,IN.txcoord0.xy).xy;
+ r0.w = dot(float3(0.2125,0.7154,0.0721),r0.xyz);
+ r0.w = max(r0.w,0.00001);
+ r1.w = r2.y/r2.x;
+ r2.y = r0.w*r1.w;
+ if ( Params01[2].z >= 0.5 ) r2.z = 0xffffffff;
+ else r2.z = 0;
+ r3.xy = r1.w*r0.w+float2(-0.004,1.0);
+ r1.w = max(r3.x, 0.0);
+ r3.xz = r1.w*6.2+float2(0.5,1.7);
+ r2.w = r1.w*r3.x;
+ r1.w = r1.w*r3.z+0.06;
+ r1.w = r2.w/r1.w;
+ r1.w = pow(r1.w,2.2);
+ r1.w = r1.w*Params01[2].y;
+ r2.w = r2.y*Params01[2].y+1.0;
+ r2.y = r2.w*r2.y;
+ r2.y = r2.y/r3.y;
+ if (r2.z == 0) r1.w = r2.y;
+ else r1.w = r1.w;
+ r0.w = r1.w/r0.w;
+ r1.w = saturate(Params01[2].x-r1.w);
+ r1.xyz = r1*r1.w;
+ r0.xyz = r0*r0.w+r1;
+ r1.x = dot(r0.xyz,float3(0.2125,0.7154,0.0721));
+ r0.w = 1.0;
+ r0 = r0-r1.x;
+ r0 = Params01[3].x*r0+r1.x;
+ r1 = Params01[4]*r1.x-r0;
+ r0 = Params01[4].w*r1+r0;
+ r0 = Params01[3].w*r0-r2.x;
+ r0 = Params01[3].z*r0+r2.x;
+ r0.xyz = saturate(r0);
+ r1.xyz = pow(r1.xyz,Params01[6].w);
+ r1 = Params01[5]-r0;
+ res = Params01[5].w*r1+r0;
+#else
+ r0.xyz = color.xyz;
+ r1.xy = Params01[4].zw*IN.txcoord0.xy;
+ r1.xyz = TextureBloom.Sample(Sampler1,r1.xy).xyz;
+ r0.w = TextureAdaptation.Sample(Sampler0,IN.txcoord0.xy).x;
+ r1.w = Params01[1].z/(0.001+r0.w);
+ r2.x = r1.w
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
+ SetPixelShader(CompileShader(ps_5_0, PS_Draw()));
+ }
+}
+
+technique11 ORIGINALPOSTPROCESS
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
+ SetPixelShader(CompileShader(ps_5_0, PS_DrawOriginal()));
+ }
+}
diff --git a/enbseries/enbeffect.fx.ini b/enbseries/enbeffect.fx.ini
new file mode 100644
index 0000000..9e917fe
--- /dev/null
+++ b/enbseries/enbeffect.fx.ini
@@ -0,0 +1,150 @@
+[ENBEFFECT.FX]
+TECHNIQUE=1
+Enable Grain=true
+Grain Speed=25.0
+Grain Intensity=1.34
+Grain Saturation=-0.64
+Grain Two-Pass=true
+Grain Blending Mode=3
+Grain Dark Mask Contrast=24.369999
+Grain Two-Pass Factor=0.04
+Grain Magnification=13.3, 19.6, 17.4
+Grain Pass 1 Magnification=2.05, 3.11, 2.22
+Grain Pass 2 Magnification=4.25, 0.42, 6.29
+Grain Contrast=4.27
+Enable Tonemapping=true
+Tonemap Shoulder Strength Night=0.89
+Tonemap Shoulder Strength Day=0.94
+Tonemap Shoulder Strength Interior=0.9
+Tonemap Linear Strength Night=0.59
+Tonemap Linear Strength Day=0.46
+Tonemap Linear Strength Interior=0.5
+Tonemap Linear Angle Night=0.25
+Tonemap Linear Angle Day=0.41
+Tonemap Linear Angle Interior=0.35
+Tonemap Toe Strength Night=2.43
+Tonemap Toe Strength Day=2.59
+Tonemap Toe Strength Interior=2.51
+Tonemap Toe Numerator Night=3.79
+Tonemap Toe Numerator Day=3.92
+Tonemap Toe Numerator Interior=3.81
+Tonemap Toe Denominator Night=1.52
+Tonemap Toe Denominator Day=1.41
+Tonemap Toe Denominator Interior=1.45
+Tonemap Linear White Night=1.17
+Tonemap Linear White Day=1.23
+Tonemap Linear White Interior=1.189999
+Enable RGB Grading=true
+Grading Intensity Night=0.97, 1.01, 1
+Grading Intensity Day=0.97, 1.01, 1
+Grading Intensity Interior=0.98, 0.92, 1.02
+Grading Contrast Night=0.98, 0.95, 0.94
+Grading Contrast Day=0.97, 1.02, 0.91
+Grading Contrast Interior=0.98, 0.92, 0.93
+Enable Vibrance Grading=true
+Grading Color Night=-0.44, -0.18, -1.02
+Grading Color Day=0.23, 0.24, -0.92
+Grading Color Interior=-0.2, -0.42, -0.63
+Grading Color Factor Night=-0.2
+Grading Color Factor Day=-0.14
+Grading Color Factor Interior=-0.18
+Enable HSV Grading=true
+Grading Saturation Intensity Night=1.13
+Grading Saturation Intensity Day=1.07
+Grading Saturation Intensity Interior=1.09
+Grading Saturation Contrast Night=1.28
+Grading Saturation Contrast Day=1.13
+Grading Saturation Contrast Interior=1.17
+Grading Value Intensity Night=1.02
+Grading Value Intensity Day=1.04
+Grading Value Intensity Interior=1.03
+Grading Value Contrast Night=1.33
+Grading Value Contrast Day=1.25
+Grading Value Contrast Interior=1.29
+Colorize After HSV=true
+Enable LUT Grading=true
+LUT Blend Night=0.3
+LUT Blend Day=0.35
+LUT Blend Interior=0.32
+Enable Post Dither=false
+Dither Pattern=4
+Display Bloom=false
+Grain Magnification 1=13.25
+Grain Magnification 2=19.639999
+Grain Magnification 3=17.35
+Grain Pass 1 Magnification 1=2.05
+Grain Pass 1 Magnification 2=3.11
+Grain Pass 1 Magnification 3=2.22
+Grain Pass 2 Magnification 1=4.25
+Grain Pass 2 Magnification 2=0.42
+Grain Pass 2 Magnification 3=6.29
+Tonemap Shoulder Strength Interior Night=1.13
+Tonemap Shoulder Strength Interior Day=1.14
+Tonemap Linear Strength Interior Night=0.88
+Tonemap Linear Strength Interior Day=0.92
+Tonemap Linear Angle Interior Night=0.68
+Tonemap Linear Angle Interior Day=0.58
+Tonemap Toe Strength Interior Night=0.79
+Tonemap Toe Strength Interior Day=0.69
+Tonemap Toe Numerator Interior Night=2.5
+Tonemap Toe Numerator Interior Day=2.72
+Tonemap Toe Denominator Interior Night=1.25
+Tonemap Toe Denominator Interior Day=1.07
+Tonemap Linear White Interior Night=1.33
+Tonemap Linear White Interior Day=1.37
+Grading Intensity Night Red=1.04
+Grading Intensity Night Green=1.08
+Grading Intensity Night Blue=1.07
+Grading Intensity Day Red=1.11
+Grading Intensity Day Green=1.08
+Grading Intensity Day Blue=1.04
+Grading Intensity Interior Night Red=1.07
+Grading Intensity Interior Night Green=1.03
+Grading Intensity Interior Night Blue=1.01
+Grading Intensity Interior Day Red=1.1
+Grading Intensity Interior Day Green=1.05
+Grading Intensity Interior Day Blue=1.02
+Grading Contrast Night Red=0.97
+Grading Contrast Night Green=0.94
+Grading Contrast Night Blue=0.96
+Grading Contrast Day Red=0.94
+Grading Contrast Day Green=0.99
+Grading Contrast Day Blue=0.98
+Grading Contrast Interior Night Red=0.96
+Grading Contrast Interior Night Green=0.98
+Grading Contrast Interior Night Blue=0.95
+Grading Contrast Interior Day Red=0.94
+Grading Contrast Interior Day Green=0.96
+Grading Contrast Interior Day Blue=0.99
+Grading Color Night Red=-0.91
+Grading Color Night Green=-0.62
+Grading Color Night Blue=-0.94
+Grading Color Day Red=-0.48
+Grading Color Day Green=-0.11
+Grading Color Day Blue=-0.65
+Grading Color Interior Night Red=-0.28
+Grading Color Interior Night Green=-0.12
+Grading Color Interior Night Blue=-0.06
+Grading Color Interior Day Red=-0.47
+Grading Color Interior Day Green=-0.12
+Grading Color Interior Day Blue=-0.14
+Grading Color Factor Interior Night=-0.11
+Grading Color Factor Interior Day=-0.09
+Grading Saturation Intensity Interior Night=1.43
+Grading Saturation Intensity Interior Day=1.46
+Grading Saturation Contrast Interior Night=1.19
+Grading Saturation Contrast Interior Day=1.1
+Grading Value Intensity Interior Night=1.03
+Grading Value Intensity Interior Day=1.09
+Grading Value Contrast Interior Night=1.42
+Grading Value Contrast Interior Day=1.62
+LUT Blend Interior Night=0.39
+LUT Blend Interior Day=0.45
+Display Adaptation=false
+Enable Technicolor=true
+Technicolor Blend=1.0
+Apply Grain Before Tone Mapping=true
+Enable Adaptation=true
+Enable Vanilla Tone Mapping=true
+Enable Vanilla Imagespace=true
+Use Lighten Blend=false
diff --git a/enbseries/enbeffectpostpass.fx b/enbseries/enbeffectpostpass.fx
new file mode 100644
index 0000000..5133063
--- /dev/null
+++ b/enbseries/enbeffectpostpass.fx
@@ -0,0 +1,1062 @@
+/*
+ enbeffectpostpass.fx : MariENB3 extra shader.
+ (C)2016-2017 Marisa Kirisame, UnSX Team.
+ Part of MariENB3, the personal ENB of Marisa for Fallout 4.
+ Released under the GNU GPLv3 (or later).
+*/
+#include "menbglobaldefs.fx"
+
+/* BlockGFX filter, I'm proud of it */
+string str_block = "BlockGFX Suite";
+bool useblock
+<
+ string UIName = "Enable Block GFX";
+ string UIWidget = "Checkbox";
+> = {false};
+/*
+ emulated resolution:
+ 0 or 1 : real resolution
+ <1 and >0 : multiple of real resolution (e.g.: 0.5 is half resolution)
+ >1 : this resolution (e.g.: 320x200 is good ol' Mode 13h)
+*/
+float2 bres
+<
+ string UIName = "Emulated Resolution";
+ string UIWidget = "Vector";
+ float2 UIMin = {0.0,0.0};
+> = {0.5,0.5};
+/* zooming factors (<=0 for stretch) */
+float2 sres
+<
+ string UIName = "Zoom Factor";
+ string UIWidget = "Vector";
+ float2 UIMin = {0.0,0.0};
+> = {0.0,0.0};
+/*
+ palette type:
+ -2 : Standard VGA 256-color palette
+ -1 : disable
+ 0 : CGA (320x200 4-color, or 640x200 monochrome)
+ 1 : EGA (320x200, 16 colors)
+ 2 : RGB2 (64-color quarter VGA palette, used in AOS)
+ 3 : RGB323 (8-bit RGB, I don't think this was a real thing)
+ 4 : VGA (256 colors, standard palette)
+ 5 : Doom (256 colors, does not cover a lot)
+ 6 : Quake I (256 colors, covers even less)
+ 7 : RGB4 (4bpc, I also don't think this was ever used in real hardware)
+ 8 : RGB565 (ol' 16-bit "true color")
+ 9 : RGB6 (typical screens incapable of 8bpc)
+*/
+int paltype
+<
+ string UIName = "Palette Type";
+ string UIWidget = "Spinner";
+ int UIMin = -1;
+ int UIMax = 9;
+> = {1};
+/*
+ CGA palette to use:
+ 0 : black, white.
+ 1 : black, cyan, magenta, white. low contrast
+ 2 : black, cyan, magenta, white. high contrast
+ 3 : black, green, red, brown. low contrast
+ 4 : black, green, red, brown. high contrast
+ 5 : black, cyan, red, white. low contrast
+ 6 : black, cyan, red, white. high contrast
+*/
+int cgapal
+<
+ string UIName = "CGA Palette";
+ string UIWidget = "Spinner";
+ int UIMin = 0;
+ int UIMax = 6;
+> = {1};
+/*
+ EGA palette to use:
+ 0 : Standard EGA
+ 1 : AOS EGA (it's designed for text, but looks well on images too)
+*/
+int egapal
+<
+ string UIName = "EGA Palette";
+ string UIWidget = "Spinner";
+ int UIMin = 0;
+ int UIMax = 1;
+> = {0};
+/*
+ Dithering mode:
+ -1 : No dithering, just raw banding
+ 0 : 2x2 checkerboard dithering, looks like ass
+ 1 : 2x2 ordered dithering
+ 2 : 3x3 ordered dithering
+ 3 : 4x4 ordered dithering
+ 4 : 8x8 ordered dithering
+*/
+int dither
+<
+ string UIName = "Dithering Pattern";
+ string UIWidget = "Spinner";
+ int UIMin = -1;
+ int UIMax = 4;
+> = {4};
+/* gamma modifier for base color, lower values raise midtones and viceversa */
+float bgamma
+<
+ string UIName = "Contrast Modifier";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.35};
+/* saturation modifier for base color, helps with limited palettes */
+float bsaturation
+<
+ string UIName = "Saturation Modifier";
+ string UIWidget = "Spinner";
+> = {1.1};
+/* base brightness bump for the dither grid */
+float bdbump
+<
+ string UIName = "Dither Offset";
+ string UIWidget = "Spinner";
+> = {-0.1};
+/* range multiplier for the dither grid */
+float bdmult
+<
+ string UIName = "Dither Range";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.25};
+/* ASCII art filter */
+string str_ascii = "Luma ASCII Art Filter";
+bool asciienable
+<
+ string UIName = "Enable ASCII";
+ string UIWidget = "Checkbox";
+> = {false};
+bool asciimono
+<
+ string UIName = "ASCII Monochrome";
+ string UIWidget = "Checkbox";
+> = {true};
+float asciiblend
+<
+ string UIName = "ASCII Blend";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.0};
+string str_mask = "Depth Chroma Key";
+bool maskenable
+<
+ string UIName = "Enable Chroma Key";
+ string UIWidget = "Checkbox";
+> = {false};
+float3 mask
+<
+ string UIName = "Chroma Key Red";
+ string UIWidget = "Color";
+> = {0.0,1.0,0.0};
+float maskd
+<
+ string UIName = "Chroma Key Depth";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.5};
+string str_dot = "RGBI Dot Matrix";
+bool dotenable
+<
+ string UIName = "Enable Dot Matrix";
+ string UIWidget = "Checkbox";
+> = {false};
+int dotsize
+<
+ string UIName = "Dot Size";
+ string UIWidget = "Spinner";
+ int UIMin = 1;
+> = {1};
+float dotblend
+<
+ string UIName = "Dot Blend";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+ float UIMax = 1.0;
+> = {0.4};
+float dotmult
+<
+ string UIName = "Dot Intensity";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float dotpow
+<
+ string UIName = "Dot Contrast";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+string str_curve = "Lens Curvature";
+bool curveenable
+<
+ string UIName = "Enable Curvature";
+ string UIWidget = "Checkbox";
+> = {false};
+float chromaab
+<
+ string UIName = "Curve Chromatic Aberration";
+ string UIWidget = "Spinner";
+> = {0.0};
+float lenszoom
+<
+ string UIName = "Curve Zooming";
+ string UIWidget = "Spinner";
+> = {50.0};
+float lensdist
+<
+ string UIName = "Curve Distortion";
+ string UIWidget = "Spinner";
+> = {0.0};
+float curvesoft
+<
+ string UIName = "Curve Sampling Soften";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.0};
+/* BlurSharpShift, some people are obsessed with this nonsense */
+string str_bss = "BlurSharpShift";
+bool bssblurenable
+<
+ string UIName = "Enable Blur";
+ string UIWidget = "Checkbox";
+> = {false};
+float bssblurradius
+<
+ string UIName = "Blur Sampling Range";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.25};
+bool bsssharpenable
+<
+ string UIName = "Enable Sharp";
+ string UIWidget = "Checkbox";
+> = {false};
+float bsssharpradius
+<
+ string UIName = "Sharp Sampling Range";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.0};
+float bsssharpamount
+<
+ string UIName = "Sharpening Amount";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {6.0};
+bool bssshiftenable
+<
+ string UIName = "Enable Shift";
+ string UIWidget = "Checkbox";
+> = {false};
+float bssshiftradius
+<
+ string UIName = "Shift Sampling Range";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.75};
+/* luma sharpen because of reasons */
+string str_lsharp = "Luma Sharpen";
+bool lsharpenable
+<
+ string UIName = "Luma Sharpen Enable";
+ string UIWidget = "Checkbox";
+> = {false};
+float lsharpradius
+<
+ string UIName = "Luma Sharpen Radius";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.8};
+float lsharpclamp
+<
+ string UIName = "Luma Sharpen Clamp";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {0.02};
+float lsharpblend
+<
+ string UIName = "Luma Sharpen Blending";
+ string UIWidget = "Spinner";
+ float UIMin = 0.0;
+> = {1.2};
+
+/*
+ dithering threshold maps
+ don't touch unless you know what you're doing
+*/
+static const float checkers[4] =
+{
+ 1.0,0.0,
+ 0.0,1.0
+};
+#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
+/* gauss stuff */
+float gauss3[3] =
+{
+ 0.444814, 0.239936, 0.037657
+};
+
+float4 ScreenSize;
+Texture2D TextureOriginal;
+Texture2D TextureColor;
+Texture2D TextureDepth;
+Texture2D TextureFont
+<
+ string ResourceName = "menbvgaluma.png";
+>;
+Texture2D TextureDots
+<
+ string ResourceName = "menbdots.png";
+>;
+Texture2D TextureDoom
+<
+ string ResourceName = "menbdoomlut.png";
+>;
+Texture2D TextureQuake
+<
+ string ResourceName = "menbquakelut.png";
+>;
+Texture2D TextureVGA
+<
+ string ResourceName = "menbvgalut.png";
+>;
+
+SamplerState Sampler
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+SamplerState SamplerB
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Border;
+ AddressV = Border;
+};
+SamplerState SamplerFont
+{
+ Filter = MIN_LINEAR_MAG_MIP_POINT;
+ AddressU = Wrap;
+ AddressV = Wrap;
+ MaxLOD = 0;
+ MinLOD = 0;
+};
+SamplerState SamplerDots
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Wrap;
+ AddressV = Wrap;
+ MaxLOD = 0;
+ MinLOD = 0;
+};
+SamplerState SamplerLUT
+{
+ Filter = MIN_MAG_MIP_POINT;
+ AddressU = Clamp;
+ AddressV = Clamp;
+ MaxLOD = 0;
+ MinLOD = 0;
+};
+
+struct VS_INPUT_POST
+{
+ float3 pos : POSITION;
+ float2 txcoord : TEXCOORD0;
+};
+struct VS_OUTPUT_POST
+{
+ float4 pos : SV_POSITION;
+ float2 txcoord : TEXCOORD0;
+};
+
+VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN)
+{
+ VS_OUTPUT_POST OUT;
+ OUT.pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
+ OUT.txcoord.xy = IN.txcoord.xy;
+ return OUT;
+}
+
+/* helpers */
+/* photometric */
+#define luminance(x) dot(x,float3(0.2126,0.7152,0.0722))
+/* CCIR601 */
+//#define luminance(x) dot(x,float3(0.299,0.587,0.114))
+float3 rgb2hsv( float3 c )
+{
+ float4 K = float4(0.0,-1.0/3.0,2.0/3.0,-1.0);
+ float4 p = (c.g0.5);
+ }
+ float dist = 2.0;
+ int idx = 0;
+ if ( cgapal == 1 )
+ {
+ [unroll] 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 )
+ {
+ [unroll] 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 )
+ {
+ [unroll] 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 )
+ {
+ [unroll] 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 )
+ {
+ [unroll] 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 )
+ {
+ [unroll] 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;
+}
+/*
+ EGA technically only had the 320x200 16-colour graphic mode, but when VGA
+ came out, it was possible to tweak the DAC, allowing for custom palettes.
+ AOS EGA is a palette based on my terminal colour scheme on Linux, which I
+ also use for AliceOS.
+*/
+float4 ReduceEGA( in float4 color, in float2 coord )
+{
+ float4 dac = ReducePrepass(color,coord);
+ float dist = 2.0;
+ int idx = 0;
+ if ( egapal == 0 )
+ {
+ [unroll] 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
+ {
+ [unroll] 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;
+}
+/* A two bits per channel mode that can usually fit VGA mode 13h and mode x */
+float4 ReduceRGB2( in float4 color, in float2 coord )
+{
+ float4 dac = ReducePrepass(color,coord);
+ color.rgb = trunc(dac.rgb*4.0)/4.0;
+ return color;
+}
+/* Effectively has 256 colours, with a magenta tint due to precision loss */
+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;
+}
+/* 4096 colours, no actual graphics hardware existed that used 4bpc, though */
+float4 ReduceRGB4( in float4 color, in float2 coord )
+{
+ float4 dac = ReducePrepass(color,coord);
+ color.rgb = trunc(dac.rgb*16.0)/16.0;
+ return color;
+}
+/*
+ The classic 16-bit colour mode everyone from my generation would remember,
+ especially that subtle green tint and the banding due to lack of dithering
+ in most games and GPUs at that time.
+*/
+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;
+}
+/*
+ If you see no difference when using this, then it could be because your
+ own screen is already 6bpc. This is the case for a lot of LCDs, both old
+ and modern. 8bpc tends to be the norm on IPS, though. 10bpc is the next
+ step, but for now it's only used internally in video codecs for more
+ efficient compression with lower quality loss. I seem to recall that in
+ most *nix systems such as Linux it's possible to have 10bpc already with
+ NVIDIA, but it causes compatibility issues with a lot of programs.
+*/
+float4 ReduceRGB6( in float4 color, in float2 coord )
+{
+ float4 dac = ReducePrepass(color,coord);
+ color.rgb = trunc(dac.rgb*64.0)/64.0;
+ return color;
+}
+/* Various VGA 256-colour palettes: Doom, Quake I, and the standard. */
+float4 ReduceDoom( in float4 color, in float2 coord )
+{
+ float4 dac = clamp(ReducePrepass(color,coord)+0.005,0.005,0.995);
+ float2 lc = float2(dac.r,dac.g/64.0+floor(dac.b*64.0)/64.0);
+ return TextureDoom.Sample(SamplerLUT,lc);
+}
+float4 ReduceQuake( in float4 color, in float2 coord )
+{
+ float4 dac = clamp(ReducePrepass(color,coord)+0.005,0.005,0.995);
+ float2 lc = float2(dac.r,dac.g/64.0+floor(dac.b*64.0)/64.0);
+ return TextureQuake.Sample(SamplerLUT,lc);
+}
+float4 ReduceVGA( in float4 color, in float2 coord )
+{
+ float4 dac = clamp(ReducePrepass(color,coord)+0.005,0.005,0.995);
+ float2 lc = float2(dac.r,dac.g/64.0+floor(dac.b*64.0)/64.0);
+ return TextureVGA.Sample(SamplerLUT,lc);
+}
+
+/* Retro rockets */
+float4 PS_Retro( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !useblock ) return res;
+ float2 rresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float4 tcol;
+ float2 bresl = rresl;
+ if ( bres.x <= 0 || bres.y <= 0 ) bresl = rresl;
+ else
+ {
+ if ( bres.x <= 1.0 ) bresl.x = rresl.x*bres.x;
+ else bresl.x = bres.x;
+ if ( bres.y <= 1.0 ) bresl.y = rresl.y*bres.y;
+ else bresl.y = bres.y;
+ }
+ float2 sresl = sres;
+ if ( sres.x <= 0 ) sresl.x = rresl.x/bresl.x;
+ if ( sres.y <= 0 ) sresl.y = rresl.y/bresl.y;
+ float2 ncoord = coord*(rresl/bresl);
+ ncoord = (-0.5/sresl)*(rresl/bresl)+ncoord/sresl+0.5;
+ ncoord = floor(ncoord*bresl)/bresl;
+ if ( bres.x <= 0 || bres.y <= 0 ) ncoord = coord;
+ tcol = TextureOriginal.Sample(Sampler,ncoord);
+ if ( paltype == 0 ) res = ReduceCGA(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 1 ) res = ReduceEGA(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 2 ) res = ReduceRGB2(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 3 ) res = ReduceRGB323(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 4 ) res = ReduceVGA(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 5 ) res = ReduceDoom(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 6 ) res = ReduceQuake(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 7 ) res = ReduceRGB4(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 8 ) res = ReduceRGB565(tcol,(coord*rresl)/sresl);
+ else if ( paltype == 9 ) res = ReduceRGB6(tcol,(coord*rresl)/sresl);
+ else res = tcol;
+ if ( ncoord.x < 0 || ncoord.x >= 1 || ncoord.y < 0 || ncoord.y >= 1 )
+ res *= 0;
+ res.a = 1.0;
+ return res;
+}
+
+/* ASCII art (more like CP437 art) */
+float4 PS_ASCII( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !asciienable ) return res;
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 fresl = float2(FONT_WIDTH,FONT_HEIGHT);
+ float2 cresl = float2(GLYPH_WIDTH,GLYPH_HEIGHT);
+ float2 bscl = floor(bresl/cresl);
+ /*
+ Here I use the "cheap" method, based on the overall luminance of each
+ glyph, rather than attempt to search for the best fitting glyph for
+ each cell. If you want to know why, take a look at the ASCII filter
+ bundled with the Dolphin emulator, and be prepared for the resulting
+ seconds per frame it runs at. The calculations needed for such a filter
+ are completely insane even for the highest-end GPUs.
+ */
+ float3 col = TextureOriginal.Sample(Sampler,floor(bscl*coord)/bscl).rgb;
+ int lum = clamp(luminance(col)*FONT_LEVELS,0,FONT_LEVELS);
+ float2 itx = floor(coord*bresl);
+ float2 blk = floor(itx/cresl)*cresl;
+ float2 ofs = itx-blk;
+ ofs.y += lum*cresl.y;
+ ofs /= fresl;
+ float gch = TextureFont.Sample(SamplerFont,ofs).x;
+ if ( gch < 0.5 ) res.rgb = res.rgb*asciiblend;
+ else
+ {
+ if ( asciimono ) res.rgb = 1.0;
+ else res.rgb = col;
+ }
+ return res;
+}
+
+float4 PS_ChromaKey( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !maskenable ) return res;
+ if ( TextureDepth.Sample(Sampler,coord).x > maskd )
+ return float4(mask.r,mask.g,mask.b,1.0);
+ return res;
+}
+
+/* 2x2 RGBI dot matrix, not even close to anything that exists IRL but meh */
+float4 PS_DotMatrix( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !dotenable ) return res;
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ bresl.xy *= 1.0/(dotsize*2.0);
+ float4 dac = float4(res.r*0.5,res.g*0.5,res.b*0.5,
+ (res.r+res.g+res.b)/6.0);
+ /*
+ There are two types of CRTs: aperture grille and shadow mask.
+ The former is blurry and has scanlines (rather big ones, even), but
+ is cheap to emulate; while the latter is the one most known for its
+ crisp, square pixels with minimal distortion. Most individuals into
+ this whole "retro graphics" stuff prefer aperture grille, which
+ looks like shit, then again, that's the sort of visual quality they
+ want. The main issue with shadow mask CRTs is that it's impossible
+ to accurately emulate them unless done on a screen with a HUGE
+ resolution. After all, the subpixels need to be clearly visible, and
+ if on top of it you add curvature distortion, you need to reduce
+ moire patterns that will inevitably show up at low resolutions.
+
+ It would be more desirable to eventually have flat panels that can
+ display arbitrary resolutions using a form of scaling that preserves
+ square pixels with unnoticeable distortion (typically, with nearest
+ neighbour you'd get some pixels that are bigger/smaller than others
+ if the upscale resolution isn't an integer multiple of the real
+ resolution.
+
+ This 2x2 RGBI thing is a rather naïve filter I made many years ago,
+ it looks unlike any real CRT, but scales well. Its only problem is
+ moire patterns when using the default size of 2x2.
+ */
+ float4 dots = TextureDots.Sample(SamplerDots,coord*bresl)*dac;
+ float3 tcol = pow(max(0,dots.rgb+dots.a),dotpow)*dotmult;
+ res.rgb = res.rgb*(1-dotblend)+tcol*dotblend;
+ return res;
+}
+/* that's right, CRT curvature */
+float4 PS_Curvature( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !curveenable ) return res;
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 bof = (1.0/bresl)*curvesoft;
+ float3 eta = float3(1+chromaab*0.009,1+chromaab*0.006,1+chromaab
+ *0.003);
+ 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 = 1+r2*lensdist*0.01;
+ 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;
+ int i,j;
+ float4 idist = float4(0,0,0,0);
+ /*
+ sticking a 5x5 gaussian blur with a tweakable radius in here to
+ attempt to reduce moire patterns in some cases. Supersampling would
+ be more useful for that, but ENB sucks ass through a crazy straw in
+ that aspect, so it would be more desirable to use GeDoSaTo (I sure
+ hope I can port all my stuff to it one day, at least the damn thing
+ is FOSS).
+ */
+ [unroll] for ( i=-2; i<=2; i++ ) [unroll] for ( j=-2; j<=2; j++ )
+ {
+ idist += gauss3[abs(i)]*gauss3[abs(j)]
+ *float4(TextureColor.Sample(Sampler,rcoord+bof
+ *float2(i,j)).r,TextureColor.Sample(SamplerB,gcoord+bof
+ *float2(i,j)).g,TextureColor.Sample(SamplerB,bcoord+bof
+ *float2(i,j)).b,TextureColor.Sample(SamplerB,float2(x,
+ y)+bof*float2(i,j)).a);
+ }
+ res.rgb = idist.rgb;
+ return res;
+}
+
+/* Why am I doing this */
+float4 PS_Blur( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !bssblurenable ) return res;
+ float2 ofs[16] =
+ {
+ float2(1.0,1.0), float2(-1.0,-1.0),
+ float2(-1.0,1.0), float2(1.0,-1.0),
+
+ float2(1.0,0.0), float2(-1.0,0.0),
+ float2(0.0,1.0), float2(0.0,-1.0),
+
+ float2(1.41,0.0), float2(-1.41,0.0),
+ float2(0.0,1.41), float2(0.0,-1.41),
+
+ float2(1.41,1.41), float2(-1.41,-1.41),
+ float2(-1.41,1.41), float2(1.41,-1.41)
+ };
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 bof = (1.0/bresl)*bssblurradius;
+ int i;
+ [unroll] for ( i=0; i<16; i++ )
+ res += TextureColor.Sample(Sampler,coord+ofs[i]*bof);
+ res /= 17.0;
+ res.a = 1.0;
+ return res;
+}
+float4 PS_Sharp( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !bsssharpenable ) return res;
+ float2 ofs[8] =
+ {
+ float2(1.0,1.0), float2(-1.0,-1.0),
+ float2(-1.0,1.0), float2(1.0,-1.0),
+
+ float2(1.41,1.41), float2(-1.41,-1.41),
+ float2(-1.41,1.41), float2(1.41,-1.41)
+ };
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 bof = (1.0/bresl)*bsssharpradius;
+ float4 tcol = res;
+ int i;
+ [unroll] for ( i=0; i<8; i++ )
+ tcol += TextureColor.Sample(Sampler,coord+ofs[i]*bof);
+ tcol /= 9.0;
+ float4 orig = res;
+ res = orig*(1.0+dot(orig.rgb-tcol.rgb,0.333333)*bsssharpamount);
+ float rg = clamp(pow(orig.b,3.0),0.0,1.0);
+ res = lerp(res,orig,rg);
+ res.a = 1.0;
+ return res;
+}
+float4 PS_Shift( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !bssshiftenable ) return res;
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 bof = (1.0/bresl)*bssshiftradius;
+ res.g = TextureColor.Sample(Sampler,coord).g;
+ res.r = TextureColor.Sample(Sampler,coord+float2(0,-bof.y)).r;
+ res.b = TextureColor.Sample(Sampler,coord+float2(0,bof.y)).b;
+ res.a = 1.0;
+ return res;
+}
+
+/* That "luma sharpen" thingy, added just because someone might want it */
+float4 PS_LumaSharp( VS_OUTPUT_POST IN, float4 v0 : SV_Position0 ) : SV_Target
+{
+ float2 coord = IN.txcoord.xy;
+ float4 res = TextureColor.Sample(Sampler,coord);
+ if ( !lsharpenable ) return res;
+ float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
+ float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*lsharpradius;
+ float4 crawling = TextureColor.Sample(Sampler,coord+float2(0,-1)*bof);
+ crawling += TextureColor.Sample(Sampler,coord+float2(-1,0)*bof);
+ crawling += TextureColor.Sample(Sampler,coord+float2(1,0)*bof);
+ crawling += TextureColor.Sample(Sampler,coord+float2(0,1)*bof);
+ crawling *= 0.25;
+ float4 inmyskin = res-crawling;
+ float thesewounds = luminance(inmyskin.rgb);
+ thesewounds = clamp(thesewounds,-lsharpclamp*0.01,lsharpclamp*0.01);
+ float4 theywillnotheal = res+thesewounds*lsharpblend;
+ return theywillnotheal;
+}
+
+technique11 ExtraFilters
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_LumaSharp()));
+ }
+}
+technique11 ExtraFilters1
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Blur()));
+ }
+}
+technique11 ExtraFilters2
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Sharp()));
+ }
+}
+technique11 ExtraFilters3
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Shift()));
+ }
+}
+technique11 ExtraFilters4
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_ChromaKey()));
+ }
+}
+technique11 ExtraFilters5
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Retro()));
+ }
+}
+technique11 ExtraFilters6
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_ASCII()));
+ }
+}
+technique11 ExtraFilters7
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_DotMatrix()));
+ }
+}
+technique11 ExtraFilters8
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_PostProcess()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Curvature()));
+ }
+}
diff --git a/enbseries/enbeffectpostpass.fx.ini b/enbseries/enbeffectpostpass.fx.ini
new file mode 100644
index 0000000..af0448d
--- /dev/null
+++ b/enbseries/enbeffectpostpass.fx.ini
@@ -0,0 +1,47 @@
+[ENBEFFECTPOSTPASS.FX]
+TECHNIQUE=1
+Enable Block GFX=false
+Emulated Resolution=0, 0, 0
+Zoom Factor=0, 0, 0
+Palette Type=6
+CGA Palette=0
+EGA Palette=0
+Dithering Pattern=-1
+Contrast Modifier=1.5
+Saturation Modifier=0.6
+Dither Offset=-0.1
+Dither Range=0.1
+Enable ASCII=false
+ASCII Monochrome=false
+ASCII Blend=0.0
+Enable Chroma Key=false
+Chroma Key Color=0.0, 1.0, 0.0
+Chroma Key Depth=0.99
+Enable Dot Matrix=false
+Dot Size=1
+Dot Blend=0.4
+Dot Intensity=1.0
+Dot Contrast=1.0
+Enable Curvature=false
+Curve Chromatic Aberration=0.7
+Curve Zooming=50.200008
+Curve Distortion=0.0
+Curve Sampling Soften=0.0
+Enable Blur=false
+Blur Sampling Range=0.15
+Enable Sharp=false
+Sharp Sampling Range=0.35
+Sharpening Amount=3.0
+Enable Shift=false
+Shift Sampling Range=0.6
+Luma Sharpen Enable=true
+Luma Sharpen Radius=0.8
+Luma Sharpen Clamp=0.1
+Luma Sharpen Blending=6.0
+Emulated Resolution Width=0.0
+Emulated Resolution Height=0.0
+Zoom Factor X=0.0
+Zoom Factor Y=0.0
+Chroma Key Red=0, 1, 0
+Chroma Key Green=1.0
+Chroma Key Blue=0.0
diff --git a/enbseries/enblens.fx b/enbseries/enblens.fx
new file mode 100644
index 0000000..df6a8e9
--- /dev/null
+++ b/enbseries/enblens.fx
@@ -0,0 +1,33 @@
+/* This shader intentionally left blank */
+struct VS_INPUT_POST
+{
+ float3 pos : POSITION;
+ float2 txcoord : TEXCOORD0;
+};
+struct VS_OUTPUT_POST
+{
+ float4 pos : SV_POSITION;
+ float2 txcoord0 : TEXCOORD0;
+};
+VS_OUTPUT_POST VS_Quad(VS_INPUT_POST IN)
+{
+ VS_OUTPUT_POST OUT;
+ float4 pos;
+ pos.xyz = IN.pos.xyz;
+ pos.w = 1.0;
+ OUT.pos = pos;
+ OUT.txcoord0.xy = IN.txcoord.xy;
+ return OUT;
+}
+float4 PS_Nothing(VS_OUTPUT_POST IN, float4 v0 : SV_Position0) : SV_Target
+{
+ return float4(0.0,0.0,0.0,1.0);
+}
+technique11 Nothing
+{
+ pass p0
+ {
+ SetVertexShader(CompileShader(vs_5_0,VS_Quad()));
+ SetPixelShader(CompileShader(ps_5_0,PS_Nothing()));
+ }
+}
diff --git a/enbseries/enblens.fx.ini b/enbseries/enblens.fx.ini
new file mode 100644
index 0000000..d1938c1
--- /dev/null
+++ b/enbseries/enblens.fx.ini
@@ -0,0 +1,2 @@
+[ENBLENS.FX]
+TECHNIQUE=0
diff --git a/enbseries/menbdoomlut.png b/enbseries/menbdoomlut.png
new file mode 100644
index 0000000..b2c3c45
Binary files /dev/null and b/enbseries/menbdoomlut.png differ
diff --git a/enbseries/menbdots.png b/enbseries/menbdots.png
new file mode 100644
index 0000000..2027ba1
Binary files /dev/null and b/enbseries/menbdots.png differ
diff --git a/enbseries/menbfrost.png b/enbseries/menbfrost.png
new file mode 100644
index 0000000..9cf9f2b
Binary files /dev/null and b/enbseries/menbfrost.png differ
diff --git a/enbseries/menbfrostbump.png b/enbseries/menbfrostbump.png
new file mode 100644
index 0000000..7ee8022
Binary files /dev/null and b/enbseries/menbfrostbump.png differ
diff --git a/enbseries/menbglobaldefs.fx b/enbseries/menbglobaldefs.fx
new file mode 100644
index 0000000..ddcc6f5
--- /dev/null
+++ b/enbseries/menbglobaldefs.fx
@@ -0,0 +1,59 @@
+/*
+ menbglobaldefs.fx : MariENB3 global shared code.
+ (C)2016-2017 Marisa Kirisame, UnSX Team.
+ Part of MariENB3, the personal ENB of Marisa for Fallout 4.
+ Released under the GNU GPLv3 (or later).
+*/
+/* are we running on skyrim special edition or on fallout 4? */
+//#define SKYRIMSE
+/* time of day and interior interpolation */
+#define ndfact clamp(0.5+(TimeOfDay1.z+(TimeOfDay1.y+TimeOfDay1.w)*0.5)*0.5\
+ -(TimeOfDay2.y+(TimeOfDay1.x+TimeOfDay2.x)*0.5)*0.5,0.0,1.0)
+#define tod_ind(a) lerp(lerp(a##_n,a##_d,ndfact),a##_i,EInteriorFactor)
+#define todx_ind(a) lerp(a##_dw*TimeOfDay1.x+a##_sr*TimeOfDay1.y+a##_dy\
+ *TimeOfDay1.z+a##_ss*TimeOfDay1.w+a##_ds*TimeOfDay2.x+a##_nt\
+ *TimeOfDay2.y,a##_i,EInteriorFactor)
+/* weather macros (not very useful yet) */
+#define WT_TEMPERATE 0.0
+#define WT_HOT 1.0
+#define WT_COLD 2.0
+#define weatherfactor(id) ((Weather.x==id)?(Weather.y==id)?(1.0):(Weather.z)\
+ :(Weather.y==id)?(1.0-Weather.z):(0.0))
+/*
+ Explanation of macro, because some of the people reading this likely don't
+ know what a ternary conditional is:
+
+ (WeatherAndTime.x==id) -> transitioning to wanted weather?
+ ?(WeatherAndTime.y==id) -> coming from wanted weather?
+ ?(1.0) -> if so, always 1
+ :(WeatherAndTime.z) -> if not, return transition
+ :(WeatherAndTime.y==id) -> not transitioning but coming from wanted weather?
+ ?(1.0-WeatherAndTime.z) -> return inverse transition
+ :(0.0) -> otherwise return 0
+*/
+/* asset definitions */
+/* ascii art font */
+#define FONT_WIDTH 8
+#define FONT_HEIGHT 4096
+#define GLYPH_WIDTH 8
+#define GLYPH_HEIGHT 16
+#define FONT_LEVELS 255
+/*
+ aspect correction for certain overlays
+ uncommented : the textures are 1:1 and must be corrected
+ commented : the textures are 16:9 or whatever ratio you use
+*/
+//#define ASPECT_LENSDIRT
+/* texture sizes */
+#define NOISESIZE 256.0
+#define HEATSIZE 1024.0
+#define FROSTSIZE 1024.0
+/* LUT mode (use only one) - The 256px option was discarded for size reasons */
+//#define LUTMODE_LEGACY
+//#define LUTMODE_16
+#define LUTMODE_64
+/* some textures can be provided as DDS rather than PNG to save space */
+//#define HEAT_DDS
+//#define LENSDIRT_DDS
+//#define FROST_DDS
+//#define FROSTBUMP_DDS
diff --git a/enbseries/menbheat.png b/enbseries/menbheat.png
new file mode 100644
index 0000000..aa29697
Binary files /dev/null and b/enbseries/menbheat.png differ
diff --git a/enbseries/menblens.png b/enbseries/menblens.png
new file mode 100644
index 0000000..61f8955
Binary files /dev/null and b/enbseries/menblens.png differ
diff --git a/enbseries/menblut64.png b/enbseries/menblut64.png
new file mode 100644
index 0000000..1c58d5f
Binary files /dev/null and b/enbseries/menblut64.png differ
diff --git a/enbseries/menbnoise1.png b/enbseries/menbnoise1.png
new file mode 100644
index 0000000..3e915eb
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..450769f
Binary files /dev/null and b/enbseries/menbnoise2.png differ
diff --git a/enbseries/menbquakelut.png b/enbseries/menbquakelut.png
new file mode 100644
index 0000000..44f172a
Binary files /dev/null and b/enbseries/menbquakelut.png differ
diff --git a/enbseries/menbvgaluma.png b/enbseries/menbvgaluma.png
new file mode 100644
index 0000000..ff6cccf
Binary files /dev/null and b/enbseries/menbvgaluma.png differ
diff --git a/enbseries/menbvgalut.png b/enbseries/menbvgalut.png
new file mode 100644
index 0000000..9e752b2
Binary files /dev/null and b/enbseries/menbvgalut.png differ
diff --git a/enbseries/menbweatherinfo.txt b/enbseries/menbweatherinfo.txt
new file mode 100644
index 0000000..b0887a8
--- /dev/null
+++ b/enbseries/menbweatherinfo.txt
@@ -0,0 +1,90 @@
+Fallout4
+
+15E DefaultWeather WARM
+116B FXDiamondSunlightBounce .
+116D DiamondWeather .
+116E DiamondWeatherPastel .
+16EC IstWeather .
+29BB8 FXWthrSunlightOffAtNight .
+2B52A CommonwealthClear WARM
+6ED5A FXWthrInvertDayNight .
+747C8 FXConcord01 .
+7548F FXWthrSunlight .
+75491 FXWthrSunlightWhite .
+76A58 FXConcord01OffatNight .
+777CF FXWthrInvertDayNightWarm .
+88C57 FXWthrMoonlightOnly .
+96C61 FXWthrMorningOnly .
+A1588 NeutralWeather WARM
+A6858 WorldMapWeather .
+DB2A1 MQ203Weather .
+F1033 CommonwealthGSOvercast WARM
+FF98F PrewarPlayerHouseInteriorWeather WARM
+108640 FXInstituteDayNightCycle .
+10D573 FXInstituteDayNightCycleKey .
+10E3D4 EditorCloudPreview .
+10F781 TCommonwealthMarshOvercast COLD
+115C64 GoodneighborWeatherBase .
+1209AF NeutralOvercast COLD
+1256FB FXNukeWeather WARM
+12A18E CommonwealthSanctuaryClear WARM
+141AB4 FXWthrSunlightWhiteBounce .
+171621 DefaultInteriorWeatherNoLUT .
+171636 FXWthrSunlightOffAtNightGlass .
+191647 FXWthrInvertDayNightGS .
+1A65E5 ConcMuseumWeather .
+1A65F0 DefaultInteriorWeather .
+1A6994 CommonwealthSanctuaryClearNukeFog WARM
+1BD481 CommonwealthGSFoggy WARM
+1C3473 CommonwealthFoggy COLD
+1C3D5E CommonwealthGSRadstorm WARM
+1C8556 CommonwealthOvercast .
+1CA7E4 CommonwealthRain COLD
+1CC186 CommonwealthMisty .
+1CD096 CommonwealthMistyRainy COLD
+1D1CEC FXWthrSunlightOffAtNightBlack .
+1D670E CommonwealthClearestSkies WARM
+1E5E60 CommonwealthDarkSkies .
+1EB2FF CommonwealthPolluted WARM
+1F2529 CommOvercastTest2 .
+1F61A1 CommonwealthDusty .
+1F61FD CGPrewarNukeFXWeather WARM
+20F46C CommonwealthOvercastBackup .
+211221 VideoVaultExit WARM
+2115D7 CommonwealthMistyRainyBackup COLD
+216A98 CommonwealthClearBackup WARM
+21A563 CommonwealthClearTrailer1 WARM
+21A564 CommonwealthClearTrailer2 WARM
+222394 CommonwealthGSRadstormOld WARM
+22239A CommonwealthRainBackup COLD
+225922 CommonwealthSanctuaryClearNoAttach COLD
+226448 CommonwealthDarkSkies3 .
+2385FB CommonwealthDarkSkies2 .
+2385FD CommonwealthClear2 WARM
+2392A2 CommonwealthFoggyBackup COLD
+2392A3 CommonwealthGSRadstormBackup WARM
+2392A4 CommonwealthGSFoggyBackup WARM
+2392A5 CommonwealthMistyBackup .
+2392A6 CommonwealthSanctuaryClearBackup WARM
+23AB9C CommonwealthClearBackup2 WARM
+2486A4 CommonwealthClear_VBFog WARM
+2486A5 CommonwealthOvercast_VBFog COLD
+
+DLCCoast
+
+74C6 DLC03_RadStorm WARM
+74F2 DLC03_UNUSEDMistyFogWeather COLD
+74F3 DLC03_TestMistyWeather .
+74F5 DLC03_RadMistWeather COLD
+74FA DLC03_RainWeather COLD
+7FBA DLC03_RadFogWeather COLD
+9962 DLC03_ClearWeather .
+23A97 DLC03VirtualWeather01 .
+247B6 DLC03AtomM01_RadStorm WARM
+31416 DLC03VirtualWeather01Original .
+427EB DLC03_RadMistWeatherBeforeGrantMessedItUp COLD
+45F6F DLC03_ClearWeatherFast WARM
+54132 DLC03VirtualWeather01OriginalFog .
+56378 FXWthrWindowNoGlow01 .
+56638 DLC03_ClearWeatherFastBackup WARM
+5D0C4 dlc03_radmistweatherFast COLD
\ No newline at end of file