MariENB FNV 2.4.3
BIN
Logo.png
|
Before Width: | Height: | Size: 149 KiB |
13
README.md
|
|
@ -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.
|
||||
140
enbseries.ini
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
[GLOBAL]
|
||||
UseEffect=true
|
||||
[EFFECT]
|
||||
UseOriginalPostProcessing=false
|
||||
UseOriginalObjectsProcessing=false
|
||||
EnableBloom=true
|
||||
EnableLens=false
|
||||
EnableAdaptation=true
|
||||
EnableDepthOfField=true
|
||||
EnableAmbientOcclusion=true
|
||||
EnableDetailedShadow=true
|
||||
EnableSunRays=true
|
||||
EnableSunGlare=false
|
||||
[COLORCORRECTION]
|
||||
UsePaletteTexture=true
|
||||
UseProceduralCorrection=false
|
||||
Brightness=1.0
|
||||
GammaCurve=1.0
|
||||
[NIGHTDAY]
|
||||
DetectorDefaultDay=false
|
||||
DetectorLevelDay=0.75
|
||||
DetectorLevelNight=0.25
|
||||
DetectorLevelCurve=1.0
|
||||
[ADAPTATION]
|
||||
ForceMinMaxValues=false
|
||||
AdaptationSensitivity=0.2
|
||||
AdaptationTime=0.65
|
||||
AdaptationMin=0.0
|
||||
AdaptationMax=1.0
|
||||
[BLOOM]
|
||||
Quality=0
|
||||
AmountDay=1.0
|
||||
AmountNight=1.0
|
||||
AmountInterior=1.0
|
||||
BlueShiftAmountDay=1.0
|
||||
BlueShiftAmountNight=1.0
|
||||
BlueShiftAmountInterior=1.0
|
||||
[LENS]
|
||||
LenzReflectionIntensityDay=1.0
|
||||
LenzReflectionIntensityNight=1.0
|
||||
LenzReflectionIntensityInterior=1.0
|
||||
LenzReflectionPowerDay=1.0
|
||||
LenzReflectionPowerNight=1.0
|
||||
LenzReflectionPowerInterior=1.0
|
||||
LenzDirtIntensityDay=1.0
|
||||
LenzDirtIntensityNight=1.0
|
||||
LenzDirtIntensityInterior=1.0
|
||||
LenzDirtPowerDay=1.0
|
||||
LenzDirtPowerNight=1.0
|
||||
LenzDirtPowerInterior=1.0
|
||||
[SSAO_SSIL]
|
||||
EnableSupersampling=false
|
||||
UseIndirectLighting=true
|
||||
SamplingQuality=0
|
||||
SamplingPrecision=0
|
||||
SamplingRange=0.25
|
||||
FadeFogRangeDay=0.5
|
||||
FadeFogRangeNight=0.5
|
||||
SizeScale=0.5
|
||||
SourceTexturesScale=0.5
|
||||
FilterQuality=0
|
||||
AOAmount=1.07
|
||||
AOAmountInterior=1.05
|
||||
ILAmount=2.18
|
||||
ILAmountInterior=2.12
|
||||
AOIntensity=0.96
|
||||
AOIntensityInterior=0.82
|
||||
AOType=0
|
||||
AOMixingType=2
|
||||
AOMixingTypeInterior=3
|
||||
EnableDenoiser=true
|
||||
[ENVIRONMENT]
|
||||
LightingIntensityDay=1.13
|
||||
LightingIntensityNight=1.15
|
||||
LightingIntensityInterior=1.1
|
||||
LightingCurveDay=1.14
|
||||
LightingCurveNight=1.05
|
||||
LightingCurveInterior=1.06
|
||||
LightingDesaturationDay=0.05
|
||||
LightingDesaturationNight=0.07
|
||||
LightingDesaturationInterior=0.12
|
||||
AmbientLightingIntensityDay=0.89
|
||||
AmbientLightingIntensityNight=0.62
|
||||
AmbientLightingIntensityInterior=1.03
|
||||
AmbientLightingCurveDay=1.2
|
||||
AmbientLightingCurveNight=1.06
|
||||
AmbientLightingCurveInterior=0.94
|
||||
AmbientLightingDesaturationDay=0.08
|
||||
AmbientLightingDesaturationNight=0.04
|
||||
AmbientLightingDesaturationInterior=0.02
|
||||
FogColorMultiplierDay=1.08
|
||||
FogColorMultiplierNight=1.05
|
||||
FogColorMultiplierInterior=1.02
|
||||
FogColorCurveDay=0.88
|
||||
FogColorCurveNight=1.1
|
||||
FogColorCurveInterior=0.91
|
||||
[SKY]
|
||||
Enable=true
|
||||
StarsIntensity=1.27
|
||||
StarsCurve=1.08
|
||||
CloudsIntensityDay=1.02
|
||||
CloudsIntensityNight=0.88
|
||||
CloudsCurveDay=0.98
|
||||
CloudsCurveNight=0.92
|
||||
CloudsDesaturationDay=0.1
|
||||
CloudsDesaturationNight=0.09
|
||||
CloudsEdgeClamp=0.5
|
||||
CloudsEdgeIntensity=1.0
|
||||
GradientIntensityDay=1.11
|
||||
GradientIntensityNight=0.96
|
||||
GradientDesaturationDay=0.07
|
||||
GradientDesaturationNight=0.04
|
||||
GradientTopIntensityDay=1.08
|
||||
GradientTopIntensityNight=0.98
|
||||
GradientTopCurveDay=0.81
|
||||
GradientTopCurveNight=1.13
|
||||
GradientMiddleIntensityDay=1.07
|
||||
GradientMiddleIntensityNight=1.11
|
||||
GradientMiddleCurveDay=1.08
|
||||
GradientMiddleCurveNight=1.23
|
||||
GradientHorizonIntensityDay=1.22
|
||||
GradientHorizonIntensityNight=1.36
|
||||
GradientHorizonCurveDay=1.19
|
||||
GradientHorizonCurveNight=1.24
|
||||
SunIntensity=1.66
|
||||
SunDesaturation=0.0
|
||||
SunCoronaIntensity=0.001
|
||||
SunCoronaCurve=1.0
|
||||
SunCoronaDesaturation=0.0
|
||||
MoonIntensity=1.09
|
||||
MoonCurve=1.14
|
||||
MoonDesaturation=0.0
|
||||
MoonCoronaIntensity=0.001
|
||||
[DEPTHOFFIELD]
|
||||
FadeTime=0.4
|
||||
[SHADOW]
|
||||
DetailedShadowQuality=1
|
||||
ShadowDesaturation=0.0
|
||||
[RAYS]
|
||||
SunRaysMultiplier=0.29
|
||||
674
enbseries/COPYING
Normal file
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
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
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
1
enbseries/VERSION
Normal file
|
|
@ -0,0 +1 @@
|
|||
2.4.3-1 "Good Old Vanilla"
|
||||
11
enbseries/effect.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
effect.txt : MariENB extra shader.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* separate for easier maintenance */
|
||||
#include "menbglobaldefs.fx"
|
||||
#include "menbextrasettings.fx"
|
||||
#include "menbextrainternals.fx"
|
||||
#include "menbextrafilters.fx"
|
||||
48
enbseries/effect.txt.ini
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
[EFFECT.TXT]
|
||||
TECHNIQUE=0
|
||||
Enable Block GFX=false
|
||||
Emulated Resolution Width=0.5
|
||||
Emulated Resolution Height=0.5
|
||||
Zoom Factor X=0.0
|
||||
Zoom Factor Y=0.0
|
||||
Palette Type=4
|
||||
CGA Palette=1
|
||||
EGA Palette=0
|
||||
Dithering Pattern=2
|
||||
Contrast Modifier=1.0
|
||||
Saturation Modifier=0.75
|
||||
Dither Offset=-0.1
|
||||
Dither Range=0.15
|
||||
Enable ASCII=false
|
||||
ASCII Monochrome=true
|
||||
ASCII Blend=0.0
|
||||
Enable Chroma Key=false
|
||||
Chroma Key Red=0.0
|
||||
Chroma Key Green=0.5
|
||||
Chroma Key Blue=0.0
|
||||
Chroma Key Depth=0.99
|
||||
Enable Dot Matrix=false
|
||||
Dot Size=1
|
||||
Dot Blend=0.2
|
||||
Dot Intensity=2.5
|
||||
Dot Contrast=2.2
|
||||
Enable Curvature=false
|
||||
Curve Chromatic Aberration=0.5
|
||||
Curve Zooming=50.29995
|
||||
Curve Distortion=0.0
|
||||
Curve Sampling Soften=0.0
|
||||
Enable Blur=true
|
||||
Blur Sampling Range=0.18
|
||||
Enable Sharp=true
|
||||
Sharp Sampling Range=0.8
|
||||
Sharpening Amount=1.45
|
||||
Enable Shift=true
|
||||
Shift Sampling Range=0.5
|
||||
VGA Palette=0
|
||||
Chroma Key Depth Horizontal Tilt Center=0.5
|
||||
Chroma Key Depth Vertical Tilt Center=0.5
|
||||
Chroma Key Depth Horizontal Tilt=0.0
|
||||
Chroma Key Depth Vertical Tilt=0.0
|
||||
Enable Black Bars=false
|
||||
Box Horizontal Ratio=2.39
|
||||
Box Vertical Ratio=1.0
|
||||
11
enbseries/enbbloom.fx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
enbbloom.fx : MariENB bloom filter.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* separate for easier maintenance */
|
||||
#include "menbglobaldefs.fx"
|
||||
#include "menbbloomsettings.fx"
|
||||
#include "menbbloominternals.fx"
|
||||
#include "menbbloomfilters.fx"
|
||||
88
enbseries/enbbloom.fx.ini
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
[ENBBLOOM.FX]
|
||||
TECHNIQUE=0
|
||||
Bloom Intensity Night=0.39
|
||||
Bloom Intensity Day=0.33
|
||||
Bloom Intensity Interior Night=0.36
|
||||
Bloom Intensity Interior Day=0.36
|
||||
Bloom Contrast Night=1.02
|
||||
Bloom Contrast Day=1.05
|
||||
Bloom Contrast Interior Night=1.03
|
||||
Bloom Contrast Interior Day=1.03
|
||||
Bloom Saturation Night=1.19
|
||||
Bloom Saturation Day=1.13
|
||||
Bloom Saturation Interior Night=1.24
|
||||
Bloom Saturation Interior Day=1.24
|
||||
Bloom Offset Night=-0.1
|
||||
Bloom Offset Day=-0.15
|
||||
Bloom Offset Interior Night=-0.13
|
||||
Bloom Offset Interior Day=-0.13
|
||||
Bloom Intensity Cap Night=25.0
|
||||
Bloom Intensity Cap Day=25.0
|
||||
Bloom Intensity Cap Interior Night=25.0
|
||||
Bloom Intensity Cap Interior Day=25.0
|
||||
Bloom Blur Radius=1.0
|
||||
Blue Shift Night Red=0.7
|
||||
Blue Shift Night Green=0.4
|
||||
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.6
|
||||
Blue Shift Interior Night Green=0.3
|
||||
Blue Shift Interior Night Blue=1.0
|
||||
Blue Shift Interior Day Red=0.6
|
||||
Blue Shift Interior Day Green=0.3
|
||||
Blue Shift Interior Day Blue=1.0
|
||||
Blue Shift Intensity Night=0.6
|
||||
Blue Shift Intensity Day=0.5
|
||||
Blue Shift Intensity Interior Night=0.65
|
||||
Blue Shift Intensity Interior Day=0.65
|
||||
Blue Shift Luminance Factor Per-pass=0.41
|
||||
Blue Shift Color Factor Per-pass=0.9
|
||||
Enable Anamorphic Bloom=true
|
||||
Anamorphic Bloom Blend Night=0.42
|
||||
Anamorphic Bloom Blend Day=0.31
|
||||
Anamorphic Bloom Blend Interior Night=0.38
|
||||
Anamorphic Bloom Blend Interior Day=0.38
|
||||
Anamorphic Bloom Blue Shift Night Red=0.35
|
||||
Anamorphic Bloom Blue Shift Night Green=0.08
|
||||
Anamorphic Bloom Blue Shift Night Blue=1.0
|
||||
Anamorphic Bloom Blue Shift Day Red=0.35
|
||||
Anamorphic Bloom Blue Shift Day Green=0.57
|
||||
Anamorphic Bloom Blue Shift Day Blue=1.0
|
||||
Anamorphic Bloom Blue Shift Interior Night Red=0.42
|
||||
Anamorphic Bloom Blue Shift Interior Night Green=0.21
|
||||
Anamorphic Bloom Blue Shift Interior Night Blue=1.0
|
||||
Anamorphic Bloom Blue Shift Interior Day Red=0.21
|
||||
Anamorphic Bloom Blue Shift Interior Day Green=0.42
|
||||
Anamorphic Bloom Blue Shift Interior Day Blue=1.0
|
||||
Anamorphic Bloom Blue Shift Intensity Night=1.06
|
||||
Anamorphic Bloom Blue Shift Intensity Day=1.88
|
||||
Anamorphic Bloom Blue Shift Interior Night=1.79
|
||||
Anamorphic Bloom Blue Shift Interior Day=1.79
|
||||
Anamorphic Bloom Contrast Night=1.22
|
||||
Anamorphic Bloom Contrast Day=1.34
|
||||
Anamorphic Bloom Contrast Interior Night=1.26
|
||||
Anamorphic Bloom Contrast Interior Day=1.26
|
||||
Anamorphic Bloom Radius Multiplier=1.0
|
||||
Bloom Pass 1 Blend=0.33
|
||||
Bloom Pass 2 Blend=0.45
|
||||
Bloom Pass 3 Blend=0.57
|
||||
Bloom Pass 4 Blend=0.74
|
||||
Bloom Pass 7 Blend=0.98
|
||||
Bloom Pass 8 Blend=1.34
|
||||
Bloom Prepass Blend=0.0
|
||||
Bloom Base Blend=0.0
|
||||
Enable Lens Dirt=true
|
||||
Dirt Pass 1 Blend=0.02
|
||||
Dirt Pass 2 Blend=0.04
|
||||
Dirt Pass 3 Blend=0.08
|
||||
Dirt Pass 4 Blend=0.11
|
||||
Dirt Pass 7 Blend=0.59
|
||||
Dirt Pass 8 Blend=3.01
|
||||
Dirt Prepass Blend=0.0
|
||||
Dirt Base Blend=0.0
|
||||
Dirt Contrast=1.0
|
||||
Dirt Factor=1.2
|
||||
Bloom Blur Radius X=1.0
|
||||
Bloom Blur Radius Y=1.0
|
||||
13
enbseries/enbeffect.fx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
enbeffect.fx : MariENB base shader.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* do not touch this! */
|
||||
#define E_SHADER_3_0
|
||||
/* separate for easier maintenance */
|
||||
#include "menbglobaldefs.fx"
|
||||
#include "menbeffectsettings.fx"
|
||||
#include "menbeffectinternals.fx"
|
||||
#include "menbeffectfilters.fx"
|
||||
208
enbseries/enbeffect.fx.ini
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
[ENBEFFECT.FX]
|
||||
TECHNIQUE=0
|
||||
Enable Grain=true
|
||||
Grain Speed=15.0
|
||||
Grain Intensity=0.140001
|
||||
Grain Saturation=-0.19
|
||||
Grain Two-Pass=true
|
||||
Grain Blending Mode=3
|
||||
Grain Dark Mask Contrast=17.460001
|
||||
Grain Two-Pass Factor=0.04
|
||||
Grain Magnification 1=15.13
|
||||
Grain Magnification 2=15.3
|
||||
Grain Magnification 3=13.15
|
||||
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=9.42
|
||||
Grain Pass 2 Magnification 3=6.29
|
||||
Grain Contrast=5.6
|
||||
Enable Adaptation=true
|
||||
Adaptation Min Night=0.69
|
||||
Adaptation Min Day=0.85
|
||||
Adaptation Min Interior Night=0.72
|
||||
Adaptation Min Interior Day=0.72
|
||||
Adaptation Max Night=1.57
|
||||
Adaptation Max Day=1.86
|
||||
Adaptation Max Interior Night=1.43
|
||||
Adaptation Max Interior Day=1.43
|
||||
Enable Tonemapping=true
|
||||
Tonemap Shoulder Strength Night=0.97
|
||||
Tonemap Shoulder Strength Day=0.94
|
||||
Tonemap Shoulder Strength Interior Night=0.91
|
||||
Tonemap Shoulder Strength Interior Day=0.91
|
||||
Tonemap Linear Strength Night=1.11
|
||||
Tonemap Linear Strength Day=1.17
|
||||
Tonemap Linear Strength Interior Night=1.15
|
||||
Tonemap Linear Strength Interior Day=1.15
|
||||
Tonemap Linear Angle Night=0.74
|
||||
Tonemap Linear Angle Day=0.85
|
||||
Tonemap Linear Angle Interior Night=0.69
|
||||
Tonemap Linear Angle Interior Day=0.69
|
||||
Tonemap Toe Strength Night=0.85
|
||||
Tonemap Toe Strength Day=0.87
|
||||
Tonemap Toe Strength Interior Night=0.89
|
||||
Tonemap Toe Strength Interior Day=0.89
|
||||
Tonemap Toe Numerator Night=3.64
|
||||
Tonemap Toe Numerator Day=3.98
|
||||
Tonemap Toe Numerator Interior Night=3.85
|
||||
Tonemap Toe Numerator Interior Day=3.85
|
||||
Tonemap Toe Denominator Night=1.24
|
||||
Tonemap Toe Denominator Day=1.08
|
||||
Tonemap Toe Denominator Interior Night=1.27
|
||||
Tonemap Toe Denominator Interior Day=1.27
|
||||
Tonemap Linear White Night=6.61
|
||||
Tonemap Linear White Day=8.54
|
||||
Tonemap Linear White Interior Night=5.57
|
||||
Tonemap Linear White Interior Day=5.57
|
||||
Enable RGB Grading=true
|
||||
Grading Intensity Night Red=1.03
|
||||
Grading Intensity Night Green=1.01
|
||||
Grading Intensity Night Blue=1.06
|
||||
Grading Intensity Day Red=1.01
|
||||
Grading Intensity Day Green=1.0
|
||||
Grading Intensity Day Blue=1.03
|
||||
Grading Intensity Interior Night Red=1.0
|
||||
Grading Intensity Interior Night Green=1.05
|
||||
Grading Intensity Interior Night Blue=1.01
|
||||
Grading Intensity Interior Day Red=1.0
|
||||
Grading Intensity Interior Day Green=1.05
|
||||
Grading Intensity Interior Day Blue=1.01
|
||||
Grading Contrast Night Red=0.98
|
||||
Grading Contrast Night Green=0.99
|
||||
Grading Contrast Night Blue=0.93
|
||||
Grading Contrast Day Red=0.94
|
||||
Grading Contrast Day Green=0.99
|
||||
Grading Contrast Day Blue=0.91
|
||||
Grading Contrast Interior Night Red=0.95
|
||||
Grading Contrast Interior Night Green=0.99
|
||||
Grading Contrast Interior Night Blue=0.96
|
||||
Grading Contrast Interior Day Red=0.95
|
||||
Grading Contrast Interior Day Green=0.99
|
||||
Grading Contrast Interior Day Blue=0.96
|
||||
Enable Vibrance Grading=true
|
||||
Grading Color Night Red=-0.61
|
||||
Grading Color Night Green=-0.12
|
||||
Grading Color Night Blue=-0.85
|
||||
Grading Color Day Red=-0.77
|
||||
Grading Color Day Green=-0.07
|
||||
Grading Color Day Blue=-0.24
|
||||
Grading Color Interior Night Red=-0.21
|
||||
Grading Color Interior Night Green=-0.05
|
||||
Grading Color Interior Night Blue=-0.79
|
||||
Grading Color Interior Day Red=-0.25
|
||||
Grading Color Interior Day Green=-0.05
|
||||
Grading Color Interior Day Blue=-0.79
|
||||
Grading Color Factor Night=-0.16
|
||||
Grading Color Factor Day=-0.06
|
||||
Grading Color Factor Interior Night=-0.1
|
||||
Grading Color Factor Interior Day=-0.1
|
||||
Enable HSV Grading=true
|
||||
Grading Saturation Intensity Night=1.23
|
||||
Grading Saturation Intensity Day=1.14
|
||||
Grading Saturation Intensity Interior Night=1.16
|
||||
Grading Saturation Intensity Interior Day=1.16
|
||||
Grading Saturation Contrast Night=1.18
|
||||
Grading Saturation Contrast Day=1.08
|
||||
Grading Saturation Contrast Interior Night=1.13
|
||||
Grading Saturation Contrast Interior Day=1.13
|
||||
Grading Value Intensity Night=0.98
|
||||
Grading Value Intensity Day=0.93
|
||||
Grading Value Intensity Interior Night=0.96
|
||||
Grading Value Intensity Interior Day=0.96
|
||||
Grading Value Contrast Night=1.12
|
||||
Grading Value Contrast Day=1.18
|
||||
Grading Value Contrast Interior Night=1.06
|
||||
Grading Value Contrast Interior Day=1.06
|
||||
Colorize After HSV=true
|
||||
Enable Vanilla Imagespace=true
|
||||
Vanilla Tint Blend=0.97
|
||||
Vanilla Vibrance Blend=0.93
|
||||
Vanilla Contrast Blend=0.77
|
||||
Enable LUT Grading=true
|
||||
LUT Blend Night=0.42
|
||||
LUT Blend Day=0.35
|
||||
LUT Blend Interior Night=0.31
|
||||
LUT Blend Interior Day=0.31
|
||||
Enable ENB Palette=false
|
||||
Palette Blend=1.0
|
||||
Enable Post Dither=true
|
||||
Dither Pattern=2
|
||||
Display Bloom=false
|
||||
Apply Grain Before Tone Mapping=true
|
||||
Tonemapping Method=2
|
||||
Tonemap Exposure Night=6.44
|
||||
Tonemap Exposure Day=6.259999
|
||||
Tonemap Exposure Interior Night=6.89
|
||||
Tonemap Exposure Interior Day=6.89
|
||||
Tonemap Blend Night=1.0
|
||||
Tonemap Blend Day=1.0
|
||||
Tonemap Blend Interior Night=1.0
|
||||
Tonemap Blend Interior Day=1.0
|
||||
Uncharted2 Shoulder Strength Night=0.22
|
||||
Uncharted2 Shoulder Strength Day=0.12
|
||||
Uncharted2 Shoulder Strength Interior Night=0.16
|
||||
Uncharted2 Shoulder Strength Interior Day=0.16
|
||||
Uncharted2 Linear Strength Night=1.37
|
||||
Uncharted2 Linear Strength Day=1.44
|
||||
Uncharted2 Linear Strength Interior Night=1.49
|
||||
Uncharted2 Linear Strength Interior Day=1.49
|
||||
Uncharted2 Linear Angle Night=0.45
|
||||
Uncharted2 Linear Angle Day=0.51
|
||||
Uncharted2 Linear Angle Interior Night=0.62
|
||||
Uncharted2 Linear Angle Interior Day=0.62
|
||||
Uncharted2 Toe Strength Night=1.37
|
||||
Uncharted2 Toe Strength Day=1.31
|
||||
Uncharted2 Toe Strength Interior Night=1.26
|
||||
Uncharted2 Toe Strength Interior Day=1.26
|
||||
Uncharted2 Toe Numerator Night=0.23
|
||||
Uncharted2 Toe Numerator Day=0.39
|
||||
Uncharted2 Toe Numerator Interior Night=0.28
|
||||
Uncharted2 Toe Numerator Interior Day=0.28
|
||||
Uncharted2 Toe Denominator Night=1.44
|
||||
Uncharted2 Toe Denominator Day=1.13
|
||||
Uncharted2 Toe Denominator Interior Night=1.19
|
||||
Uncharted2 Toe Denominator Interior Day=1.19
|
||||
Uncharted2 Linear White Night=15.7
|
||||
Uncharted2 Linear White Day=32.290001
|
||||
Uncharted2 Linear White Interior Night=29.4
|
||||
Uncharted2 Linear White Interior Day=29.4
|
||||
SweetFX Gamma Night=1.0
|
||||
SweetFX Gamma Day=1.0
|
||||
SweetFX Gamma Interior Night=1.0
|
||||
SweetFX Gamma Interior Day=1.0
|
||||
SweetFX Exposure Night=0.0
|
||||
SweetFX Exposure Day=0.0
|
||||
SweetFX Exposure Interior Night=0.0
|
||||
SweetFX Exposure Interior Day=0.0
|
||||
SweetFX Saturation Night=0.0
|
||||
SweetFX Saturation Day=0.0
|
||||
SweetFX Saturation Interior Night=0.0
|
||||
SweetFX Saturation Interior Day=0.0
|
||||
SweetFX Bleach Night=0.0
|
||||
SweetFX Bleach Day=0.0
|
||||
SweetFX Bleach Interior Night=0.0
|
||||
SweetFX Bleach Interior Day=0.0
|
||||
SweetFX Defog Night=0.0
|
||||
SweetFX Defog Day=0.0
|
||||
SweetFX Defog Interior Night=0.0
|
||||
SweetFX Defog Interior Day=0.0
|
||||
SweetFX Defog Color Red Night=0.0
|
||||
SweetFX Defog Color Green Night=0.0
|
||||
SweetFX Defog Color Blue Night=1.0
|
||||
SweetFX Defog Color Red Day=0.0
|
||||
SweetFX Defog Color Green Day=0.0
|
||||
SweetFX Defog Color Blue Day=1.0
|
||||
SweetFX Defog Color Red Interior Night=0.0
|
||||
SweetFX Defog Color Green Interior Night=0.0
|
||||
SweetFX Defog Color Blue Interior Night=1.0
|
||||
SweetFX Defog Color Red Interior Day=0.0
|
||||
SweetFX Defog Color Green Interior Day=0.0
|
||||
SweetFX Defog Color Blue Interior Day=1.0
|
||||
Vanilla Tint Contrast=1.11
|
||||
Vanilla Tint Strength=1.0
|
||||
Vanilla Vibrance Contrast=1.16
|
||||
Vanilla Vibrance Strength=1.0
|
||||
Enable Technicolor=true
|
||||
Technicolor Blend=0.5
|
||||
11
enbseries/enbeffectprepass.fx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
enbeffectprepass.fx : MariENB pre-pass filters.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* separate for easier maintenance */
|
||||
#include "menbglobaldefs.fx"
|
||||
#include "menbprepasssettings.fx"
|
||||
#include "menbprepassinternals.fx"
|
||||
#include "menbprepassfilters.fx"
|
||||
178
enbseries/enbeffectprepass.fx.ini
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
[ENBEFFECTPREPASS.FX]
|
||||
TECHNIQUE=0
|
||||
Fixed Resolution Width=1920
|
||||
Fixed Resolution Height=1080
|
||||
Depth Cutoff=999999.0
|
||||
Near Z=0.05
|
||||
Far Z=3098.0
|
||||
Distortion Chromatic Aberration=27.469999
|
||||
Enable Underwater=true
|
||||
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
|
||||
Underwater Zoom=0.15
|
||||
Always Underwater=false
|
||||
Enable Hot Air Refraction=true
|
||||
Heat Texture Size=8.16
|
||||
Heat Speed=0.36
|
||||
Heat Fade Contrast=231.910004
|
||||
Heat Fade Intensity=0.72
|
||||
Heat Fade Offset=-0.61
|
||||
Heat Intensity=1.04
|
||||
Heat Contrast=1.18
|
||||
Heat Time-of-day Contrast=7.73
|
||||
Heat Always Enable=false
|
||||
Enable Screen Frost=false
|
||||
Frost Contrast=1.08
|
||||
Frost Strength=0.04
|
||||
Frost Radial Contrast=0.87
|
||||
Frost Radial Intensity=1.11
|
||||
Frost Radial Offset=-0.93
|
||||
Frost Texture Blend=3.79
|
||||
Frost Texture Blend Contrast=4.56
|
||||
Frost Texture Size=1.0
|
||||
Frost Indoor Factor=0.0
|
||||
Frost Night Factor=0.5
|
||||
Frost Always Enable=false
|
||||
Enable Focus Triangle=true
|
||||
Display Focus Points=false
|
||||
Enable Manual Focus=false
|
||||
Manual Focus Depth=1.0
|
||||
Focus Point Center X=0.5
|
||||
Focus Point Center Y=0.5
|
||||
Focus Triangle Angle=0.5
|
||||
Focus Triangle Radius Night=6.0
|
||||
Focus Triangle Radius Day=10.0
|
||||
Focus Triangle Radius Interior Night=4.0
|
||||
Focus Triangle Radius Interior Day=4.0
|
||||
Focus Triangle Blending Night=0.4
|
||||
Focus Triangle Blending Day=0.3
|
||||
Focus Triangle Blending Interior Night=0.5
|
||||
Focus Triangle Blending Interior Day=0.5
|
||||
Focus Maximum Depth Night=990.349976
|
||||
Focus Maximum Depth Day=994.340027
|
||||
Focus Maximum Depth Interior Night=984.919983
|
||||
Focus Maximum Depth Interior Day=984.919983
|
||||
DOF Intensity Night=481.829987
|
||||
DOF Intensity Day=449.019989
|
||||
DOF Intensity Interior Night=496.119995
|
||||
DOF Intensity Interior Day=496.119995
|
||||
DOF Contrast Night=2.42
|
||||
DOF Contrast Day=2.9
|
||||
DOF Contrast Interior Night=2.62
|
||||
DOF Contrast Interior Day=2.62
|
||||
DOF Shift Night=0.0
|
||||
DOF Shift Day=0.0
|
||||
DOF Shift Interior Night=0.0
|
||||
DOF Shift Interior Day=0.0
|
||||
DOF Fixed Focus Intensity Night=1.0
|
||||
DOF Fixed Focus Intensity Day=1.0
|
||||
DOF Fixed Focus Intensity Interior Night=1.0
|
||||
DOF Fixed Focus Intensity Interior Day=1.0
|
||||
DOF Fixed Focus Contrast Night=1.0
|
||||
DOF Fixed Focus Contrast Day=1.0
|
||||
DOF Fixed Focus Contrast Interior Night=1.0
|
||||
DOF Fixed Focus Contrast Interior Day=1.0
|
||||
DOF Fixed Focus Shift Night=0.0
|
||||
DOF Fixed Focus Shift Day=0.0
|
||||
DOF Fixed Focus Shift Interior Night=0.0
|
||||
DOF Fixed Focus Shift Interior Day=0.0
|
||||
DOF Fixed Focus Blend Night=0.0
|
||||
DOF Fixed Focus Blend Day=0.0
|
||||
DOF Fixed Focus Blend Interior Night=0.0
|
||||
DOF Fixed Focus Blend Interior Day=0.0
|
||||
DOF Fixed Unfocus Intensity Night=1.29
|
||||
DOF Fixed Unfocus Intensity Day=1.23
|
||||
DOF Fixed Unfocus Intensity Interior Night=1.18
|
||||
DOF Fixed Unfocus Intensity Interior Day=1.18
|
||||
DOF Fixed Unfocus Contrast Night=229.100006
|
||||
DOF Fixed Unfocus Contrast Day=324.540009
|
||||
DOF Fixed Unfocus Contrast Interior Night=188.509995
|
||||
DOF Fixed Unfocus Contrast Interior Day=188.509995
|
||||
DOF Fixed Unfocus Shift Night=-1.02
|
||||
DOF Fixed Unfocus Shift Day=-1.07
|
||||
DOF Fixed Unfocus Shift Interior Night=-1.11
|
||||
DOF Fixed Unfocus Shift Interior Day=-1.11
|
||||
DOF Fixed Unfocus Blend Night=1.0
|
||||
DOF Fixed Unfocus Blend Day=1.0
|
||||
DOF Fixed Unfocus Blend Interior Night=1.0
|
||||
DOF Fixed Unfocus Blend Interior Day=1.0
|
||||
DOF Fixed Use Cutoff=false
|
||||
Disable DOF=false
|
||||
DOF Gather Blur Radius=12.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 Night=2.0
|
||||
Edgevision Fade Contrast Interior Day=2.0
|
||||
Edgevision Fade Intensity Night=500.0
|
||||
Edgevision Fade Intensity Day=500.0
|
||||
Edgevision Fade Intensity Interior Night=500.0
|
||||
Edgevision Fade Intensity Interior Day=500.0
|
||||
Edgevision Contrast=0.25
|
||||
Edgevision Intensity=4.0
|
||||
Edgevision Radius=1.0
|
||||
Enable SSAO=false
|
||||
SSAO Radius=0.05
|
||||
SSAO Noise=0
|
||||
SSAO Fade Contrast Night=0.48
|
||||
SSAO Fade Contrast Day=0.45
|
||||
SSAO Fade Contrast Interior Night=0.43
|
||||
SSAO Fade Contrast Interior Day=0.43
|
||||
SSAO Fade Intensity Night=1.343
|
||||
SSAO Fade Intensity Day=1.53
|
||||
SSAO Fade Intensity Interior Night=1.41
|
||||
SSAO Fade Intensity Interior Day=1.41
|
||||
SSAO Intensity=1.25
|
||||
SSAO Contrast=0.65
|
||||
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
|
||||
Sharpen Enable=true
|
||||
Sharpen Radius=0.8
|
||||
Sharpen Clamp=0.12
|
||||
Sharpen Blending=6.0
|
||||
DOF Bilateral Factor=20.0
|
||||
DOF Blur Radius=8.0
|
||||
DOF Minimum Blur=0.01
|
||||
Focus Mode=1
|
||||
Enable DOF Fog=false
|
||||
DOF Fog Intensity Night=2.0
|
||||
DOF Fog Intensity Day=2.0
|
||||
DOF Fog Intensity Interior Night=2.0
|
||||
DOF Fog Intensity Interior Day=2.0
|
||||
DOF Fog Contrast Night=1000.0
|
||||
DOF Fog Contrast Day=1000.0
|
||||
DOF Fog Contrast Interior Night=1000.0
|
||||
DOF Fog Contrast Interior Day=1000.0
|
||||
DOF Fog Shift Night=0.0
|
||||
DOF Fog Shift Day=0.0
|
||||
DOF Fog Shift Interior Night=0.0
|
||||
DOF Fog Shift Interior Day=0.0
|
||||
DOF Fog Blend Night=0.0
|
||||
DOF Fog Blend Day=0.0
|
||||
DOF Fog Blend Interior Night=0.0
|
||||
DOF Fog Blend Interior Day=0.0
|
||||
Use Only Fixed DOF=false
|
||||
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
|
||||
DOF Fixed Focus Depth=0.0
|
||||
DOF Fixed Focus Cap=1.0
|
||||
DOF Fixed Unfocus Depth=0.0
|
||||
57
enbseries/enblens.fx
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
enblens.fx : MariENB Lens filters.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
VS_OUTPUT_POST VS_Dummy( VS_INPUT_POST IN )
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
OUT.vpos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
|
||||
OUT.txcoord0.xy = IN.txcoord0.xy;
|
||||
return OUT;
|
||||
}
|
||||
float4 PS_Dummy( VS_OUTPUT_POST In ) : COLOR
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
technique Draw
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Dummy();
|
||||
PixelShader = compile ps_3_0 PS_Dummy();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SeparateAlphaBlendEnable = FALSE;
|
||||
SRGBWriteEnable = FALSE;
|
||||
}
|
||||
}
|
||||
technique LensPostPass
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Dummy();
|
||||
PixelShader = compile ps_3_0 PS_Dummy();
|
||||
AlphaBlendEnable = TRUE;
|
||||
SrcBlend = ONE;
|
||||
DestBlend = ONE;
|
||||
ColorWriteEnable = RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SeparateAlphaBlendEnable = FALSE;
|
||||
SRGBWriteEnable = FALSE;
|
||||
}
|
||||
}
|
||||
2
enbseries/enblens.fx.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[ENBLENS.FX]
|
||||
TECHNIQUE=0
|
||||
BIN
enbseries/enbpalette.bmp
Normal file
|
After Width: | Height: | Size: 192 KiB |
BIN
enbseries/enbraindrops.tga
Normal file
|
After Width: | Height: | Size: 4 KiB |
49
enbseries/enbsunsprite.fx
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
enbsunsprite.fx : MariENB sun sprite filters.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* This shader intentionally does nothing */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord : TEXCOORD0;
|
||||
};
|
||||
VS_OUTPUT_POST VS_Dummy( VS_INPUT_POST IN )
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
float4 pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
|
||||
OUT.vpos = pos;
|
||||
OUT.txcoord.xy = IN.txcoord.xy;
|
||||
return OUT;
|
||||
}
|
||||
float4 PS_Dummy( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
technique Draw
|
||||
{
|
||||
pass P0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Dummy();
|
||||
PixelShader = compile ps_3_0 PS_Dummy();
|
||||
AlphaBlendEnable = TRUE;
|
||||
SrcBlend = ONE;
|
||||
DestBlend = ONE;
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
2
enbseries/enbsunsprite.fx.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[ENBSUNSPRITE.FX]
|
||||
TECHNIQUE=0
|
||||
238
enbseries/menbbloomfilters.fx
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
/*
|
||||
menbbloomfilters.fx : MariENB bloom shader routines.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
VS_OUTPUT_POST VS_Bloom(VS_INPUT_POST IN)
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
float4 pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1);
|
||||
OUT.vpos = pos;
|
||||
OUT.txcoord0.xy = IN.txcoord0.xy+TempParameters.xy;
|
||||
return OUT;
|
||||
}
|
||||
/* 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<c.b)?float4(c.bg,K.wz):float4(c.gb,K.xy);
|
||||
float4 q = (c.r<p.x)?float4(p.xyw,c.r):float4(c.r,p.yzx);
|
||||
float d = q.x-min(q.w,q.y);
|
||||
float e = 1.0e-10;
|
||||
return float3(abs(q.z+(q.w-q.y)/(6.0*d+e)),d/(q.x+e),q.x);
|
||||
}
|
||||
float3 hsv2rgb( float3 c )
|
||||
{
|
||||
float4 K = float4(1.0,2.0/3.0,1.0/3.0,3.0);
|
||||
float3 p = abs(frac(c.x+K.xyz)*6.0-K.w);
|
||||
return c.z*lerp(K.x,saturate(p-K.x),c.y);
|
||||
}
|
||||
/* pre-pass bloom texture preparation */
|
||||
float4 PS_BloomPrePass(VS_OUTPUT_POST In) : COLOR
|
||||
{
|
||||
float2 coord = In.txcoord0.xy;
|
||||
float bloomcap = tod_ind(bloomcap);
|
||||
float bloombump = tod_ind(bloombump);
|
||||
float bloompower = tod_ind(bloompower);
|
||||
float bloomsaturation = tod_ind(bloomsaturation);
|
||||
float bloomintensity = tod_ind(bloomintensity);
|
||||
float4 res = tex2D(SamplerBloomC1,coord);
|
||||
float3 hsv = rgb2hsv(res.rgb);
|
||||
if ( hsv.z > bloomcap ) hsv.z = bloomcap;
|
||||
res.rgb = hsv2rgb(hsv);
|
||||
res = max(res+bloombump,0);
|
||||
hsv = rgb2hsv(res.rgb);
|
||||
hsv.y = clamp(hsv.y*bloomsaturation,0.0,1.0);
|
||||
hsv.z = pow(hsv.z,bloompower);
|
||||
res.rgb = hsv2rgb(hsv)*bloomintensity;
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
/* Horizontal blur step goes here */
|
||||
float4 PS_BloomTexture1(VS_OUTPUT_POST In) : COLOR
|
||||
{
|
||||
float2 coord = In.txcoord0.xy;
|
||||
float4 res = float4(0,0,0,0);
|
||||
int i;
|
||||
float sum = 0;
|
||||
float inc = TempParameters.z*bloomradiusx;
|
||||
float2 pp;
|
||||
[unroll] for ( i=-7; i<=7; i++ )
|
||||
{
|
||||
pp = coord+float2(i,0)*inc;
|
||||
res += gauss8[abs(i)]*tex2D(SamplerBloom1,pp);
|
||||
sum += ((pp.x>=0)&&(pp.x<1))?gauss8[abs(i)]:0;
|
||||
}
|
||||
res *= 1.0/sum;
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
/* This is the vertical step */
|
||||
float4 PS_BloomTexture2(VS_OUTPUT_POST In) : COLOR
|
||||
{
|
||||
float2 coord = In.txcoord0.xy;
|
||||
float4 res = float4(0,0,0,0), base = tex2D(SamplerBloom5,coord);
|
||||
int i;
|
||||
float sum = 0;
|
||||
float inc = TempParameters.z*bloomradiusy;
|
||||
float2 pp;
|
||||
[unroll] for ( i=-7; i<=7; i++ )
|
||||
{
|
||||
pp = coord+float2(0,i)*inc;
|
||||
res += gauss8[abs(i)]*tex2D(SamplerBloom1,pp);
|
||||
sum += ((pp.y>=0)&&(pp.y<1))?gauss8[abs(i)]:0;
|
||||
}
|
||||
res *= 1.0/sum;
|
||||
/* blue shift */
|
||||
float3 blu_n = float3(blu_n_r,blu_n_g,blu_n_b);
|
||||
float3 blu_d = float3(blu_d_r,blu_d_g,blu_d_b);
|
||||
float3 blu_in = float3(blu_in_r,blu_in_g,blu_in_b);
|
||||
float3 blu_id = float3(blu_id_r,blu_id_g,blu_id_b);
|
||||
float3 blu = tod_ind(blu);
|
||||
float bsi = tod_ind(bsi);
|
||||
float lm = clamp(0,1,luminance(res.rgb)-luminance(base.rgb))*bsi;
|
||||
lm = lm/(1.0+lm);
|
||||
lm *= 1.0-saturate((TempParameters.w-1.0)*bslp);
|
||||
blu = saturate(blu+(TempParameters.w-1.0)*bsbp);
|
||||
res.rgb *= lerp(1.0,blu,lm);
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
/*
|
||||
Horizontal anamorphic bloom step. This is somewhat realistic except that
|
||||
most lenses (e.g.: glasses, both convex and concave) cause VERTICAL
|
||||
anamorphic bloom due to their curvature. However since ENB doesn't let me
|
||||
switch the order of the blurring, it's impossible to do so. I don't really
|
||||
have a problem with that, this also looks nice.
|
||||
|
||||
I've seen that some ENBs do something almost-maybe-possibly-slightly-similar
|
||||
they call "anamorphic lens flare", which has an ass-backwards-retarded
|
||||
implementation, which serves to showcase their incompetence. Rather than use
|
||||
a single-axis massive-scale blur like I do, they simply awkwardly stretch
|
||||
sampling coordinates along one axis, which doesn't even have the same effect
|
||||
as it just makes it so bright areas ONLY at the very middle of the screen
|
||||
produces sharp bright lines extending towards the sides.
|
||||
*/
|
||||
float4 PS_AnamPass(VS_OUTPUT_POST In) : COLOR
|
||||
{
|
||||
if ( !alfenable ) return float4(0,0,0,1);
|
||||
float2 coord = In.txcoord0.xy;
|
||||
float4 res = float4(0,0,0,0), base = tex2D(SamplerBloom5,coord);
|
||||
int i;
|
||||
float sum = 0;
|
||||
float inc = TempParameters.z*bloomradiusx*flen;
|
||||
float2 pp;
|
||||
[unroll] for ( i=-79; i<=79; i++ )
|
||||
{
|
||||
pp = coord+float2(i,0)*inc;
|
||||
res += gauss80[abs(i)]*tex2D(SamplerBloom1,pp);
|
||||
sum += ((pp.x>=0)&&(pp.x<1))?gauss80[abs(i)]:0;
|
||||
}
|
||||
res *= 1.0/sum;
|
||||
/* blue shift */
|
||||
float3 flu_n = float3(flu_n_r,flu_n_g,flu_n_b);
|
||||
float3 flu_d = float3(flu_d_r,flu_d_g,flu_d_b);
|
||||
float3 flu_in = float3(flu_in_r,flu_in_g,flu_in_b);
|
||||
float3 flu_id = float3(flu_id_r,flu_id_g,flu_id_b);
|
||||
float3 flu = tod_ind(flu);
|
||||
float fsi = tod_ind(fsi);
|
||||
float lm = clamp(0,1,luminance(res.rgb)-luminance(base.rgb))*fsi;
|
||||
lm = lm/(1.0+lm);
|
||||
float fbl = tod_ind(fbl);
|
||||
float fpw = tod_ind(fpw);
|
||||
res.rgb *= lerp(1.0,flu,lm);
|
||||
res.rgb = pow(max(0,res.rgb),fpw)*fbl;
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
/* end pass, mix it all up */
|
||||
float4 PS_BloomPostPass(VS_OUTPUT_POST In) : COLOR
|
||||
{
|
||||
float2 coord = In.txcoord0.xy;
|
||||
float4 res = float4(0,0,0,0);
|
||||
res += bloommix1*tex2D(SamplerBloomC1,coord); // P1
|
||||
res += bloommix2*tex2D(SamplerBloomC2,coord); // P2
|
||||
res += bloommix3*tex2D(SamplerBloomC3,coord); // P3
|
||||
res += bloommix4*tex2D(SamplerBloomC4,coord); // P4
|
||||
res += bloommix5*tex2D(SamplerBloomC5,coord); // Prepass
|
||||
res += bloommix6*tex2D(SamplerBloomC6,coord); // Base
|
||||
res += bloommix7*tex2D(SamplerBloomC7,coord); // P5
|
||||
res += bloommix8*tex2D(SamplerBloomC8,coord); // P6
|
||||
res.rgb /= 6.0;
|
||||
res.rgb = clamp(res.rgb,0,32768);
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
/* techniques */
|
||||
technique BloomPrePass
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Bloom();
|
||||
PixelShader = compile ps_3_0 PS_BloomPrePass();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique BloomTexture1
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Bloom();
|
||||
PixelShader = compile ps_3_0 PS_BloomTexture1();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
pass p1
|
||||
{
|
||||
AlphaBlendEnable = true;
|
||||
SrcBlend = One;
|
||||
DestBlend = One;
|
||||
PixelShader = compile ps_3_0 PS_AnamPass();
|
||||
}
|
||||
}
|
||||
technique BloomTexture2
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Bloom();
|
||||
PixelShader = compile ps_3_0 PS_BloomTexture2();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique BloomPostPass
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Bloom();
|
||||
PixelShader = compile ps_3_0 PS_BloomPostPass();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
CullMode = NONE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
AlphaTestEnable = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
270
enbseries/menbbloominternals.fx
Normal file
|
|
@ -0,0 +1,270 @@
|
|||
/*
|
||||
menbbloominternals.fx : MariENB bloom internal variables.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* mathematical constants */
|
||||
static const float pi = 3.1415926535898;
|
||||
/* 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
|
||||
};
|
||||
/* standard stuff */
|
||||
float4 ScreenSize;
|
||||
float4 TempParameters;
|
||||
float4 BloomParameters;
|
||||
float ENightDayFactor;
|
||||
float EInteriorFactor;
|
||||
/* samplers and textures */
|
||||
texture2D texBloom1;
|
||||
texture2D texBloom2;
|
||||
texture2D texBloom3;
|
||||
texture2D texBloom4;
|
||||
texture2D texBloom5;
|
||||
texture2D texBloom6;
|
||||
texture2D texBloom7;
|
||||
texture2D texBloom8;
|
||||
sampler2D SamplerBloom1 = sampler_state
|
||||
{
|
||||
Texture = <texBloom1>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom2 = sampler_state
|
||||
{
|
||||
Texture = <texBloom2>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom3 = sampler_state
|
||||
{
|
||||
Texture = <texBloom3>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom4 = sampler_state
|
||||
{
|
||||
Texture = <texBloom4>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom5 = sampler_state
|
||||
{
|
||||
Texture = <texBloom5>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom6 = sampler_state
|
||||
{
|
||||
Texture = <texBloom6>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom7 = sampler_state
|
||||
{
|
||||
Texture = <texBloom7>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloom8 = sampler_state
|
||||
{
|
||||
Texture = <texBloom8>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloomC1 = sampler_state
|
||||
{
|
||||
Texture = <texBloom1>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloomC2 = sampler_state
|
||||
{
|
||||
Texture = <texBloom2>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloomC3 = sampler_state
|
||||
{
|
||||
Texture = <texBloom3>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloomC4 = sampler_state
|
||||
{
|
||||
Texture = <texBloom4>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloomC5 = sampler_state
|
||||
{
|
||||
Texture = <texBloom5>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloomC6 = sampler_state
|
||||
{
|
||||
Texture = <texBloom6>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloomC7 = sampler_state
|
||||
{
|
||||
Texture = <texBloom7>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerBloomC8 = sampler_state
|
||||
{
|
||||
Texture = <texBloom8>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
/* whatever */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
418
enbseries/menbbloomsettings.fx
Normal file
|
|
@ -0,0 +1,418 @@
|
|||
/*
|
||||
menbbloomsettings.fx : MariENB bloom user-tweakable variables.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
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_in
|
||||
<
|
||||
string UIName = "Bloom Intensity Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float bloomintensity_id
|
||||
<
|
||||
string UIName = "Bloom Intensity Interior Day";
|
||||
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_in
|
||||
<
|
||||
string UIName = "Bloom Contrast Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float bloompower_id
|
||||
<
|
||||
string UIName = "Bloom Contrast Interior Day";
|
||||
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_in
|
||||
<
|
||||
string UIName = "Bloom Saturation Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.75};
|
||||
float bloomsaturation_id
|
||||
<
|
||||
string UIName = "Bloom Saturation Interior Day";
|
||||
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_in
|
||||
<
|
||||
string UIName = "Bloom Offset Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
> = {-0.5};
|
||||
float bloombump_id
|
||||
<
|
||||
string UIName = "Bloom Offset Interior Day";
|
||||
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_in
|
||||
<
|
||||
string UIName = "Bloom Intensity Cap Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
> = {20.0};
|
||||
float bloomcap_id
|
||||
<
|
||||
string UIName = "Bloom Intensity Cap Interior Day";
|
||||
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};
|
||||
/* bloom tint/blueshift parameters */
|
||||
float blu_n_r
|
||||
<
|
||||
string UIName = "Blue Shift Night Red";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.2};
|
||||
float blu_n_g
|
||||
<
|
||||
string UIName = "Blue Shift Night Green";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.6};
|
||||
float blu_n_b
|
||||
<
|
||||
string UIName = "Blue Shift Night Blue";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float blu_d_r
|
||||
<
|
||||
string UIName = "Blue Shift Day Red";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.2};
|
||||
float blu_d_g
|
||||
<
|
||||
string UIName = "Blue Shift Day Green";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.6};
|
||||
float blu_d_b
|
||||
<
|
||||
string UIName = "Blue Shift Day Blue";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float blu_in_r
|
||||
<
|
||||
string UIName = "Blue Shift Interior Night Red";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.2};
|
||||
float blu_in_g
|
||||
<
|
||||
string UIName = "Blue Shift Interior Night Green";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.6};
|
||||
float blu_in_b
|
||||
<
|
||||
string UIName = "Blue Shift Interior Night Blue";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float blu_id_r
|
||||
<
|
||||
string UIName = "Blue Shift Interior Day Red";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.2};
|
||||
float blu_id_g
|
||||
<
|
||||
string UIName = "Blue Shift Interior Day Green";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.6};
|
||||
float blu_id_b
|
||||
<
|
||||
string UIName = "Blue Shift Interior Day Blue";
|
||||
string UIWidget = "Spinner";
|
||||
> = {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_in
|
||||
<
|
||||
string UIName = "Blue Shift Intensity Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {0.5};
|
||||
float bsi_id
|
||||
<
|
||||
string UIName = "Blue Shift Intensity Interior Day";
|
||||
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_in
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blend Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {0.75};
|
||||
float fbl_id
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blend Interior Day";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {0.75};
|
||||
float flu_n_r
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Night Red";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.4};
|
||||
float flu_n_g
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Night Green";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.1};
|
||||
float flu_n_b
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Night Blue";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float flu_d_r
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Day Red";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.5};
|
||||
float flu_d_g
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Day Green";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.1};
|
||||
float flu_d_b
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Day Blue";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float flu_in_r
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Interior Night Red";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.5};
|
||||
float flu_in_g
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Interior Night Green";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.1};
|
||||
float flu_in_b
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Interior Night Blue";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float flu_id_r
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Interior Day Red";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.5};
|
||||
float flu_id_g
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Interior Day Green";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.1};
|
||||
float flu_id_b
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Interior Day Blue";
|
||||
string UIWidget = "Spinner";
|
||||
> = {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_in
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float fsi_id
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Blue Shift Interior Day";
|
||||
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_in
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Contrast Interior Night";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {1.0};
|
||||
float fpw_id
|
||||
<
|
||||
string UIName = "Anamorphic Bloom Contrast Interior Day";
|
||||
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 bloommix7
|
||||
<
|
||||
string UIName = "Bloom Pass 7 Blend";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.95};
|
||||
float bloommix8
|
||||
<
|
||||
string UIName = "Bloom Pass 8 Blend";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
float bloommix5
|
||||
<
|
||||
string UIName = "Bloom Prepass Blend";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float bloommix6
|
||||
<
|
||||
string UIName = "Bloom Base Blend";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
BIN
enbseries/menbcgalut.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
716
enbseries/menbeffectfilters.fx
Normal file
|
|
@ -0,0 +1,716 @@
|
|||
/*
|
||||
menbeffectfilters.fx : MariENB base shader routines.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
VS_OUTPUT_POST VS_Pass( VS_INPUT_POST IN )
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
OUT.vpos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
|
||||
OUT.txcoord0.xy = IN.txcoord0.xy;
|
||||
return OUT;
|
||||
}
|
||||
#ifdef FALLOUT
|
||||
float4 _c1 : register(c1);
|
||||
float4 _c2 : register(c2);
|
||||
float4 _c19 : register(c19);
|
||||
float4 _c20 : register(c20);
|
||||
float4 _c22 : register(c22);
|
||||
#define _r1 _c1
|
||||
#define _r2 _c2
|
||||
#define _r3 _c19
|
||||
#define _r4 _c20
|
||||
#define _r5 _c22
|
||||
/*
|
||||
FALLOUT REGISTERS
|
||||
|
||||
r1 (c1): r2 (c2): r3 (c19):
|
||||
x -> adapt max x -> unused x -> vibrance
|
||||
y -> unused y -> unused y -> balancer
|
||||
z -> unused z -> bloom mix z -> multiplier 1
|
||||
w -> unused w -> unused w -> multiplier 2
|
||||
|
||||
r4 (c20): r5 (c22):
|
||||
x -> tint red x -> fade red
|
||||
y -> tint green y -> fade green
|
||||
z -> tint blue z -> fade blue
|
||||
w -> tint value w -> fade value
|
||||
*/
|
||||
#else
|
||||
float4 _c1 : register(c1);
|
||||
float4 _c2 : register(c2);
|
||||
float4 _c3 : register(c3);
|
||||
float4 _c4 : register(c4);
|
||||
float4 _c5 : register(c5);
|
||||
#define _r1 _c1
|
||||
#define _r2 _c2
|
||||
#define _r3 _c3
|
||||
#define _r4 _c4
|
||||
#define _r5 _c5
|
||||
/*
|
||||
SKYRIM REGISTERS
|
||||
|
||||
r1 (c1): r2 (c2): r3 (c3):
|
||||
x -> adapt max x -> bloom bump (?) x -> vibrance
|
||||
y -> adapt min y -> bloom mult (?) y -> unused
|
||||
z -> unused z -> unused z -> multiplier 1
|
||||
w -> unused w -> unused w -> multiplier 2
|
||||
|
||||
r4 (c4): r5 (c5):
|
||||
x -> tint red x -> fade red
|
||||
y -> tint green y -> fade green
|
||||
z -> tint blue z -> fade blue
|
||||
w -> tint value w -> fade value
|
||||
*/
|
||||
#endif
|
||||
/* 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<c.b)?float4(c.bg,K.wz):float4(c.gb,K.xy);
|
||||
float4 q = (c.r<p.x)?float4(p.xyw,c.r):float4(c.r,p.yzx);
|
||||
float d = q.x-min(q.w,q.y);
|
||||
float e = 1.0e-10;
|
||||
return float3(abs(q.z+(q.w-q.y)/(6.0*d+e)),d/(q.x+e),q.x);
|
||||
}
|
||||
float3 hsv2rgb( float3 c )
|
||||
{
|
||||
float4 K = float4(1.0,2.0/3.0,1.0/3.0,3.0);
|
||||
float3 p = abs(frac(c.x+K.xyz)*6.0-K.w);
|
||||
return c.z*lerp(K.x,saturate(p-K.x),c.y);
|
||||
}
|
||||
/* "eye adaptation" */
|
||||
float3 Adaptation( float3 res )
|
||||
{
|
||||
float4 adapt = tex2D(_s4,0.5);
|
||||
float adapts, amin, amax;
|
||||
adapts = clamp(luminance(adapt.rgb),0.0,50.0);
|
||||
amin = tod_ind(amin);
|
||||
amax = tod_ind(amax);
|
||||
return res/(adapts*amax+amin);
|
||||
}
|
||||
/* Uncharted 2 tone mapping */
|
||||
float3 Uch( float3 res )
|
||||
{
|
||||
float A = tod_ind(unA);
|
||||
float B = tod_ind(unB);
|
||||
float C = tod_ind(unC);
|
||||
float D = tod_ind(unD);
|
||||
float E = tod_ind(unE);
|
||||
float F = tod_ind(unF);
|
||||
return ((res*(A*res+C*B)+D*E)/(res*(A*res+B)+D*F))-E/F;
|
||||
}
|
||||
float3 TonemapUC2( float3 res )
|
||||
{
|
||||
float W = tod_ind(unW);
|
||||
float3 ucol = Uch(res);
|
||||
float3 uwhite = Uch(W);
|
||||
return pow(max(ucol/uwhite,0.0),1.0/2.2);
|
||||
}
|
||||
/* Ugly old Reinhard tone mapping */
|
||||
float3 TonemapReinhard( float3 res )
|
||||
{
|
||||
float3 tcol = res/(1+res);
|
||||
return pow(max(tcol,0.0),1.0/2.2);
|
||||
}
|
||||
/* That thing used in watch_dogs */
|
||||
float3 TonemapHaarmPeterDuiker( float3 res )
|
||||
{
|
||||
float3 ld = 0.002;
|
||||
float linReference = 0.18;
|
||||
float logReference = 444;
|
||||
float logGamma = 0.45;
|
||||
float3 LogColor;
|
||||
LogColor.rgb = (log10(0.4*res/linReference)/ld*logGamma+logReference)/1023.f;
|
||||
LogColor.rgb = saturate(LogColor.rgb);
|
||||
float FilmLutWidth = 256;
|
||||
float Padding = .5/FilmLutWidth;
|
||||
float3 retColor;
|
||||
retColor.r = tex2D(SamplerTonemap,float2(lerp(Padding,1-Padding,LogColor.r),.5)).x;
|
||||
retColor.g = tex2D(SamplerTonemap,float2(lerp(Padding,1-Padding,LogColor.g),.5)).x;
|
||||
retColor.b = tex2D(SamplerTonemap,float2(lerp(Padding,1-Padding,LogColor.b),.5)).x;
|
||||
return retColor;
|
||||
}
|
||||
/* Practically nothing */
|
||||
float3 TonemapLinear( float3 res )
|
||||
{
|
||||
return pow(max(res,0.0),1.0/2.2);
|
||||
}
|
||||
/* People somehow call this one realistic */
|
||||
float3 TonemapHejlDawson( float3 res )
|
||||
{
|
||||
float3 x = max(0.0,res-0.004);
|
||||
return (x*(6.2*x+.5))/(x*(6.2*x+1.7)+0.06);
|
||||
}
|
||||
/* The standard tonemap from sweetfx */
|
||||
float3 TonemapSFX( float3 res )
|
||||
{
|
||||
float Gamma = tod_ind(sfxgamma);
|
||||
float Exposure = tod_ind(sfxexposure);
|
||||
float Saturation = tod_ind(sfxsaturation);
|
||||
float Bleach = tod_ind(sfxbleach);
|
||||
float Defog = tod_ind(sfxdefog);
|
||||
float3 FogColor = float3(tod_ind(sfxfogcolor_r),tod_ind(sfxfogcolor_g),
|
||||
tod_ind(sfxfogcolor_b));
|
||||
float3 tcol = res;
|
||||
tcol = saturate(tcol-Defog*FogColor*2.55);
|
||||
tcol *= pow(2.0,Exposure);
|
||||
tcol = pow(tcol,Gamma);
|
||||
float lum = luminance(tcol);
|
||||
float L = saturate(1.0*(lum-0.45));
|
||||
float3 A2 = Bleach*tcol;
|
||||
float3 res1 = 2.0*tcol*lum;
|
||||
float3 res2 = 1.0-2.0*(1.0-lum)*(1.0-tcol);
|
||||
float3 newc = lerp(res1,res2,L);
|
||||
float3 mixrgb = A2*newc;
|
||||
tcol += (1.0-A2)*mixrgb;
|
||||
float3 gray = dot(tcol,1.0/3.0);
|
||||
float3 diff = tcol-gray;
|
||||
return (tcol+diff*Saturation)/(1+(diff*Saturation));
|
||||
}
|
||||
float3 Tonemap( float3 res )
|
||||
{
|
||||
float3 tcol = pow(max(res,0.0),1.0/2.2);
|
||||
if ( tmapenable == -1 ) return tcol;
|
||||
res *= tod_ind(tmapexposure);
|
||||
float tblend = tod_ind(tmapblend);
|
||||
float3 mapped;
|
||||
if ( tmapenable == 5 ) mapped = TonemapSFX(res);
|
||||
else if ( tmapenable == 4 ) mapped = TonemapHaarmPeterDuiker(res);
|
||||
else if ( tmapenable == 3 ) mapped = TonemapHejlDawson(res);
|
||||
else if ( tmapenable == 2 ) mapped = TonemapUC2(res);
|
||||
else if ( tmapenable == 1 ) mapped = TonemapReinhard(res);
|
||||
else if ( tmapenable == 0 ) mapped = TonemapLinear(res);
|
||||
return lerp(tcol,mapped,tblend);
|
||||
}
|
||||
/* colour grading passes */
|
||||
float3 GradingRGB( float3 res )
|
||||
{
|
||||
float grademul_r = tod_ind(grademul_r);
|
||||
float grademul_g = tod_ind(grademul_g);
|
||||
float grademul_b = tod_ind(grademul_b);
|
||||
float gradepow_r = tod_ind(gradepow_r);
|
||||
float gradepow_g = tod_ind(gradepow_g);
|
||||
float gradepow_b = tod_ind(gradepow_b);
|
||||
float3 grademul = float3(grademul_r,grademul_g,grademul_b);
|
||||
float3 gradepow = float3(gradepow_r,gradepow_g,gradepow_b);
|
||||
return pow(max(0,res),gradepow)*grademul;
|
||||
}
|
||||
float3 GradingColorize( float3 res )
|
||||
{
|
||||
float gradecol_r = tod_ind(gradecol_r);
|
||||
float gradecol_g = tod_ind(gradecol_g);
|
||||
float gradecol_b = tod_ind(gradecol_b);
|
||||
float gradecolfact = tod_ind(gradecolfact);
|
||||
float3 gradecol = float3(gradecol_r,gradecol_g,gradecol_b);
|
||||
float tonev = luminance(res);
|
||||
float3 tonecolor = gradecol*tonev;
|
||||
return res*(1.0-gradecolfact)+tonecolor*gradecolfact;
|
||||
}
|
||||
float3 GradingHSV( float3 res )
|
||||
{
|
||||
float gradesatmul = tod_ind(gradesatmul);
|
||||
float gradesatpow = tod_ind(gradesatpow);
|
||||
float gradevalmul = tod_ind(gradevalmul);
|
||||
float gradevalpow = tod_ind(gradevalpow);
|
||||
float3 hsv = rgb2hsv(res);
|
||||
hsv.y = clamp(pow(max(0,hsv.y),gradesatpow)*gradesatmul,0.0,1.0);
|
||||
hsv.z = pow(max(0,hsv.z),gradevalpow)*gradevalmul;
|
||||
return hsv2rgb(hsv);
|
||||
}
|
||||
/* game grading filters */
|
||||
float3 GradingGame( float3 res )
|
||||
{
|
||||
/*
|
||||
Skyrim method depends explicitly on vanilla eye adaptation which is
|
||||
ass as I still CANNOT EVEN UNDERSTAND how the hell it's calculated
|
||||
just from a mess of disassembled code.
|
||||
*/
|
||||
float3 tgray = luminance(res);
|
||||
/* saturation */
|
||||
float satv = (_r3.x<0.0)?(-pow(abs(_r3.x),vsatpow)*vsatmul)
|
||||
:(pow(max(_r3.x,0.0),vsatpow)*vsatmul);
|
||||
float3 tcol = res*satv + tgray*(1.0-satv);
|
||||
tcol = lerp(res,tcol,vsatblend);
|
||||
/* tint */
|
||||
float tintv = (_r4.w<0.0)?(-pow(abs(_r4.w),vtintpow)*vtintmul)
|
||||
:(pow(max(_r4.w,0.0),vtintpow)*vtintmul);
|
||||
tcol = tintv*(tgray*_r4.rgb-tcol)+tcol;
|
||||
tcol = lerp(res,tcol,vtintblend);
|
||||
/* contrast(?) stuff */
|
||||
#ifdef FALLOUT
|
||||
float oft = _r3.y;
|
||||
#else
|
||||
/* TODO figure the offset thingy for Skyrim someday */
|
||||
float oft = 0.0;
|
||||
#endif
|
||||
tcol = max(0,(tcol*_r3.w-oft)*_r3.z+oft);
|
||||
tcol = lerp(res,tcol,vconblend);
|
||||
return tcol;
|
||||
}
|
||||
/*
|
||||
vanilla imagespace rough interpretation, just in case you don't believe
|
||||
me when I say I cannot understand
|
||||
|
||||
c6 -> 0 0 0 0
|
||||
c7 -> 0.2125 0.7154 0.0721 1
|
||||
c6 is used in a cmp instruction
|
||||
c7 xyz is in a dot product, so we can assume it's a
|
||||
luminance calculation
|
||||
c7 w is used in some mad instructions as the "add"
|
||||
component, I wonder why
|
||||
s0 is diffuse
|
||||
s1 is bloom
|
||||
s2 is adaptation
|
||||
|
||||
code
|
||||
|
||||
rcp r0.x,c2.y
|
||||
r0.x now contains 1.0/c2.y (this is one of the bloom params)
|
||||
texld r1, v0, s2
|
||||
r1 contains the adaptation texture now
|
||||
mul r0.yz, r1.xxyw, c1.y
|
||||
r0.yz for some reason contains adaptation's xxyw (wat)
|
||||
multiplied by adapt min
|
||||
rcp r0.w, r0.y
|
||||
r0.w is now 1.0/r0.y (again, I don't know what's going on)
|
||||
mul r0.z, r0.w, r0.z
|
||||
r0.z *= r0.w, really don't know where this is going since
|
||||
I SERIOUSLY have no idea what all the adaptation texture
|
||||
channels do
|
||||
|
||||
this is where adaptation ends and bloom stuff starts
|
||||
|
||||
results:
|
||||
r0.x is 1.0/c2.y
|
||||
r0.y is ... I don't even know anymore, what the heck
|
||||
r0.z is ... I'm at a loss here too
|
||||
r0.w is 1.0/r0.y and I don't even know what r0.y is anyway
|
||||
r1 still contains the adaptation texture
|
||||
|
||||
texld r1, v0, s1
|
||||
oh, here the bloom texture is loaded to r1
|
||||
mul r1.xyz,r1,c1.y
|
||||
multiplies bloom rgb by adaptation min
|
||||
dp3 r0.w, c7, r1
|
||||
r0.w contains the luminance of bloom
|
||||
mul r1.w, r0.w, r0.z
|
||||
multiplies the luminance by whatever was calculated from
|
||||
all the adaptation stuff
|
||||
mad r0.z, r0.z, r0.w, c7.w
|
||||
r0.z now contains r0.z multiplied by the original luminance
|
||||
plus one
|
||||
rcp r0.z, r0.z
|
||||
r0.z is now 1.0/r0.z
|
||||
mad r0.x, r1.w, r0.x, c7.w
|
||||
r0.x is now r1.w * r0.x + 1
|
||||
r0.x previously contained 1.0/c2.y, so this would be
|
||||
r1.w*(1.0/c2.y)+1 (no idea)
|
||||
mul r0.x,r0.x,r1.w
|
||||
r0.x changes again by multiplying it by r1.w (luminance?)
|
||||
mul r0.x,r0.z,r0.x
|
||||
here it gets multiplied by r0.z, which I HAVE NO IDEA what
|
||||
it is
|
||||
cmp r0.x,-r0.w,c6.x,r0.x
|
||||
r0.x contains c6.x if -r0.w >= 0, otherwise it's unchanged
|
||||
I'm only getting more confused at this point
|
||||
rcp r0.z,r0.w
|
||||
great, now we get the inverse of luminance to r0.z
|
||||
mul r0.z,r0.z,r0.x
|
||||
r0.z is multiplied by r0.x
|
||||
add_sat r0.x,-r0.x,c2.x
|
||||
r0.x now contains c2.x-r0.x, all of this is saturated
|
||||
I seriously don't know where this is going
|
||||
|
||||
now it finally loads the diffuse
|
||||
|
||||
results:
|
||||
r0.x is some sort of brightness modifier (?)
|
||||
r0.y never changed, and I still have no clue what it does
|
||||
r0.z is the inverse of bloom texture luminance
|
||||
r0.w is the bloom luminance
|
||||
r1 contains the bloom texture and something luminance-related
|
||||
on the alpha channel
|
||||
|
||||
texld r2, v0, s0
|
||||
loads diffuse onto r2
|
||||
mul r2.xyz, r2, c1.y
|
||||
adjusts diffuse by adaptation min
|
||||
mul r2.xyz, r0.x, r2
|
||||
adjusts the brightness again from the bloom "section"
|
||||
mad r1.xyz, r1, r0.z, r2
|
||||
adds the bloom into diffuse using r0.z as the opacity,
|
||||
r1 now contains the blend, goodbye adaptation texture
|
||||
dp3 r0.x, r1, c7
|
||||
calculates the luminance of the diffuse+bloom, put in r0.x
|
||||
mov r1.w, c7.w
|
||||
r1.w is set to one
|
||||
lrp r2, c3.x, r1, r0.x
|
||||
r2 contains lerp(r0.x,r1,c3.x)
|
||||
c3.x is a vibrance/saturation factor
|
||||
OK this is at least very simple
|
||||
mad r1, r0.x, c4, -r2
|
||||
r1 is r0.x*c4-r2
|
||||
first instruction of tint filter
|
||||
mad r1, c4.w, r1, r2
|
||||
r1 is now c4.w*r1+r2
|
||||
second instruction of tint filter
|
||||
combining the two, we get
|
||||
r1 = c4.w*(r0.x*c4-r2)+r2
|
||||
I thought tinting was a simple lerp, but nope
|
||||
mad r1, c3.w, r1, -r0.y
|
||||
r1 is c3.w*r1-r0.y
|
||||
this is one of the contrast instructions, and it's where the
|
||||
whole adaptation mess comes from, since I have NO IDEA
|
||||
what r0.y contains
|
||||
mad r0, c3.z, r1, r0.y
|
||||
r0 is now c3.z*r1+r0.y
|
||||
the second contrast instruction, really at a loss here
|
||||
whole thing would be
|
||||
r0 = c3.z*(c3.w*r1-r0.y)+r0.y
|
||||
add r1, -r0, c5
|
||||
r1 contains c5-r0
|
||||
c5 is the fade parameters
|
||||
mad oC0, c5.w, r1, r0
|
||||
the final output color is c5.w*r1+r0
|
||||
so... oC0 = c5.w*(c5-r0)+r0
|
||||
I'm confused, this is also not a simple lerp, oh well?
|
||||
|
||||
verdict: I HAVE NO IDEA WHAT r0.y CONTAINS, DAMN IT
|
||||
*/
|
||||
/* LUT colour grading */
|
||||
float3 GradingLUT( float3 res )
|
||||
{
|
||||
/*
|
||||
gross hacks were needed to "fix" the way direct3d interpolates on
|
||||
sampling, and to manually interpolate on the blue channel
|
||||
|
||||
this could be alleviated if I could have all the LUTs as 64 separate
|
||||
volume maps, but PS 3.0 has a limit of 16 samplers and I think ENB
|
||||
can't load volume maps anyway.
|
||||
*/
|
||||
#ifdef LUTMODE_LEGACY
|
||||
float3 tcol = clamp(res,0.08,0.92);
|
||||
tcol.rg = tcol.rg*0.5+0.25;
|
||||
float2 lc1 = float2(tcol.r/16.0+floor(tcol.b*16.0)/16.0,tcol.g/64.0);
|
||||
float2 lc2 = float2(tcol.r/16.0+ceil(tcol.b*16.0)/16.0,tcol.g/64.0);
|
||||
float dec = (ceil(tcol.b*16.0)==16.0)?(0.0):frac(tcol.b*16.0);
|
||||
/* night samples */
|
||||
float3 tcl1_n = tex2D(SamplerLUT,lc1+float2(0,clut_n/64.0));
|
||||
float3 tcl2_n = tex2D(SamplerLUT,lc2+float2(0,clut_n/64.0));
|
||||
/* day samples */
|
||||
float3 tcl1_d = tex2D(SamplerLUT,lc1+float2(0,clut_d/64.0));
|
||||
float3 tcl2_d = tex2D(SamplerLUT,lc2+float2(0,clut_d/64.0));
|
||||
/* interior night samples */
|
||||
float3 tcl1_in = tex2D(SamplerLUT,lc1+float2(0,clut_in/64.0));
|
||||
float3 tcl2_in = tex2D(SamplerLUT,lc2+float2(0,clut_in/64.0));
|
||||
/* interior day samples */
|
||||
float3 tcl1_id = tex2D(SamplerLUT,lc1+float2(0,clut_id/64.0));
|
||||
float3 tcl2_id = tex2D(SamplerLUT,lc2+float2(0,clut_id/64.0));
|
||||
#else
|
||||
#ifdef LUTMODE_16
|
||||
float3 tcol = clamp(res,0.08,0.92);
|
||||
tcol.rg = tcol.rg*0.5+0.25;
|
||||
float2 lc1 = float2(tcol.r,tcol.g/16.0+floor(tcol.b*16.0)/16.0);
|
||||
float2 lc2 = float2(tcol.r,tcol.g/16.0+ceil(tcol.b*16.0)/16.0);
|
||||
float dec = (ceil(tcol.b*16.0)==16.0)?(0.0):frac(tcol.b*16.0);
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
float3 tcol = clamp(res,0.02,0.98);
|
||||
tcol.rg = tcol.rg*0.5+0.25;
|
||||
float2 lc1 = float2(tcol.r,tcol.g/64.0+floor(tcol.b*64.0)/64.0);
|
||||
float2 lc2 = float2(tcol.r,tcol.g/64.0+ceil(tcol.b*64.0)/64.0);
|
||||
float dec = (ceil(tcol.b*64.0)==64.0)?(0.0):frac(tcol.b*64.0);
|
||||
#endif
|
||||
/* night samples */
|
||||
float3 tcl1_n = tex2D(SamplerLUTN,lc1);
|
||||
float3 tcl2_n = tex2D(SamplerLUTN,lc2);
|
||||
/* day samples */
|
||||
float3 tcl1_d = tex2D(SamplerLUTD,lc1);
|
||||
float3 tcl2_d = tex2D(SamplerLUTD,lc2);
|
||||
/* interior night samples */
|
||||
float3 tcl1_in = tex2D(SamplerLUTIN,lc1);
|
||||
float3 tcl2_in = tex2D(SamplerLUTIN,lc2);
|
||||
/* interior day samples */
|
||||
float3 tcl1_id = tex2D(SamplerLUTID,lc1);
|
||||
float3 tcl2_id = tex2D(SamplerLUTID,lc2);
|
||||
#endif
|
||||
float3 tcl1 = tod_ind(tcl1);
|
||||
float3 tcl2 = tod_ind(tcl2);
|
||||
tcol = lerp(tcl1,tcl2,dec);
|
||||
float lutblend = tod_ind(lutblend);
|
||||
return lerp(res,tcol,lutblend);
|
||||
}
|
||||
/* classic ENB palette colour grading, seems to kill dark and light values */
|
||||
float3 GradingPal( float3 res )
|
||||
{
|
||||
float4 adapt = tex2D(_s4,0.5);
|
||||
adapt = adapt/(adapt+1.0);
|
||||
float adapts = max(adapt.r,max(adapt.g,adapt.b));
|
||||
float3 palt;
|
||||
float2 coord;
|
||||
coord.y = adapts;
|
||||
coord.x = res.r;
|
||||
palt.r = tex2D(_s7,coord).r;
|
||||
coord.x = res.g;
|
||||
palt.g = tex2D(_s7,coord).g;
|
||||
coord.x = res.b;
|
||||
palt.b = tex2D(_s7,coord).b;
|
||||
return lerp(res,palt,palblend);
|
||||
}
|
||||
/* I think this Technicolor implementation is correct... maybe */
|
||||
float3 Technicolor( float3 res )
|
||||
{
|
||||
res = clamp(res,0.0,1.0);
|
||||
float red = 1.0-(res.r-(res.g+res.b)*0.5);
|
||||
float green = 1.0-(res.g-(res.r+res.b)*0.5);
|
||||
float blue = 1.0-(res.b-(res.r+res.g)*0.5);
|
||||
float3 tint = float3(green*blue,red*blue,red*green)*res;
|
||||
return lerp(res,res+0.5*(tint-res),techblend);
|
||||
}
|
||||
/* post-pass dithering, something apparently only my ENB does */
|
||||
float3 Dither( float3 res, float2 coord )
|
||||
{
|
||||
float2 rcoord = coord*float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float3 col = res;
|
||||
float dml = (1.0/256.0);
|
||||
if ( dither == 1 )
|
||||
col += ordered2[int(rcoord.x%2)+2*int(rcoord.y%2)]*dml-0.5*dml;
|
||||
else if ( dither == 2 )
|
||||
col += ordered8[int(rcoord.x%8)+8*int(rcoord.y%8)]*dml-0.5*dml;
|
||||
else col += checkers[int(rcoord.x%2)+2*int(rcoord.y%2)]*dml-0.5*dml;
|
||||
col = (trunc(col*256.0)/256.0);
|
||||
return col;
|
||||
}
|
||||
/* Fuzzy */
|
||||
float3 FilmGrain( float3 res, float2 coord )
|
||||
{
|
||||
float ts = Timer.x*nf;
|
||||
float2 tcs = coord.xy;
|
||||
float2 s1 = tcs+float2(0,ts);
|
||||
float2 s2 = tcs+float2(ts,0);
|
||||
float2 s3 = tcs+float2(ts,ts);
|
||||
float n1, n2, n3;
|
||||
float2 nr = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w)/256.0;
|
||||
/*
|
||||
There are two methods of making noise here:
|
||||
1. two-pass algorithm that produces a particular fuzz complete with
|
||||
a soft horizontal tear, reminiscent of old TV static.
|
||||
2. simple version that has very noticeable tiling and visible
|
||||
scrolling at low speeds
|
||||
*/
|
||||
if ( np )
|
||||
{
|
||||
n1 = tex2D(SamplerNoise2,s1*nm11*nr).r;
|
||||
n2 = tex2D(SamplerNoise2,s2*nm12*nr).g;
|
||||
n3 = tex2D(SamplerNoise2,s3*nm13*nr).b;
|
||||
s1 = tcs+float2(ts+n1*nk,n2*nk);
|
||||
s2 = tcs+float2(n2,ts+n3*nk);
|
||||
s3 = tcs+float2(ts+n3*nk,ts+n1*nk);
|
||||
n1 = tex2D(SamplerNoise2,s1*nm21*nr).r;
|
||||
n2 = tex2D(SamplerNoise2,s2*nm22*nr).g;
|
||||
n3 = tex2D(SamplerNoise2,s3*nm23*nr).b;
|
||||
}
|
||||
else
|
||||
{
|
||||
n1 = tex2D(SamplerNoise3,s1*nm1*nr).r;
|
||||
n2 = tex2D(SamplerNoise3,s2*nm2*nr).g;
|
||||
n3 = tex2D(SamplerNoise3,s3*nm3*nr).b;
|
||||
}
|
||||
float n4 = (n1+n2+n3)/3;
|
||||
float3 ng = float3(n4,n4,n4);
|
||||
float3 nc = float3(n1,n2,n3);
|
||||
float3 nt = pow(clamp(lerp(ng,nc,ns),0.0,1.0),nj);
|
||||
if ( nb == 1 ) return res+nt*ni*0.01;
|
||||
if ( nb == 2 ) return overlay(res,(nt*ni*0.01));
|
||||
if ( nb == 3 )
|
||||
{
|
||||
float bn = 1.0-saturate((res.r+res.g+res.b)/3.0);
|
||||
bn = pow(bn,bnp);
|
||||
float3 nn = saturate(nt*bn);
|
||||
return darkmask(res,(nn*ni*0.01));
|
||||
}
|
||||
return lerp(res,nt,ni*0.01);
|
||||
}
|
||||
/* MariENB shader */
|
||||
float4 PS_Mari( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord0.xy;
|
||||
float4 res = tex2D(_s0,coord);
|
||||
res.rgb = pow(max(res.rgb,0.0),2.2);
|
||||
float3 bcol = tex2D(_s3,coord).rgb*EBloomAmount;
|
||||
if ( bloomdebug ) res.rgb *= 0;
|
||||
res.rgb += bcol;
|
||||
if ( aenable ) res.rgb = Adaptation(res.rgb);
|
||||
if ( nbt && ne ) res.rgb = FilmGrain(res.rgb,coord);
|
||||
res.rgb = Tonemap(res.rgb);
|
||||
if ( vgradeenable ) res.rgb = GradingGame(res.rgb);
|
||||
if ( gradeenable1 ) res.rgb = GradingRGB(res.rgb);
|
||||
if ( colorizeafterhsv )
|
||||
{
|
||||
if ( gradeenable3 ) res.rgb = GradingHSV(res.rgb);
|
||||
if ( gradeenable2 ) res.rgb = GradingColorize(res.rgb);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( gradeenable2 ) res.rgb = GradingColorize(res.rgb);
|
||||
if ( gradeenable3 ) res.rgb = GradingHSV(res.rgb);
|
||||
}
|
||||
if ( lutenable ) res.rgb = GradingLUT(res.rgb);
|
||||
if ( palenable ) res.rgb = GradingPal(res.rgb);
|
||||
if ( techenable ) res.rgb = Technicolor(res.rgb);
|
||||
if ( !nbt && ne ) res.rgb = FilmGrain(res.rgb,coord);
|
||||
#ifdef FALLOUT
|
||||
res.rgb = _r5.rgb*_r5.a + res.rgb*(1.0-_r5.a);
|
||||
#else
|
||||
res.rgb = _r5.w*(_r5.rgb-res.rgb)+res.rgb;
|
||||
#endif
|
||||
if ( dodither ) res.rgb = Dither(res.rgb,coord);
|
||||
res.rgb = max(0,res.rgb);
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
/*
|
||||
So... let me get this straight... rather than simply switching techniques,
|
||||
Boris just compiles the program twice with and without this macro, then
|
||||
toggling "UseEffect" switches between each variation? Wat?
|
||||
*/
|
||||
#ifndef ENB_FLIPTECHNIQUE
|
||||
#ifdef FALLOUT
|
||||
technique Shader_C1DAE3F7
|
||||
#else
|
||||
technique Shader_D6EC7DD1
|
||||
#endif
|
||||
#else
|
||||
technique Shader_ORIGINALPOSTPROCESS
|
||||
#endif
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Mari();
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
ZEnable = FALSE;
|
||||
ZWriteEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
AlphaTestEnable = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
#ifndef ENB_FLIPTECHNIQUE
|
||||
technique Shader_ORIGINALPOSTPROCESS
|
||||
#else
|
||||
#ifdef FALLOUT
|
||||
technique Shader_C1DAE3F7
|
||||
#else
|
||||
technique Shader_D6EC7DD1
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
#ifdef FALLOUT
|
||||
VertexShader = asm
|
||||
{
|
||||
vs_1_1
|
||||
def c3,2,-2,0,0
|
||||
dcl_position v0
|
||||
dcl_texcoord v1
|
||||
mov r0.xy,c0
|
||||
mad oPos.xy,r0,-c3,v0
|
||||
add oT0.xy,v1,c1
|
||||
add oT1.xy,v1,c2
|
||||
mov oPos.zw,v0
|
||||
};
|
||||
#else
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
#endif
|
||||
/* >inline assembly */
|
||||
PixelShader = asm
|
||||
{
|
||||
#ifdef FALLOUT
|
||||
ps_2_x
|
||||
def c0,0.5,0,0,0
|
||||
def c3,0.298999995,0.587000012,0.114,0
|
||||
dcl t0.xy
|
||||
dcl t1.xy
|
||||
dcl_2d s0
|
||||
dcl_2d s1
|
||||
texld r0,t1,s1
|
||||
texld r1,t0,s0
|
||||
max r0.w,r1.w,c1.x
|
||||
rcp r0.w,r0.w
|
||||
mul r1.w,r0.w,c0.x
|
||||
mul r0.w,r0.w,c1.x
|
||||
mul r1.xyz,r1,r1.w
|
||||
max r2.xyz,r1,c0.y
|
||||
mad r0.xyz,r0.w,r0,r2
|
||||
dp3 r0.w,r0,c3
|
||||
lrp r1.xyz,c19.x,r0,r0.w
|
||||
mad r0.xyz,r0.w,c20,-r1
|
||||
mad r0.xyz,c20.w,r0,r1
|
||||
mad r0.xyz,c19.w,r0,-c19.y
|
||||
mad r0.xyz,c19.z,r0,c19.y
|
||||
lrp r1.xyz,c22.w,c22,r0
|
||||
mov r1.w,c2.z
|
||||
mov oC0,r1
|
||||
#else
|
||||
ps_3_0
|
||||
def c6,0,0,0,0
|
||||
def c7,0.212500006,0.715399981,0.0720999986,1
|
||||
dcl_texcoord v0.xy
|
||||
dcl_2d s0
|
||||
dcl_2d s1
|
||||
dcl_2d s2
|
||||
rcp r0.x,c2.y
|
||||
texld r1,v0,s2
|
||||
mul r0.yz,r1.xxyw,c1.y
|
||||
rcp r0.w,r0.y
|
||||
mul r0.z,r0.w,r0.z
|
||||
texld r1,v0,s1
|
||||
mul r1.xyz,r1,c1.y
|
||||
dp3 r0.w,c7,r1
|
||||
mul r1.w,r0.w,r0.z
|
||||
mad r0.z,r0.z,r0.w,c7.w
|
||||
rcp r0.z,r0.z
|
||||
mad r0.x,r1.w,r0.x,c7.w
|
||||
mul r0.x,r0.x,r1.w
|
||||
mul r0.x,r0.z,r0.x
|
||||
cmp r0.x,-r0.w,c6.x,r0.x
|
||||
rcp r0.z,r0.w
|
||||
mul r0.z,r0.z,r0.x
|
||||
add_sat r0.x,-r0.x,c2.x
|
||||
texld r2,v0,s0
|
||||
mul r2.xyz,r2,c1.y
|
||||
mul r2.xyz,r0.x,r2
|
||||
mad r1.xyz,r1,r0.z,r2
|
||||
dp3 r0.x,r1,c7
|
||||
mov r1.w,c7.w
|
||||
lrp r2,c3.x,r1,r0.x
|
||||
mad r1,r0.x,c4,-r2
|
||||
mad r1,c4.w,r1,r2
|
||||
mad r1,c3.w,r1,-r0.y
|
||||
mad r0,c3.z,r1,r0.y
|
||||
add r1,-r0,c5
|
||||
mad oC0,c5.w,r1,r0
|
||||
#endif
|
||||
};
|
||||
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
|
||||
ZEnable = FALSE;
|
||||
ZWriteEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
AlphaTestEnable = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
286
enbseries/menbeffectinternals.fx
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
/*
|
||||
menbeffectinternals.fx : MariENB base internal variables.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/*
|
||||
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/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
|
||||
|
||||
/* standard stuff */
|
||||
float4 ScreenSize;
|
||||
float4 Timer;
|
||||
float ENightDayFactor;
|
||||
float EInteriorFactor;
|
||||
float EBloomAmount;
|
||||
/* samplers and textures */
|
||||
texture2D texs0;
|
||||
texture2D texs1;
|
||||
texture2D texs2;
|
||||
texture2D texs3;
|
||||
texture2D texs4;
|
||||
texture2D texs7;
|
||||
texture2D texNoise2
|
||||
<
|
||||
string ResourceName = "menbnoise1.png";
|
||||
>;
|
||||
texture2D texNoise3
|
||||
<
|
||||
string ResourceName = "menbnoise2.png";
|
||||
>;
|
||||
#ifdef LUTMODE_LEGACY
|
||||
texture2D texLUT
|
||||
<
|
||||
string ResourceName = "menblutpreset.png";
|
||||
>;
|
||||
#else
|
||||
texture2D texLUTN
|
||||
<
|
||||
#ifdef LUTMODE_16
|
||||
string ResourceName = "menblut16_night.png";
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
string ResourceName = "menblut64_night.png";
|
||||
#endif
|
||||
>;
|
||||
texture2D texLUTD
|
||||
<
|
||||
#ifdef LUTMODE_16
|
||||
string ResourceName = "menblut16_day.png";
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
string ResourceName = "menblut64_day.png";
|
||||
#endif
|
||||
>;
|
||||
texture2D texLUTIN
|
||||
<
|
||||
#ifdef LUTMODE_16
|
||||
string ResourceName = "menblut16_interiornight.png";
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
string ResourceName = "menblut64_interiornight.png";
|
||||
#endif
|
||||
>;
|
||||
texture2D texLUTID
|
||||
<
|
||||
#ifdef LUTMODE_16
|
||||
string ResourceName = "menblut16_interiorday.png";
|
||||
#endif
|
||||
#ifdef LUTMODE_64
|
||||
string ResourceName = "menblut64_interiorday.png";
|
||||
#endif
|
||||
>;
|
||||
#endif
|
||||
texture2D texTonemap
|
||||
<
|
||||
string ResourceName = "menbfilmlut.png";
|
||||
>;
|
||||
sampler2D _s0 = sampler_state
|
||||
{
|
||||
Texture = <texs0>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s1 = sampler_state
|
||||
{
|
||||
Texture = <texs1>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s2 = sampler_state
|
||||
{
|
||||
Texture = <texs2>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s3 = sampler_state
|
||||
{
|
||||
Texture = <texs3>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s4 = sampler_state
|
||||
{
|
||||
Texture = <texs4>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D _s7 = sampler_state
|
||||
{
|
||||
Texture = <texs7>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerNoise2 = sampler_state
|
||||
{
|
||||
Texture = <texNoise2>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = POINT;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerNoise3 = sampler_state
|
||||
{
|
||||
Texture = <texNoise3>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
#ifdef LUTMODE_LEGACY
|
||||
sampler2D SamplerLUT = sampler_state
|
||||
{
|
||||
Texture = <texLUT>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
#else
|
||||
sampler2D SamplerLUTN = sampler_state
|
||||
{
|
||||
Texture = <texLUTN>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerLUTD = sampler_state
|
||||
{
|
||||
Texture = <texLUTD>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerLUTIN = sampler_state
|
||||
{
|
||||
Texture = <texLUTIN>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerLUTID = sampler_state
|
||||
{
|
||||
Texture = <texLUTID>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
#endif
|
||||
sampler2D SamplerTonemap = sampler_state
|
||||
{
|
||||
Texture = <texTonemap>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
/* whatever */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord0 : TEXCOORD0;
|
||||
};
|
||||
1074
enbseries/menbeffectsettings.fx
Normal file
BIN
enbseries/menbegalut.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
337
enbseries/menbextrafilters.fx
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
/*
|
||||
menbextrafilters.fx : MariENB extra shader routines.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
VS_OUTPUT_POST VS_Pass( VS_INPUT_POST IN )
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
OUT.vpos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
|
||||
OUT.txcoord.xy = IN.txcoord.xy;
|
||||
return OUT;
|
||||
}
|
||||
/* 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.g<c.b)?float4(c.bg,K.wz):float4(c.gb,K.xy);
|
||||
float4 q = (c.r<p.x)?float4(p.xyw,c.r):float4(c.r,p.yzx);
|
||||
float d = q.x-min(q.w,q.y);
|
||||
float e = 1.0e-10;
|
||||
return float3(abs(q.z+(q.w-q.y)/(6.0*d+e)),d/(q.x+e),q.x);
|
||||
}
|
||||
float3 hsv2rgb( float3 c )
|
||||
{
|
||||
float4 K = float4(1.0,2.0/3.0,1.0/3.0,3.0);
|
||||
float3 p = abs(frac(c.x+K.xyz)*6.0-K.w);
|
||||
return c.z*lerp(K.x,saturate(p-K.x),c.y);
|
||||
}
|
||||
/* prepass */
|
||||
float4 ReducePrepass( in float4 col, in float2 coord )
|
||||
{
|
||||
float3 hsv = rgb2hsv(col);
|
||||
hsv.y = clamp(hsv.y*bsaturation,0.0,1.0);
|
||||
hsv.z = pow(max(0,hsv.z),bgamma);
|
||||
col.rgb = hsv2rgb(saturate(hsv));
|
||||
if ( dither == 0 )
|
||||
col += bdbump+checkers[int(coord.x%2)+2*int(coord.y%2)]*bdmult;
|
||||
else if ( dither == 1 )
|
||||
col += bdbump+ordered2[int(coord.x%2)+2*int(coord.y%2)]*bdmult;
|
||||
else if ( dither == 2 )
|
||||
col += bdbump+ordered8[int(coord.x%8)+8*int(coord.y%8)]*bdmult;
|
||||
col = saturate(col);
|
||||
return col;
|
||||
}
|
||||
/*
|
||||
CGA had seven graphic modes (320x200 modes have low/high contrast versions):
|
||||
- 640x200 monochrome, which doesn't really need a palette here, as it can
|
||||
be done procedurally with minimum effort.
|
||||
- 320x200 black/cyan/magenta/white
|
||||
- 320x200 black/green/red/brown
|
||||
- 320x200 black/cyan/red/white
|
||||
*/
|
||||
float4 ReduceCGA( in float4 color, in float2 coord )
|
||||
{
|
||||
float4 dac = clamp(ReducePrepass(color,coord),0.02,0.98);
|
||||
float2 lc = float2((dac.r+cgapal)/7.0,
|
||||
dac.g/64.0+floor(dac.b*64.0)/64.0);
|
||||
return tex2D(SamplerCGA,lc);
|
||||
}
|
||||
/*
|
||||
EGA technically only had a fixed 16-colour palette, 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 = clamp(ReducePrepass(color,coord),0.02,0.98);
|
||||
float2 lc = float2((dac.r+egapal)/2.0,
|
||||
dac.g/64.0+floor(dac.b*64.0)/64.0);
|
||||
return tex2D(SamplerEGA,lc);
|
||||
}
|
||||
/* 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;
|
||||
}
|
||||
/*
|
||||
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;
|
||||
}
|
||||
/* Various VGA 256-colour palettes: Doom, Quake I, and the standard. */
|
||||
float4 ReduceVGA( in float4 color, in float2 coord )
|
||||
{
|
||||
float4 dac = clamp(ReducePrepass(color,coord),0.02,0.98);
|
||||
float2 lc = float2((dac.r+vgapal)/15.0,
|
||||
dac.g/64.0+floor(dac.b*64.0)/64.0);
|
||||
return tex2D(SamplerVGA,lc);
|
||||
}
|
||||
/* Retro rockets */
|
||||
float4 PS_Retro( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColorb,coord);
|
||||
if ( !useblock ) return res;
|
||||
float2 rresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float4 tcol;
|
||||
float2 bresl = rresl;
|
||||
if ( bresx <= 0 || bresy <= 0 ) bresl = rresl;
|
||||
else
|
||||
{
|
||||
if ( bresx <= 1.0 ) bresl.x = rresl.x*bresx;
|
||||
else bresl.x = bresx;
|
||||
if ( bresy <= 1.0 ) bresl.y = rresl.y*bresy;
|
||||
else bresl.y = bresy;
|
||||
}
|
||||
float2 ncoord = (coord-0.5)+0.5;
|
||||
ncoord = floor(ncoord*bresl)/bresl;
|
||||
ncoord += 0.5/bresl;
|
||||
if ( bresx <= 0 || bresy <= 0 ) ncoord = coord;
|
||||
tcol = tex2D(SamplerColorb,ncoord);
|
||||
if ( paltype == 0 ) res = ReduceCGA(tcol,coord*bresl);
|
||||
else if ( paltype == 1 ) res = ReduceEGA(tcol,coord*bresl);
|
||||
else if ( paltype == 2 ) res = ReduceRGB2(tcol,coord*bresl);
|
||||
else if ( paltype == 3 ) res = ReduceVGA(tcol,coord*bresl);
|
||||
else if ( paltype == 4 ) res = ReduceRGB565(tcol,coord*bresl);
|
||||
else res = tcol;
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
float4 PS_ChromaKey( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
if ( !maskenable ) return res;
|
||||
float dep = tex2D(SamplerDepth,coord).x;
|
||||
float msd = maskd;
|
||||
msd = maskd+0.01*masktiltx*(masktiltxcenter-coord.x)
|
||||
+0.01*masktilty*(masktiltycenter-coord.y);
|
||||
if ( dep > msd )
|
||||
return float4(maskr,maskg,maskb,1.0);
|
||||
return res;
|
||||
}
|
||||
/* Why am I doing this */
|
||||
float4 PS_Blur( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColor,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 += tex2D(SamplerColor,coord+ofs[i]*bof);
|
||||
res /= 17.0;
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
float4 PS_Sharp( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColor,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 += tex2D(SamplerColor,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, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
if ( !bssshiftenable ) return res;
|
||||
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float2 bof = (1.0/bresl)*bssshiftradius;
|
||||
res.g = tex2D(SamplerColor,coord).g;
|
||||
res.r = tex2D(SamplerColor,coord+float2(0,-bof.y)).r;
|
||||
res.b = tex2D(SamplerColor,coord+float2(0,bof.y)).b;
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
/* ultimate super-cinematic immersive black bars */
|
||||
float4 PS_Cinematic( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
if ( !boxenable ) return res;
|
||||
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float sar = bresl.x/bresl.y;
|
||||
float tar = boxh/boxv;
|
||||
float2 box = (sar<tar)?float2(0.0,(bresl.y-(bresl.x/tar))*0.5)
|
||||
:float2((bresl.x-(bresl.y*tar))*0.5,0.0);
|
||||
box /= bresl;
|
||||
/* this is some kind of advanced black magic I can't understand */
|
||||
float2 test = saturate((coord*coord-coord)-(box*box-box));
|
||||
if ( -test.x != test.y ) res *= 0.0;
|
||||
return res;
|
||||
}
|
||||
/* TODO bring back oil filter */
|
||||
technique PostProcess
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Blur();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess2
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Sharp();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess3
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Shift();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess4
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_ChromaKey();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess5
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Retro();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess6
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Cinematic();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
137
enbseries/menbextrainternals.fx
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
menbextrainternals.fx : MariENB extra internal variables.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/*
|
||||
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/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
|
||||
/* standard stuff */
|
||||
float4 ScreenSize;
|
||||
float ENightDayFactor;
|
||||
float EInteriorFactor;
|
||||
/* samplers and textures */
|
||||
texture2D texColor;
|
||||
texture2D texDepth;
|
||||
texture2D texCGA
|
||||
<
|
||||
string ResourceName = "menbcgalut.png";
|
||||
>;
|
||||
texture2D texEGA
|
||||
<
|
||||
string ResourceName = "menbegalut.png";
|
||||
>;
|
||||
texture2D texVGA
|
||||
<
|
||||
string ResourceName = "menbvgalut.png";
|
||||
>;
|
||||
sampler2D SamplerColor = sampler_state
|
||||
{
|
||||
Texture = <texColor>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerColorb = sampler_state
|
||||
{
|
||||
Texture = <texColor>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Border;
|
||||
AddressV = Border;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerDepth = sampler_state
|
||||
{
|
||||
Texture = <texDepth>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerCGA = sampler_state
|
||||
{
|
||||
Texture = <texCGA>;
|
||||
MinFilter = POINT;
|
||||
MagFilter = POINT;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerEGA = sampler_state
|
||||
{
|
||||
Texture = <texEGA>;
|
||||
MinFilter = POINT;
|
||||
MagFilter = POINT;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerVGA = sampler_state
|
||||
{
|
||||
Texture = <texVGA>;
|
||||
MinFilter = POINT;
|
||||
MagFilter = POINT;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
/* whatever */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord : TEXCOORD0;
|
||||
};
|
||||
262
enbseries/menbextrasettings.fx
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
/*
|
||||
menbextrasettings.fx : MariENB extra user-tweakable variables.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* 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)
|
||||
*/
|
||||
float bresx
|
||||
<
|
||||
string UIName = "Emulated Resolution Width";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {0.5};
|
||||
float bresy
|
||||
<
|
||||
string UIName = "Emulated Resolution Height";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {0.5};
|
||||
/*
|
||||
palette type:
|
||||
-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 : VGA (256 colors)
|
||||
4 : RGB565 (ol' 16-bit "true color")
|
||||
*/
|
||||
int paltype
|
||||
<
|
||||
string UIName = "Palette Type";
|
||||
string UIWidget = "Spinner";
|
||||
int UIMin = -1;
|
||||
int UIMax = 4;
|
||||
> = {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};
|
||||
/*
|
||||
VGA palette to use:
|
||||
0 : Standard VGA
|
||||
1 : Amulets & Armor
|
||||
2 : Blood
|
||||
3 : Doom
|
||||
4 : Duke Nukem 3D
|
||||
5 : Hacx 2.0
|
||||
6 : Heretic
|
||||
7 : Hexen
|
||||
8 : Hexen 2
|
||||
9 : Quake
|
||||
10 : Quake 2
|
||||
11 : Rise of the Triad
|
||||
12 : Shadow Warrior
|
||||
13 : Strife
|
||||
14 : Wolfenstein 3D
|
||||
TODO Project .Blank palette (when the design is finished)
|
||||
*/
|
||||
int vgapal
|
||||
<
|
||||
string UIName = "VGA Palette";
|
||||
string UIWidget = "Spinner";
|
||||
int UIMin = 0;
|
||||
int UIMax = 14;
|
||||
> = {0};
|
||||
/*
|
||||
Dithering mode:
|
||||
-1 : No dithering, just raw banding
|
||||
0 : 2x2 checkerboard dithering, looks like ass
|
||||
1 : 2x2 ordered dithering
|
||||
2 : 8x8 ordered dithering
|
||||
*/
|
||||
int dither
|
||||
<
|
||||
string UIName = "Dithering Pattern";
|
||||
string UIWidget = "Spinner";
|
||||
int UIMin = -1;
|
||||
int UIMax = 2;
|
||||
> = {2};
|
||||
/* 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};
|
||||
/* Depth-cutting chroma key */
|
||||
string str_mask = "Depth Chroma Key";
|
||||
bool maskenable
|
||||
<
|
||||
string UIName = "Enable Chroma Key";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
float maskr
|
||||
<
|
||||
string UIName = "Chroma Key Red";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
float UIMax = 1.0;
|
||||
> = {0.0};
|
||||
float maskg
|
||||
<
|
||||
string UIName = "Chroma Key Green";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
float UIMax = 1.0;
|
||||
> = {1.0};
|
||||
float maskb
|
||||
<
|
||||
string UIName = "Chroma Key Blue";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
float UIMax = 1.0;
|
||||
> = {0.0};
|
||||
float maskd
|
||||
<
|
||||
string UIName = "Chroma Key Depth";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
float UIMax = 1.0;
|
||||
> = {0.5};
|
||||
/* tilting */
|
||||
float masktiltxcenter
|
||||
<
|
||||
string UIName = "Chroma Key Depth Horizontal Tilt Center";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
float UIMax = 1.0;
|
||||
> = {0.5};
|
||||
float masktiltycenter
|
||||
<
|
||||
string UIName = "Chroma Key Depth Vertical Tilt Center";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
float UIMax = 1.0;
|
||||
> = {0.5};
|
||||
float masktiltx
|
||||
<
|
||||
string UIName = "Chroma Key Depth Horizontal Tilt";
|
||||
string UIWidget = "Spinner";
|
||||
> = {0.0};
|
||||
float masktilty
|
||||
<
|
||||
string UIName = "Chroma Key Depth Vertical Tilt";
|
||||
string UIWidget = "Spinner";
|
||||
> = {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};
|
||||
/* very cinematic black bars */
|
||||
string str_box = "Black Bars";
|
||||
bool boxenable
|
||||
<
|
||||
string UIName = "Enable Black Bars";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
float boxh
|
||||
<
|
||||
string UIName = "Box Horizontal Ratio";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 1.0;
|
||||
> = {2.39};
|
||||
float boxv
|
||||
<
|
||||
string UIName = "Box Vertical Ratio";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 1.0;
|
||||
> = {1.0};
|
||||
BIN
enbseries/menbfilmlut.png
Normal file
|
After Width: | Height: | Size: 176 B |
BIN
enbseries/menbfrost.png
Normal file
|
After Width: | Height: | Size: 736 KiB |
BIN
enbseries/menbfrostbump.png
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
67
enbseries/menbglobaldefs.fx
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
menbglobaldefs.fx : MariENB global shared code.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* do not touch this! */
|
||||
#define E_SHADER_3_0
|
||||
/* are we running on fallout 3 / new vegas or on skyrim? */
|
||||
#define FALLOUT
|
||||
/* time of day and interior interpolation */
|
||||
#ifdef FALLOUT
|
||||
#define tod_ind(x) lerp(lerp(x##_n,x##_d,ENightDayFactor),\
|
||||
(x##_in+x##_id)*0.5,EInteriorFactor)
|
||||
#else
|
||||
#define tod_ind(x) lerp(lerp(x##_n,x##_d,ENightDayFactor),\
|
||||
lerp(x##_in,x##_id,ENightDayFactor),EInteriorFactor)
|
||||
#endif
|
||||
/* weather macros */
|
||||
#define WT_TEMPERATE 0.0
|
||||
#define WT_HOT 1.0
|
||||
#define WT_COLD 2.0
|
||||
/* new additions */
|
||||
#define WT_TEMPERATE_FOG 3.0
|
||||
#define WT_COLD_FOG 4.0
|
||||
#define WT_HOT_FOG 5.0
|
||||
#define weatherfactor(id) ((WeatherAndTime.x==id)?(WeatherAndTime.y==id)\
|
||||
?(1.0):(WeatherAndTime.z):(WeatherAndTime.y==id)\
|
||||
?(1.0-WeatherAndTime.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
|
||||
BIN
enbseries/menbheat.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
enbseries/menblut64_day.png
Normal file
|
After Width: | Height: | Size: 304 KiB |
BIN
enbseries/menblut64_interiorday.png
Normal file
|
After Width: | Height: | Size: 302 KiB |
BIN
enbseries/menblut64_interiornight.png
Normal file
|
After Width: | Height: | Size: 302 KiB |
BIN
enbseries/menblut64_night.png
Normal file
|
After Width: | Height: | Size: 272 KiB |
BIN
enbseries/menbnoise1.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
enbseries/menbnoise2.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
918
enbseries/menbprepassfilters.fx
Normal file
|
|
@ -0,0 +1,918 @@
|
|||
/*
|
||||
menbprepassfilters.fx : MariENB prepass shader routines.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
VS_OUTPUT_POST VS_Pass( VS_INPUT_POST IN )
|
||||
{
|
||||
VS_OUTPUT_POST OUT;
|
||||
OUT.vpos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
|
||||
OUT.txcoord.xy = IN.txcoord.xy;
|
||||
return OUT;
|
||||
}
|
||||
/* 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 = tex2D(SamplerDepth,coord).x;
|
||||
return (2*zNear)/(zFar+zNear-z*(zFar-zNear));
|
||||
}
|
||||
/* That "luma sharpen" thingy, added just because someone might want it */
|
||||
float3 Sharpen( float3 res, float2 coord )
|
||||
{
|
||||
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
if ( fixedx>0 ) bresl.x = fixedx;
|
||||
if ( fixedy>0 ) bresl.y = fixedy;
|
||||
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*sharpradius;
|
||||
float4 crawling = tex2D(SamplerColor,coord+float2(0,-1)*bof);
|
||||
crawling += tex2D(SamplerColor,coord+float2(-1,0)*bof);
|
||||
crawling += tex2D(SamplerColor,coord+float2(1,0)*bof);
|
||||
crawling += tex2D(SamplerColor,coord+float2(0,1)*bof);
|
||||
crawling *= 0.25;
|
||||
float3 inmyskin = res-crawling.rgb;
|
||||
float thesewounds = luminance(inmyskin);
|
||||
thesewounds = clamp(thesewounds,-sharpclamp*0.01,sharpclamp*0.01);
|
||||
float3 theywillnotheal = res+thesewounds*sharpblend;
|
||||
return theywillnotheal;
|
||||
}
|
||||
/* old Edgevision mode */
|
||||
float3 EdgeView( float3 res, float2 coord )
|
||||
{
|
||||
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
if ( fixedx>0 ) bresl.x = fixedx;
|
||||
if ( fixedy>0 ) bresl.y = fixedy;
|
||||
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-tex2D(SamplerDepth,coord).x;
|
||||
mud *= saturate(pow(max(0,fade),edgevfadepow)*edgevfademult);
|
||||
mud = saturate(pow(max(0,mud),edgevpow)*edgevmult);
|
||||
return mud;
|
||||
}
|
||||
/*
|
||||
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 = tex2D(SamplerDepth,coord+ofs1).x;
|
||||
float dep2 = tex2D(SamplerDepth,coord+ofs2).x;
|
||||
float3 p1 = float3(ofs1,dep1-dep);
|
||||
float3 p2 = float3(ofs2,dep2-dep);
|
||||
float3 normal = cross(p1,p2);
|
||||
normal.z = -normal.z;
|
||||
return normalize(normal);
|
||||
}
|
||||
/* Squeezed in are Edgevision and Sharpen and ssao prepass */
|
||||
float4 PS_EdgePlusSSAOPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
if ( sharpenable ) res.rgb = Sharpen(res.rgb,coord);
|
||||
if ( edgevenable ) res.rgb = EdgeView(res.rgb,coord);
|
||||
/* get occlusion using single-step Ray Marching with 64 samples */
|
||||
float ssaofadepow = tod_ind(ssaofadepow);
|
||||
float ssaofademult = tod_ind(ssaofademult);
|
||||
if ( !ssaoenable ) return res;
|
||||
float depth = tex2D(SamplerDepth,coord).x;
|
||||
float ldepth = depthlinear(coord);
|
||||
if ( depth >= cutoff*0.000001 )
|
||||
{
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
}
|
||||
float2 bresl;
|
||||
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
|
||||
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 = tex2D(SamplerNoise3,nc+48000.0*Timer.x*ssaonoise).xy;
|
||||
float3 rnormal = tex2D(SamplerNoise3,nc2).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);
|
||||
res.a = saturate(1.0-(uocc*ssaoblend));
|
||||
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*uwm1+Timer.x*uwf1*100.0))*uws1;
|
||||
ofs.y = siny+sin(pi*2.0*(coord.x*uwm2+Timer.x*uwf2*100.0))*uws2;
|
||||
ofs.x = siny+sin(pi*2.0*(coord.x*uwm3+Timer.x*uwf3*100.0))*uws3;
|
||||
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 = tex2D(SamplerDepth,coord).x;
|
||||
float distfade = clamp(pow(max(0,dep),heatfadepow)*heatfademul
|
||||
+heatfadebump,0.0,1.0);
|
||||
if ( distfade <= 0.0 ) return coord;
|
||||
float todpow = pow(max(0,ENightDayFactor*min(1.0,weatherfactor(WT_HOT)
|
||||
+weatherfactor(WT_HOT_FOG)+1.0-EInteriorFactor)),
|
||||
heattodpow);
|
||||
if ( !heatalways && (todpow <= 0.0) ) return coord;
|
||||
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
|
||||
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 = tex2D(SamplerHeat,nc+ts).xy;
|
||||
ofs = (ofs-0.5)*2.0;
|
||||
ofs *= pow(length(ofs),heatpow);
|
||||
if ( !heatalways ) ofs *= todpow
|
||||
#ifndef FALLOUT
|
||||
*max(0.0,(weatherfactor(WT_HOT)+weatherfactor(WT_HOT_FOG))
|
||||
-(weatherfactor(WT_COLD)+weatherfactor(WT_COLD_FOG)))
|
||||
#endif
|
||||
;
|
||||
odep = tex2D(SamplerDepth,coord+ofs*heatstrength*distfade*0.01).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, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float2 bresl;
|
||||
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
|
||||
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) )
|
||||
return tex2D(SamplerColor,coord+ofs);
|
||||
float2 ofr, ofg, ofb;
|
||||
ofr = ofs*(1.0-distcha*0.01);
|
||||
ofg = ofs;
|
||||
ofb = ofs*(1.0+distcha*0.01);
|
||||
res = float4(tex2D(SamplerColor,coord+ofr).r,
|
||||
tex2D(SamplerColor,coord+ofg).g,
|
||||
tex2D(SamplerColor,coord+ofb).b,
|
||||
tex2D(SamplerColor,coord+ofs).a);
|
||||
return res;
|
||||
}
|
||||
/*
|
||||
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, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
if ( !ssaoenable ) return res;
|
||||
if ( !ssaobenable ) return res;
|
||||
float bresl = ScreenSize.x;
|
||||
float bof = (1.0/bresl)*ssaobradius;
|
||||
float isd, sd, ds, sw, tw = 0;
|
||||
res.a = 0.0;
|
||||
int i;
|
||||
isd = tex2D(SamplerDepth,coord).x;
|
||||
[unroll] for ( i=-15; i<=15; i++ )
|
||||
{
|
||||
sd = tex2D(SamplerDepth,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.a += sw*tex2D(SamplerColor,coord+float2(i,0)*bof).a;
|
||||
}
|
||||
res.a /= tw;
|
||||
return res;
|
||||
}
|
||||
float4 PS_SSAOBlurV( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
if ( !ssaoenable ) return res;
|
||||
if ( !ssaobenable )
|
||||
{
|
||||
if ( ssaodebug ) return saturate(res.a);
|
||||
return res*res.a;
|
||||
}
|
||||
float bresl = ScreenSize.x*ScreenSize.w;
|
||||
float bof = (1.0/bresl)*ssaobradius;
|
||||
float isd, sd, ds, sw, tw = 0;
|
||||
res.a = 0.0;
|
||||
int i;
|
||||
isd = tex2D(SamplerDepth,coord).x;
|
||||
[unroll] for ( i=-15; i<=15; i++ )
|
||||
{
|
||||
sd = tex2D(SamplerDepth,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.a += sw*tex2D(SamplerColor,coord+float2(0,i)*bof).a;
|
||||
}
|
||||
res.a /= tw;
|
||||
if ( ssaodebug ) return saturate(res.a);
|
||||
res *= res.a;
|
||||
return res;
|
||||
}
|
||||
/* Focus */
|
||||
float4 PS_ReadFocus( VS_OUTPUT_POST IN ) : COLOR
|
||||
{
|
||||
if ( dofdisable ) return 0.0;
|
||||
if ( focuscircle < 0 ) return focusmanualvalue;
|
||||
float focusmax = tod_ind(focusmax);
|
||||
float2 fcenter = float2(focuscenter_x,focuscenter_y);
|
||||
float cfocus = min(tex2D(SamplerDepth,fcenter).x,focusmax*0.001);
|
||||
if ( focuscircle == 0 ) return cfocus;
|
||||
if ( focuscircle == 2 )
|
||||
{
|
||||
int i, j;
|
||||
float mfocus = 0.0;
|
||||
float2 px;
|
||||
[unroll] for( j=0; j<8; j++ ) [unroll] for( i=0; i<8; i++ )
|
||||
{
|
||||
px = float2((i+0.5)/8.0,(j+0.5)/8.0);
|
||||
mfocus += min(tex2D(SamplerDepth,px).x,focusmax*0.001);
|
||||
}
|
||||
return mfocus/64.0;
|
||||
}
|
||||
/* 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 mfocus;
|
||||
float2 coord;
|
||||
float2 bof = float2(1.0,1.0/ScreenSize.w)*focusradius*0.01;
|
||||
float fan = focuscircleangle*2.0*pi;
|
||||
coord.x = fcenter.x+sin(fan)*bof.x;
|
||||
coord.y = fcenter.y+cos(fan)*bof.y;
|
||||
mfocus = cstep*min(tex2D(SamplerDepth,coord).x,focusmax*0.001);
|
||||
coord.x = fcenter.x+sin(fan+2.0*pi*cstep)*bof.x;
|
||||
coord.y = fcenter.y+cos(fan+2.0*pi*cstep)*bof.y;
|
||||
mfocus += cstep*min(tex2D(SamplerDepth,coord).x,focusmax*0.001);
|
||||
coord.x = fcenter.x+sin(fan+4.0*pi*cstep)*bof.x;
|
||||
coord.y = fcenter.y+cos(fan+4.0*pi*cstep)*bof.y;
|
||||
mfocus += cstep*min(tex2D(SamplerDepth,coord).x,focusmax*0.001);
|
||||
cfocus = (1.0-focusmix)*cfocus+focusmix*mfocus;
|
||||
return cfocus;
|
||||
}
|
||||
float4 PS_WriteFocus( VS_OUTPUT_POST IN ) : COLOR
|
||||
{
|
||||
if ( dofdisable ) return 0.0;
|
||||
return max(lerp(tex2D(SamplerPrev,0.5).x,tex2D(SamplerCurr,0.5).x,
|
||||
saturate(FadeFactor)),0.0);
|
||||
}
|
||||
/* Depth of Field */
|
||||
float4 PS_DoFPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
if ( dofdisable ) return tex2D(SamplerColor,coord);
|
||||
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(doffixedunfocusblend);
|
||||
float doffixedunfocuspow = tod_ind(doffixedunfocuspow);
|
||||
float doffixedunfocusmult = tod_ind(doffixedunfocusmult);
|
||||
float doffixedunfocusbump = tod_ind(doffixedunfocusbump);
|
||||
float doffixedunfocusblend = tod_ind(doffixedunfocusblend);
|
||||
#ifndef FALLOUT
|
||||
float doffogpow = tod_ind(doffogpow);
|
||||
float doffogmult = tod_ind(doffogmult);
|
||||
float doffogbump = tod_ind(doffogbump);
|
||||
float doffogblend = tod_ind(doffogblend);
|
||||
#endif
|
||||
float dep = tex2D(SamplerDepth,coord).x;
|
||||
float foc = tex2D(SamplerFocus,coord).x;
|
||||
/* cheap tilt */
|
||||
foc = foc+0.01*doftiltx*(doftiltxcenter-coord.x)
|
||||
+0.01*doftilty*(doftiltycenter-coord.y);
|
||||
float dff = abs(dep-doffixedfocusdepth);
|
||||
dff = clamp(pow(dff,doffixedfocuspow)*doffixedfocusmult
|
||||
+doffixedfocusbump,0.0,1.0);
|
||||
if ( dep > doffixedfocuscap ) dff = 1.0;
|
||||
float dfu = abs(dep-doffixedunfocusdepth);
|
||||
dfu = clamp(pow(dfu,doffixedunfocuspow)*doffixedunfocusmult
|
||||
+doffixedunfocusbump,0.0,1.0);
|
||||
#ifndef FALLOUT
|
||||
float dfog = abs(dep-doffogdepth);
|
||||
dfog = clamp(pow(dfog,doffogpow)*doffogmult+doffogbump,0.0,1.0);
|
||||
#endif
|
||||
if ( doffixedcut && (dep >= cutoff*0.000001) ) dfu *= 0;
|
||||
/*
|
||||
Change power of dof based on field of view. Works only in Skyrim.
|
||||
The FieldOfView variable seems to hold bogus values in Fallout
|
||||
completely unrelated to actual FOV (yes, I checked if it's in
|
||||
radians, and no, it isn't). The value appears to be 1.134452. Who
|
||||
could I blame for this mess? Boris? Bethesda? Hell if I know.
|
||||
*/
|
||||
#ifndef FALLOUT
|
||||
if ( dofrelfov )
|
||||
{
|
||||
float relfovfactor = tod_ind(relfovfactor);
|
||||
float relfov = (FieldOfView-fovdefault)/fovdefault;
|
||||
dofpow = max(0,dofpow+relfov*relfovfactor);
|
||||
}
|
||||
#endif
|
||||
float dfc = abs(dep-foc);
|
||||
dfc = clamp(pow(dfc,dofpow)*dofmult+dofbump,0.0,1.0);
|
||||
if ( doffixedonly ) dfc *= 0;
|
||||
dfc += lerp(0.0,dfu,doffixedunfocusblend);
|
||||
#ifndef FALLOUT
|
||||
if ( doffogenable )
|
||||
dfc += (weatherfactor(WT_TEMPERATE_FOG)
|
||||
+weatherfactor(WT_COLD_FOG)+weatherfactor(WT_HOT_FOG))
|
||||
*lerp(0.0,dfog,doffogblend);
|
||||
#endif
|
||||
dfc *= lerp(1.0,dff,doffixedfocusblend);
|
||||
dfc = saturate(dfc);
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
res.a = dfc;
|
||||
return res;
|
||||
}
|
||||
/* gather blur pass */
|
||||
float4 PS_DoFGather( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
if ( dofdisable ) return tex2D(SamplerColor,coord);
|
||||
float dfc = tex2D(SamplerColor,coord).a;
|
||||
if ( dofdebug ) return tex2D(SamplerDepth,coord).x;
|
||||
if ( dfcdebug ) return dfc;
|
||||
float2 bresl;
|
||||
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
|
||||
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float2 bof = 1.0/bresl;
|
||||
/*
|
||||
Skip blurring areas that are perfectly in focus. The performance
|
||||
gain is negligible in most cases, though.
|
||||
*/
|
||||
if ( dfc <= dofminblur ) return tex2D(SamplerColor,coord);
|
||||
float4 res = float4(0,0,0,0);
|
||||
float dep = tex2D(SamplerDepth,coord).x;
|
||||
float ds, sw, tw = 0;
|
||||
float2 bsz = bof*dofpradius*dfc;
|
||||
float4 sc;
|
||||
[unroll] for ( int i=0; i<32; i++ )
|
||||
{
|
||||
sc = float4(tex2D(SamplerColor,coord+poisson32[i]*bsz*(1
|
||||
+dofpcha*0.1)).r,tex2D(SamplerColor,coord+poisson32[i]
|
||||
*bsz).g,tex2D(SamplerColor,coord+poisson32[i]*bsz*(1
|
||||
-dofpcha*0.1)).b,tex2D(SamplerColor,coord+poisson32[i]
|
||||
*bsz).a);
|
||||
ds = tex2D(SamplerDepth,coord+poisson32[i]*bsz).x;
|
||||
sw = (ds>dep)?1.0:sc.a;
|
||||
tw += sw;
|
||||
res += sc*sw;
|
||||
}
|
||||
res /= tw;
|
||||
res.a = dfc;
|
||||
return res;
|
||||
}
|
||||
/* "bokeh" blur pass */
|
||||
float4 PS_DoFBorkeh( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
if ( dofdisable ) return tex2D(SamplerColor,coord);
|
||||
float dfc = tex2D(SamplerColor,coord).a;
|
||||
if ( dofdebug ) return tex2D(SamplerDepth,coord).x;
|
||||
if ( dfcdebug ) return dfc;
|
||||
float2 bresl;
|
||||
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
|
||||
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float2 bof = 1.0/bresl;
|
||||
float4 res = tex2D(SamplerColor,coord);
|
||||
res.a = 0.0;
|
||||
/*
|
||||
Skip blurring areas that are perfectly in focus. The performance
|
||||
gain is negligible in most cases, though.
|
||||
*/
|
||||
if ( dfc <= dofminblur ) return res;
|
||||
float dep = tex2D(SamplerDepth,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(tex2D(SamplerColor,coord+poisson32[i]*bsz*(1
|
||||
+dofpcha*0.1)).r,tex2D(SamplerColor,coord+poisson32[i]
|
||||
*bsz).g,tex2D(SamplerColor,coord+poisson32[i]*bsz*(1
|
||||
-dofpcha*0.1)).b,tex2D(SamplerColor,coord+poisson32[i]
|
||||
*bsz).a);
|
||||
ds = tex2D(SamplerDepth,coord+poisson32[i]*bsz).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;
|
||||
res.a = dfc;
|
||||
return res;
|
||||
}
|
||||
float4 PS_DoFPostBlur( VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
if ( dofdisable ) return tex2D(SamplerColor,coord);
|
||||
float dfc = tex2D(SamplerColor,coord).a;
|
||||
if ( dofdebug ) return tex2D(SamplerDepth,coord).x;
|
||||
if ( dfcdebug ) return dfc;
|
||||
float2 bresl;
|
||||
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
|
||||
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float2 bof = 1.0/bresl;
|
||||
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 = tex2D(SamplerColor,coord);
|
||||
int i;
|
||||
[unroll] for ( i=0; i<16; i++ )
|
||||
res += tex2D(SamplerColor,coord+ofs[i]*bof*dfc);
|
||||
res /= 17.0;
|
||||
res.a = 1.0;
|
||||
return res;
|
||||
|
||||
}
|
||||
/* Screen frost shader. Not very realistic either, but looks fine too. */
|
||||
float2 ScreenFrost( float2 coord )
|
||||
{
|
||||
float2 bresl;
|
||||
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
|
||||
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float2 nc = coord*(bresl/FROSTSIZE)*frostsize;
|
||||
float2 ofs = tex2D(SamplerFrostBump,nc).xy;
|
||||
ofs = (ofs-0.5)*2.0;
|
||||
ofs *= pow(length(ofs),frostpow)*froststrength;
|
||||
if ( !frostalways ) ofs *=
|
||||
#ifndef FALLOUT
|
||||
max(0.0,(weatherfactor(WT_COLD)+weatherfactor(WT_COLD_FOG))
|
||||
-(weatherfactor(WT_HOT)+weatherfactor(WT_HOT_FOG)))*
|
||||
#endif
|
||||
(1.0-ENightDayFactor)*frostnight;
|
||||
if ( EInteriorFactor == 1.0 ) ofs *= frostind;
|
||||
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, float2 vPos : VPOS) : COLOR
|
||||
{
|
||||
float2 coord = IN.txcoord.xy;
|
||||
float2 bresl;
|
||||
if ( (fixedx > 0) && (fixedy > 0) ) bresl = float2(fixedx,fixedy);
|
||||
else bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float4 res;
|
||||
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(tex2D(SamplerColor,coord+ofr).r,
|
||||
tex2D(SamplerColor,coord+ofg).g,
|
||||
tex2D(SamplerColor,coord+ofb).b,1.0);
|
||||
}
|
||||
else res = tex2D(SamplerColor,coord+ofs);
|
||||
float2 nc = coord*(bresl/FROSTSIZE)*frostsize;
|
||||
float bmp = pow(max(0,tex2D(SamplerFrost,nc).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;
|
||||
if ( !frostalways ) dist *=
|
||||
#ifndef FALLOUT
|
||||
max(0.0,(weatherfactor(WT_COLD)
|
||||
+weatherfactor(WT_COLD_FOG))+(weatherfactor(WT_HOT)
|
||||
+weatherfactor(WT_HOT_FOG)))*
|
||||
#endif
|
||||
(1.0-ENightDayFactor)*frostnight;
|
||||
if ( EInteriorFactor == 1.0 ) dist *= frostind;
|
||||
res.rgb *= 1.0+bmp*dist;
|
||||
}
|
||||
else res = tex2D(SamplerColor,coord);
|
||||
if ( !focusdisplay || (focuscircle < 0) ) return res;
|
||||
if ( focuscircle == 2 )
|
||||
{
|
||||
int i, j;
|
||||
float2 px;
|
||||
[unroll] for( j=0; j<8; j++ ) [unroll] for( i=0; i<8; i++ )
|
||||
{
|
||||
px = float2((i+0.5)/8.0,(j+0.5)/8.0);
|
||||
if ( distance(coord,px) < 0.005 )
|
||||
res.rgb = float3(1,0,0);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
float2 fcenter = float2(focuscenter_x,focuscenter_y);
|
||||
if ( distance(coord,fcenter) < 0.005 ) res.rgb = float3(1,0,0);
|
||||
if ( focuscircle == 0 ) return res;
|
||||
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 = fcenter.x+sin(fan)*bof.x;
|
||||
tcoord.y = fcenter.y+cos(fan)*bof.y;
|
||||
if ( distance(coord,tcoord) < 0.005 ) res.rgb = float3(1,0,0);
|
||||
tcoord.x = fcenter.x+sin(fan+2.0*pi*cstep)*bof.x;
|
||||
tcoord.y = fcenter.y+cos(fan+2.0*pi*cstep)*bof.y;
|
||||
if ( distance(coord,tcoord) < 0.005 ) res.rgb = float3(1,0,0);
|
||||
tcoord.x = fcenter.x+sin(fan+4.0*pi*cstep)*bof.x;
|
||||
tcoord.y = fcenter.y+cos(fan+4.0*pi*cstep)*bof.y;
|
||||
if ( distance(coord,tcoord) < 0.005 ) res.rgb = float3(1,0,0);
|
||||
return res;
|
||||
}
|
||||
technique ReadFocus
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_ReadFocus();
|
||||
ZENABLE = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique WriteFocus
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_WriteFocus();
|
||||
ZENABLE = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_EdgePlusSSAOPrepass();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess2
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Distortion();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess3
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_SSAOBlurH();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess4
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_SSAOBlurV();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess5
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_DoFPrepass();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess6
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_DoFGather();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess7
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_DoFPostBlur();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcess8
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_FrostPass();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
technique PostProcessB <string UIName="Bokeh (WIP)";>
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_EdgePlusSSAOPrepass();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcessB2
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_Distortion();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcessB3
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_SSAOBlurH();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcessB4
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_SSAOBlurV();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcessB5
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_DoFPrepass();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcessB6
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_DoFBorkeh();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcessB7
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_DoFPostBlur();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
technique PostProcessB8
|
||||
{
|
||||
pass p0
|
||||
{
|
||||
VertexShader = compile vs_3_0 VS_Pass();
|
||||
PixelShader = compile ps_3_0 PS_FrostPass();
|
||||
DitherEnable = FALSE;
|
||||
ZEnable = FALSE;
|
||||
CullMode = NONE;
|
||||
ALPHATESTENABLE = FALSE;
|
||||
SEPARATEALPHABLENDENABLE = FALSE;
|
||||
AlphaBlendEnable = FALSE;
|
||||
StencilEnable = FALSE;
|
||||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
230
enbseries/menbprepassinternals.fx
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
/*
|
||||
menbprepassinternals.fx : MariENB prepass internal variables.
|
||||
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
||||
Part of MariENB, the personal ENB of Marisa.
|
||||
Released under the GNU GPLv3 (or later).
|
||||
*/
|
||||
/* 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: 8, std dev: 6 */
|
||||
static const float gauss8[8] =
|
||||
{
|
||||
0.084247, 0.083085, 0.079694, 0.074348,
|
||||
0.067460, 0.059533, 0.051099, 0.042657
|
||||
};
|
||||
/* 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)
|
||||
};
|
||||
/* standard stuff */
|
||||
float4 ScreenSize;
|
||||
float ENightDayFactor;
|
||||
float EInteriorFactor;
|
||||
float FadeFactor;
|
||||
float4 Timer;
|
||||
float FieldOfView;
|
||||
float4 WeatherAndTime;
|
||||
/* this still doesn't do anything */
|
||||
extern float fWaterLevel;
|
||||
/* samplers and textures */
|
||||
texture2D texColor;
|
||||
texture2D texDepth;
|
||||
texture2D texNoise3
|
||||
<
|
||||
string ResourceName = "menbnoise2.png";
|
||||
>;
|
||||
texture2D texHeat
|
||||
<
|
||||
#ifdef HEAT_DDS
|
||||
string ResourceName = "menbheat.dds";
|
||||
#else
|
||||
string ResourceName = "menbheat.png";
|
||||
#endif
|
||||
>;
|
||||
texture2D texFrost
|
||||
<
|
||||
#ifdef FROST_DDS
|
||||
string ResourceName = "menbfrost.dds";
|
||||
#else
|
||||
string ResourceName = "menbfrost.png";
|
||||
#endif
|
||||
>;
|
||||
texture2D texFrostBump
|
||||
<
|
||||
#ifdef FROSTBUMP_DDS
|
||||
string ResourceName = "menbfrostbump.dds";
|
||||
#else
|
||||
string ResourceName = "menbfrostbump.png";
|
||||
#endif
|
||||
>;
|
||||
texture2D texFocus;
|
||||
texture2D texCurr;
|
||||
texture2D texPrev;
|
||||
sampler2D SamplerColor = sampler_state
|
||||
{
|
||||
Texture = <texColor>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerDepth = sampler_state
|
||||
{
|
||||
Texture = <texDepth>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerNoise3 = sampler_state
|
||||
{
|
||||
Texture = <texNoise3>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerHeat = sampler_state
|
||||
{
|
||||
Texture = <texHeat>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerFrost = sampler_state
|
||||
{
|
||||
Texture = <texFrost>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerFrostBump = sampler_state
|
||||
{
|
||||
Texture = <texFrostBump>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerFocus = sampler_state
|
||||
{
|
||||
Texture = <texFocus>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerCurr = sampler_state
|
||||
{
|
||||
Texture = <texCurr>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerPrev = sampler_state
|
||||
{
|
||||
Texture = <texPrev>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
/* whatever */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
float4 vpos : POSITION;
|
||||
float2 txcoord : TEXCOORD0;
|
||||
};
|
||||
struct VS_INPUT_POST
|
||||
{
|
||||
float3 pos : POSITION;
|
||||
float2 txcoord : TEXCOORD0;
|
||||
};
|
||||
1058
enbseries/menbprepasssettings.fx
Normal file
BIN
enbseries/menbvgalut.png
Normal file
|
After Width: | Height: | Size: 492 KiB |