1
Fork 0

Alpha 1. First standalone version.

This commit is contained in:
Marisa the Magician 2019-04-07 17:08:32 +02:00
commit f3268064c7
28 changed files with 3781 additions and 4357 deletions

19
MariENB_LICENSE.txt Normal file
View file

@ -0,0 +1,19 @@
Copyright (c) 2013-2014 UnSX Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1185
effect.txt

File diff suppressed because it is too large Load diff

View file

@ -1,470 +1,12 @@
//++++++++++++++++++++++++++++++++++++++++++++
// ENBSeries effect file
// visit http://enbdev.com for updates
// Copyright (c) 2007-2011 Boris Vorontsov
//++++++++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++
//internal parameters, can be modified
//+++++++++++++++++++++++++++++
//none
//+++++++++++++++++++++++++++++
//external parameters, do not modify
//+++++++++++++++++++++++++++++
//keyboard controlled temporary variables (in some versions exists in the config file). Press and hold key 1,2,3...8 together with PageUp or PageDown to modify. By default all set to 1.0
float4 tempF1; //0,1,2,3
float4 tempF2; //5,6,7,8
float4 tempF3; //9,0
//x=Width, y=1/Width, z=ScreenScaleY, w=1/ScreenScaleY
float4 ScreenSize;
//x=generic timer in range 0..1, period of 16777216 ms (4.6 hours), w=frame time elapsed (in seconds)
float4 Timer;
//additional info for computations
float4 TempParameters;
//Lenz reflection intensity, lenz reflection power
float4 LenzParameters;
//BloomRadius1, BloomRadius2, BloomBlueShiftAmount, BloomContrast
float4 BloomParameters;
texture2D texBloom1;
texture2D texBloom2;
texture2D texBloom3;
texture2D texBloom4;
texture2D texBloom5;
texture2D texBloom6;
texture2D texBloom7;//additional bloom tex
texture2D texBloom8;//additional bloom tex
sampler2D SamplerBloom1 = sampler_state
{
Texture = <texBloom1>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom2 = sampler_state
{
Texture = <texBloom2>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom3 = sampler_state
{
Texture = <texBloom3>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom4 = sampler_state
{
Texture = <texBloom4>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom5 = sampler_state
{
Texture = <texBloom5>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom6 = sampler_state
{
Texture = <texBloom6>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom7 = sampler_state
{
Texture = <texBloom7>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom8 = sampler_state
{
Texture = <texBloom8>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
struct VS_OUTPUT_POST
{
float4 vpos : POSITION;
float2 txcoord0 : TEXCOORD0;
};
struct VS_INPUT_POST
{
float3 pos : POSITION;
float2 txcoord0 : TEXCOORD0;
};
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VS_OUTPUT_POST VS_Bloom(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+TempParameters.xy;//1.0/(bloomtexsize*2.0)
return OUT;
}
//zero pass HQ, input texture is fullscreen
//SamplerBloom1 - fullscreen texture
float4 PS_BloomPrePass(VS_OUTPUT_POST In) : COLOR
{
float4 bloomuv;
float4 bloom=0.0;//tex2D(SamplerBloom1, In.txcoord0);
const float2 offset[4]=
{
float2(0.25, 1.25),
float2(0.25, -0.25),
float2(-0.25, 0.25),
float2(-0.25, -0.25)
};
//TempParameters.w==1 if first pass, ==2 is second pass
float2 screenfact=TempParameters.z;
screenfact.y*=ScreenSize.z;
float4 srcbloom=bloom;
for (int i=0; i<4; i++)
{
bloomuv.xy=offset[i];
bloomuv.xy=(bloomuv.xy*screenfact.xy)+In.txcoord0.xy;
float4 tempbloom=tex2D(SamplerBloom1, bloomuv.xy);
bloom.xyz+=tempbloom.xyz;
}
bloom.xyz*=0.25;
bloom.xyz=min(bloom.xyz, 32768.0);
bloom.xyz=max(bloom.xyz, 0.0);
return bloom;
}
//first and second passes draw to every texture
//twice, after computations of these two passes,
//result is set as input to next cycle
//first pass
//SamplerBloom1 is result of prepass or second pass from cycle
float4 PS_BloomTexture1(VS_OUTPUT_POST In) : COLOR
{
float4 bloomuv;
float4 bloom=tex2D(SamplerBloom1, In.txcoord0);
const float2 offset[8]=
{
float2(1.0, 1.0),
float2(1.0, -1.0),
float2(-1.0, 1.0),
float2(-1.0, -1.0),
float2(0.0, 1.0),
float2(0.0, -1.0),
float2(1.0, 0.0),
float2(-1.0, 0.0)
};
float2 screenfact=TempParameters.z;
screenfact.y*=ScreenSize.z;
float4 srcbloom=bloom;
//TempParameters.w == (1+passnumber)
float step=BloomParameters.x;//*pow(2.0, BloomParameters.x * (TempParameters.w-1.0));//*0.5
// float step=(TempParameters.w-0.25);//
screenfact.xy*=step;//====================================================
float4 bloomadd=bloom;
for (int i=0; i<8; i++)
{
bloomuv.xy=offset[i];
bloomuv.xy=(bloomuv.xy*screenfact.xy)+In.txcoord0.xy;//-(1.0/256.0);//-(1.0/512.0);
float4 tempbloom=tex2D(SamplerBloom1, bloomuv.xy);
bloom+=tempbloom;
}
bloom*=0.111111;
//float3 violet=float3(0.78, 0.5, 1.0);
//float3 violet=float3(0.6, 0.4, 1.0);//v2
float3 violet=float3(0.6, 0.4, 1.0);//v3
// float3 violet=float3(0.27, 0.52, 1.0);//v4
//this applies when white
//float gray=0.104*dot(srcbloom.xyz, 0.333);//max(srcbloom.x, max(srcbloom.y, srcbloom.z));
//this applies on dark and when contrast
float ttt=dot(bloom.xyz, 0.333)-dot(srcbloom.xyz, 0.333);
ttt=max(ttt, 0.0);
float gray=BloomParameters.z*ttt*10;//max(srcbloom.x, max(srcbloom.y, srcbloom.z));
float mixfact=(gray/(1.0+gray));
mixfact*=1.0-saturate((TempParameters.w-1.0)*0.2);
violet.xy+=saturate((TempParameters.w-1.0)*0.3);
violet.xy=saturate(violet.xy);
bloom.xyz*=lerp(1.0, violet.xyz, mixfact);
bloom.w=1.0;
return bloom;
}
//second pass
//SamplerBloom1 is result of first pass
float4 PS_BloomTexture2(VS_OUTPUT_POST In) : COLOR
{
float4 bloomuv;
float4 bloom=tex2D(SamplerBloom1, In.txcoord0);
const float2 offset[8]=
{
float2(1.0, 1.0),
float2(1.0, -1.0),
float2(-1.0, 1.0),
float2(-1.0, -1.0),
float2(0.0, 1.0),
float2(0.0, -1.0),
float2(1.0, 0.0),
float2(-1.0, 0.0)
};
float2 screenfact=TempParameters.z;
screenfact.y*=ScreenSize.z;
float4 srcbloom=bloom;
//TempParameters.w == (1+passnumber)
// float step=(TempParameters.w-0.25);
float step=BloomParameters.y;//*pow(2.0, BloomParameters.y * (TempParameters.w-1.0))*2.0;//*0.5
screenfact.xy*=step;//*0.25====================================================
float4 rotvec=0.0;
sincos(0.3927, rotvec.x, rotvec.y);
for (int i=0; i<8; i++)
{
bloomuv.xy=offset[i];
bloomuv.xy=reflect(bloomuv.xy, rotvec.xy);
bloomuv.xy=(bloomuv.xy*screenfact.xy)+In.txcoord0.xy;
float4 tempbloom=tex2D(SamplerBloom1, bloomuv.xy);
bloom+=tempbloom;
}
bloom*=0.111111;
bloom.w=1.0;
return bloom;
}
//last pass, mix several bloom textures
//SamplerBloom5 is the result of prepass
//float4 PS_BloomPostPass(float2 vPos : VPOS ) : COLOR
float4 PS_BloomPostPass(VS_OUTPUT_POST In) : COLOR
{
float4 bloom;
//v1
bloom =tex2D(SamplerBloom1, In.txcoord0);
bloom+=tex2D(SamplerBloom2, In.txcoord0);
bloom+=tex2D(SamplerBloom3, In.txcoord0);
bloom+=tex2D(SamplerBloom4, In.txcoord0);
bloom+=tex2D(SamplerBloom7, In.txcoord0);
bloom+=tex2D(SamplerBloom8, In.txcoord0);
bloom+=tex2D(SamplerBloom5, In.txcoord0);
// bloom+=tex2D(SamplerBloom6, In.txcoord0);
bloom*=0.142857;
float3 lenz=0;
float2 lenzuv=0.0;
//deepness, curvature, inverse size
const float3 offset[4]=
{
float3(1.6, 4.0, 1.0),
float3(0.7, 0.25, 2.0),
float3(0.3, 1.5, 0.5),
float3(-0.5, 1.0, 1.0)
};
//color filter per reflection
const float3 factors[4]=
{
float3(0.3, 0.4, 0.4),
float3(0.2, 0.4, 0.5),
float3(0.5, 0.3, 0.7),
float3(0.1, 0.2, 0.7)
};
//lenzuv.xy=0.5-lenzuv.xy;
//distfact=0.5-lenzuv.xy-0.5;
if (LenzParameters.x>0.00001)
{
for (int i=0; i<4; i++)
{
float2 distfact=(In.txcoord0.xy-0.5);
lenzuv.xy=offset[i].x*distfact;
lenzuv.xy*=pow(2.0*length(float2(distfact.x*ScreenSize.z,distfact.y)), offset[i].y);
lenzuv.xy*=offset[i].z;
lenzuv.xy=0.5-lenzuv.xy;//v1
// lenzuv.xy=In.txcoord0.xy-lenzuv.xy;//v2
float3 templenz=tex2D(SamplerBloom2, lenzuv.xy);
templenz=templenz*factors[i];
distfact=(lenzuv.xy-0.5);
distfact*=2.0;
templenz*=saturate(1.0-dot(distfact,distfact));//limit by uv 0..1
// templenz=factors[i] * (1.0-dot(distfact,distfact));
float maxlenz=max(templenz.x, max(templenz.y, templenz.z));
/* float3 tempnor=(templenz.xyz/maxlenz);
tempnor=pow(tempnor, tempF1.z);
templenz.xyz=tempnor.xyz*maxlenz;
/*
enbbloom.fx : MariENB bloom filter.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
float tempnor=(maxlenz/(1.0+maxlenz));
tempnor=pow(tempnor, LenzParameters.y);
templenz.xyz*=tempnor;
// templenz*=maxlenz*maxlenz;
lenz+=templenz;
// lenz.xyz=max(lenz.xyz, templenz.xyz*0.99);
}
lenz.xyz*=0.25*LenzParameters.x;
bloom.xyz+=lenz.xyz;
// bloom.w=dot(lenz.xyz, 0.333);
bloom.w=max(lenz.xyz, max(lenz.y, lenz.z));
}
return bloom;
}
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;
}
}
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;
}
}
/* do not touch this! */
#define E_SHADER_3_0
/* separate for easier maintenance */
#include "menbbloomsettings.fx"
#include "menbbloominternals.fx"
#include "menbbloomfilters.fx"

View file

@ -1,616 +1,12 @@
#define POSTPROCESS 2
float EBrightnessV2Day <
string UIName="EBrightnessV2Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {0.4};
float EAdaptationMinV2Day <
string UIName="EAdaptationMinV2Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {0.05};
float EAdaptationMaxV2Day <
string UIName="EAdaptationMaxV2Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {0.15};
float EToneMappingCurveV2Day <
string UIName="EToneMappingCurveV2Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.0};
float EIntensityContrastV2Day <
string UIName="EIntensityContrastV2Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.0};
float EToneMappingOversaturationV2Day <
string UIName="EToneMappingOversaturationV2Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=200.0;
> = {40.0};
float EColorSaturationV2Day <
string UIName="EColorSaturationV2Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.3};
float EBrightnessV2Night <
string UIName="EBrightnessV2Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.0};
float EAdaptationMinV2Night <
string UIName="EAdaptationMinV2Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {0.1};
float EAdaptationMaxV2Night <
string UIName="EAdaptationMaxV2Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {0.2};
float EToneMappingCurveV2Night <
string UIName="EToneMappingCurveV2Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {4.3};
float EIntensityContrastV2Night <
string UIName="EIntensityContrastV2Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.0};
float EToneMappingOversaturationV2Night <
string UIName="EToneMappingOversaturationV2Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=200.0;
> = {20.0};
float EColorSaturationV2Night <
string UIName="EColorSaturationV2Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.0};
float EBrightnessV2Interior <
string UIName="EBrightnessV2Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.0};
float EAdaptationMinV2Interior <
string UIName="EAdaptationMinV2Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {0.1};
float EAdaptationMaxV2Interior <
string UIName="EAdaptationMaxV2Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {0.2};
float EToneMappingCurveV2Interior <
string UIName="EToneMappingCurveV2Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {4.3};
float EIntensityContrastV2Interior <
string UIName="EIntensityContrastV2Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.0};
float EToneMappingOversaturationV2Interior <
string UIName="EToneMappingOversaturationV2Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=200.0;
> = {20.0};
float EColorSaturationV2Interior <
string UIName="EColorSaturationV2Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=50.0;
> = {1.0};
//+++++++++++++++++++++++++++++
//external parameters, do not modify
//+++++++++++++++++++++++++++++
//keyboard controlled temporary variables (in some versions exists in the config file). Press and hold key 1,2,3...8 together with PageUp or PageDown to modify. By default all set to 1.0
float4 tempF1; //0,1,2,3
float4 tempF2; //5,6,7,8
float4 tempF3; //9,0
//x=generic timer in range 0..1, period of 16777216 ms (4.6 hours), w=frame time elapsed (in seconds)
float4 Timer;
//x=Width, y=1/Width, z=ScreenScaleY, w=1/ScreenScaleY
float4 ScreenSize;
//changes in range 0..1, 0 means that night time, 1 - day time
float ENightDayFactor;
//changes 0 or 1. 0 means that exterior, 1 - interior
float EInteriorFactor;
//enb version of bloom applied, ignored if original post processing used
float EBloomAmount;
texture2D texs0;//color
texture2D texs1;//bloom skyrim
texture2D texs2;//adaptation skyrim
texture2D texs3;//bloom enb
texture2D texs4;//adaptation enb
texture2D texs7;//palette enb
sampler2D _s0 = sampler_state
{
Texture = <texs0>;
MinFilter = POINT;//
MagFilter = POINT;//
MipFilter = NONE;//LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D _s1 = sampler_state
{
Texture = <texs1>;
MinFilter = LINEAR;//
MagFilter = LINEAR;//
MipFilter = NONE;//LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D _s2 = sampler_state
{
Texture = <texs2>;
MinFilter = LINEAR;//
MagFilter = LINEAR;//
MipFilter = NONE;//LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D _s3 = sampler_state
{
Texture = <texs3>;
MinFilter = LINEAR;//
MagFilter = LINEAR;//
MipFilter = NONE;//LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D _s4 = sampler_state
{
Texture = <texs4>;
MinFilter = LINEAR;//
MagFilter = LINEAR;//
MipFilter = NONE;//LINEAR;
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;
};
struct VS_OUTPUT_POST
{
float4 vpos : POSITION;
float2 txcoord0 : TEXCOORD0;
};
struct VS_INPUT_POST
{
float3 pos : POSITION;
float2 txcoord0 : TEXCOORD0;
};
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VS_OUTPUT_POST VS_Quad(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;
}
//skyrim shader specific externals, do not modify
float4 _c1 : register(c1);
float4 _c2 : register(c2);
float4 _c3 : register(c3);
float4 _c4 : register(c4);
float4 _c5 : register(c5);
float4 PS_D6EC7DD1(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float4 _oC0=0.0; //output
float4 _c6=float4(0, 0, 0, 0);
float4 _c7=float4(0.212500006, 0.715399981, 0.0720999986, 1.0);
float4 r0;
float4 r1;
float4 r2;
float4 r3;
float4 r4;
float4 r5;
float4 r6;
float4 r7;
float4 r8;
float4 r9;
float4 r10;
float4 r11;
float4 _v0=0.0;
_v0.xy=IN.txcoord0.xy;
r1=tex2D(_s0, _v0.xy); //color
r11=r1; //my bypass
_oC0.xyz=r1.xyz; //for future use without game color corrections
float hnd = ENightDayFactor;
float pi = (1-EInteriorFactor);
#ifdef APPLYGAMECOLORCORRECTION
//apply original
r0.x=1.0/_c2.y;
r1=tex2D(_s2, _v0);
r0.yz=r1.xy * _c1.y;
r0.w=1.0/r0.y;
r0.z=r0.w * r0.z;
r1=tex2D(_s0, _v0);
r1.xyz=r1 * _c1.y;
r0.w=dot(_c7.xyz, r1.xyz);
r1.w=r0.w * r0.z;
r0.z=r0.z * r0.w + _c7.w;
r0.z=1.0/r0.z;
r0.x=r1.w * r0.x + _c7.w;
r0.x=r0.x * r1.w;
r0.x=r0.z * r0.x;
if (r0.w<0) r0.x=_c6.x;
r0.z=1.0/r0.w;
r0.z=r0.z * r0.x;
r0.x=saturate(-r0.x + _c2.x);
// r2=tex2D(_s3, _v0);//enb bloom
r2=tex2D(_s1, _v0);//skyrim bloom
r2.xyz=r2 * _c1.y;
r2.xyz=r0.x * r2;
r1.xyz=r1 * r0.z + r2;
r0.x=dot(r1.xyz, _c7.xyz);
r1.w=_c7.w;
r2=lerp(r0.x, r1, _c3.x);
r1=r0.x * _c4 - r2;
r1=_c4.w * r1 + r2;
r1=_c3.w * r1 - r0.y; //khajiit night vision _c3.w
r0=_c3.z * r1 + r0.y;
r1=-r0 + _c5;
_oC0=_c5.w * r1 + r0;
#endif //APPLYGAMECOLORCORRECTION
/*
#ifndef APPLYGAMECOLORCORRECTION
//temporary fix for khajiit night vision, but it also degrade colors.
// r1=tex2D(_s2, _v0);
// r0.y=r1.xy * _c1.y;
r1=_oC0;
r1.xyz=r1 * _c1.y;
r0.x=dot(r1.xyz, _c7.xyz);
r2=lerp(r0.x, r1, _c3.x);
r1=r0.x * _c4 - r2;
r1=_c4.w * r1 + r2;
r1=_c3.w * r1;// - r0.y;
r0=_c3.z * r1;// + r0.y;
r1=-r0 + _c5;
_oC0=_c5.w * r1 + r0;
#endif //!APPLYGAMECOLORCORRECTION
enbeffect.fx : MariENB base shader.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
float4 color=_oC0;
//adaptation in time
float4 Adaptation=tex2D(_s4, 0.5);
float grayadaptation=max(max(Adaptation.x, Adaptation.y), Adaptation.z);
// grayadaptation=1.0/grayadaptation;
float4 xcolorbloom=tex2D(_s3, _v0.xy); //bloom
// float maxb=max(xcolorbloom.x, max(xcolorbloom.y, xcolorbloom.z));
// float violetamount=maxb/(maxb+EVioletShiftAmountInv);
// xcolorbloom.xyz=lerp(xcolorbloom.xyz, xcolorbloom.xyz*EVioletShiftColor, violetamount*violetamount);
//darkening if too bright screen
// float srcgray=max(color.x, max(color.y, color.z));
//v1 not good for hdr, scaling required
// color.xyz=color.xyz-(saturate(EAdaptationDarkeningAmount*grayadaptation) * color.xyz)*(1.0-saturate(srcgray*tempF2.y));
//v2
// color.xyz=color.xyz-(saturate(EAdaptationDarkeningAmount*grayadaptation) * color.xyz)*(1.0-saturate(srcgray/(srcgray+1.0*tempF2.y)));
//v3
// color.xyz=color.xyz-(saturate(EAdaptationDarkeningAmount*grayadaptation) * color.xyz)*(1.0/(srcgray*0.7+1.0));//0.7 to modify!!!
color.xyz+=xcolorbloom.xyz*EBloomAmount;
// color.xyz=color.xyz-((EAdaptationDarkeningAmount/(grayadaptation*2.0*tempF1.x+1.0)) * color.xyz)*(1.0/(srcgray*0.7+1.0));//0.7 to modify!!!
//v4
// color.xyz=color.xyz/(grayadaptation*EAdaptationAmount*tempF1.x+1.0);
//color.xyz=color.xyz+(xcolorbloom.xyz);
//color.xyz*=EColorFilter;
//color.xyz*=2.0;
//-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#if (POSTPROCESS==2)
float newEAdaptationMax = lerp( EAdaptationMaxV2Interior, ( lerp( EAdaptationMaxV2Night, EAdaptationMaxV2Day, hnd ) ), pi );
float newEAdaptationMin = lerp( EAdaptationMinV2Interior, ( lerp( EAdaptationMinV2Night, EAdaptationMinV2Day, hnd ) ), pi );
float newEBrightnessV2 = lerp( EBrightnessV2Interior, ( lerp( EBrightnessV2Night, EBrightnessV2Day, hnd ) ), pi );
float newEToneMappingCurve = lerp( EToneMappingCurveV2Interior, ( lerp( EToneMappingCurveV2Night, EToneMappingCurveV2Day, hnd ) ), pi );
float newEIntensityContrastV2 = lerp( EIntensityContrastV2Interior, ( lerp( EIntensityContrastV2Night, EIntensityContrastV2Day, hnd ) ), pi );
float newEToneMappingOversaturationV2 = lerp( EToneMappingOversaturationV2Interior, ( lerp( EToneMappingOversaturationV2Night, EToneMappingOversaturationV2Day, hnd ) ), pi );
float newEColorSaturationV2 = lerp( EColorSaturationV2Interior, ( lerp( EColorSaturationV2Night, EColorSaturationV2Day, hnd ) ), pi );
grayadaptation=max(grayadaptation, 0.0);
grayadaptation=min(grayadaptation, 50.0);
color.xyz=color.xyz/(grayadaptation*newEAdaptationMax+newEAdaptationMin);//*tempF1.x
color.xyz*=(newEBrightnessV2);
color.xyz+=0.000001;
float3 xncol=normalize(color.xyz);
float3 scl=color.xyz/xncol.xyz;
scl=pow(scl, newEIntensityContrastV2);
xncol.xyz=pow(xncol.xyz, newEColorSaturationV2);
color.xyz=scl*xncol.xyz;
float lumamax=newEToneMappingOversaturationV2;
color.xyz=(color.xyz * (1.0 + color.xyz/lumamax))/(color.xyz + newEToneMappingCurve);
#endif
//-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//pallete texture (0.082+ version feature)
#ifdef E_CC_PALETTE
color.rgb=saturate(color.rgb);
float3 brightness=Adaptation.xyz;//tex2D(_s4, 0.5);//adaptation luminance
// brightness=saturate(brightness);//old version from ldr games
brightness=(brightness/(brightness+1.0));//new version
brightness=max(brightness.x, max(brightness.y, brightness.z));//new version
float3 palette;
float4 uvsrc=0.0;
uvsrc.y=brightness.r;
uvsrc.x=color.r;
palette.r=tex2Dlod(_s7, uvsrc).r;
uvsrc.x=color.g;
uvsrc.y=brightness.g;
palette.g=tex2Dlod(_s7, uvsrc).g;
uvsrc.x=color.b;
uvsrc.y=brightness.b;
palette.b=tex2Dlod(_s7, uvsrc).b;
color.rgb=palette.rgb;
#endif //E_CC_PALETTE
/*
//temporary testing
color.xyz=tex2D(_s0, _v0.xy);
//color.xyz=xcolorbloom.xyz*tempF1.x;
//color.xyz=pow(color.xyz, 0.5);
color.xyz+=(xcolorbloom.xyz-color.xyz)*tempF1.y;
//color.xyz=xcolorbloom.xyz*tempF1.y;
color.xyz=color.xyz*tempF1.x;
//color.xyz=color.xyz/(color.xyz +1.0*tempF1.z);
color.xyz=(color.xyz * (1.0 + color.xyz/40))/(color.xyz + EToneMappingCurveV3);
Adaptation=tex2D(_s4, 0.5);
grayadaptation=max(max(Adaptation.x, Adaptation.y), Adaptation.z);
grayadaptation=max(grayadaptation, 0.0);
grayadaptation=min(grayadaptation, 50.0);
// color.xyz=Adaptation*2;//*tempF1.x
//color.xyz=tex2D(_s0, _v0.xy)*1.3;
*/
// color.xyz=tex2D(_s0, _v0.xy)*pow(tempF1.x,4);
// color.xyz=max(xcolorbloom.xyz, tex2D(_s0, _v0.xy).xyz)*pow(tempF1.x,4)*0.7;
_oC0.w=1.0;
_oC0.xyz=color.xyz;
return _oC0;
}
//switch between vanilla and mine post processing
#ifndef ENB_FLIPTECHNIQUE
technique Shader_D6EC7DD1
#else
technique Shader_ORIGINALPOSTPROCESS
#endif
{
pass p0
{
VertexShader = compile vs_3_0 VS_Quad();
PixelShader = compile ps_3_0 PS_D6EC7DD1();
ColorWriteEnable=ALPHA|RED|GREEN|BLUE;
ZEnable=FALSE;
ZWriteEnable=FALSE;
CullMode=NONE;
AlphaTestEnable=FALSE;
AlphaBlendEnable=FALSE;
SRGBWRITEENABLE=FALSE;
}
}
//original shader of post processing
#ifndef ENB_FLIPTECHNIQUE
technique Shader_ORIGINALPOSTPROCESS
#else
technique Shader_D6EC7DD1
#endif
{
pass p0
{
VertexShader = compile vs_3_0 VS_Quad();
PixelShader=
asm
{
// Parameters:
// sampler2D Avg;
// sampler2D Blend;
// float4 Cinematic;
// float4 ColorRange;
// float4 Fade;
// sampler2D Image;
// float4 Param;
// float4 Tint;
// Registers:
// Name Reg Size
// ------------ ----- ----
// ColorRange c1 1
// Param c2 1
// Cinematic c3 1
// Tint c4 1
// Fade c5 1
// Image s0 1
// Blend s1 1
// Avg s2 1
//s0 bloom result
//s1 color
//s2 is average color
ps_3_0
def c6, 0, 0, 0, 0
//was c0 originally
def c7, 0.212500006, 0.715399981, 0.0720999986, 1
dcl_texcoord v0.xy
dcl_2d s0
dcl_2d s1
dcl_2d s2
rcp r0.x, c2.y
texld r1, v0, s2
mul r0.yz, r1.xxyw, c1.y
rcp r0.w, r0.y
mul r0.z, r0.w, r0.z
texld r1, v0, s1
mul r1.xyz, r1, c1.y
dp3 r0.w, c7, r1
mul r1.w, r0.w, r0.z
mad r0.z, r0.z, r0.w, c7.w
rcp r0.z, r0.z
mad r0.x, r1.w, r0.x, c7.w
mul r0.x, r0.x, r1.w
mul r0.x, r0.z, r0.x
cmp r0.x, -r0.w, c6.x, r0.x
rcp r0.z, r0.w
mul r0.z, r0.z, r0.x
add_sat r0.x, -r0.x, c2.x
texld r2, v0, s0
mul r2.xyz, r2, c1.y
mul r2.xyz, r0.x, r2
mad r1.xyz, r1, r0.z, r2
dp3 r0.x, r1, c7
mov r1.w, c7.w
lrp r2, c3.x, r1, r0.x
mad r1, r0.x, c4, -r2
mad r1, c4.w, r1, r2
mad r1, c3.w, r1, -r0.y
mad r0, c3.z, r1, r0.y
add r1, -r0, c5
mad oC0, c5.w, r1, r0
};
ColorWriteEnable=ALPHA|RED|GREEN|BLUE;
ZEnable=FALSE;
ZWriteEnable=FALSE;
CullMode=NONE;
AlphaTestEnable=FALSE;
AlphaBlendEnable=FALSE;
SRGBWRITEENABLE=FALSE;
}
}
/* do not touch this! */
#define E_SHADER_3_0
/* separate for easier maintenance */
#include "menbeffectsettings.fx"
#include "menbeffectinternals.fx"
#include "menbeffectfilters.fx"

View file

@ -1,695 +1,13 @@
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ENBSeries effect file
// visit http://enbdev.com for updates
// Copyright (c) 2007-2011 Boris Vorontsov
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
enbeffectprepass.fx : MariENB pre-pass filters.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* do not touch this! */
#define E_SHADER_3_0
/* separate for easier maintenance */
#include "menbprepasssettings.fx"
#include "menbprepassinternals.fx"
#include "menbprepassfilters.fx"
//+++++++++++++++++++++++++++++
// Internal parameters, can be modified
//+++++++++++++++++++++++++++++
float EBlurSamplingRange = 4.0; // not used
float EApertureScale = 4.0; // not used
//+++++++++++++++++++++++++++++
// External parameters, do not modify
//+++++++++++++++++++++++++++++
// Keyboard controlled temporary variables (in some versions exists in the config file). Press and hold key 1,2,3...8 together with PageUp or PageDown to modify.
// By default all set to 1.0
float4 tempF1; //0,1,2,3
float4 tempF2; //5,6,7,8
float4 tempF3; //9,0
// x=Width, y=1/Width, z=ScreenScaleY, w=1/ScreenScaleY
float4 ScreenSize;
// x=generic timer in range 0..1, period of 16777216 ms (4.6 hours), w=frame time elapsed (in seconds)
float4 Timer;
// Adaptation delta time for focusing
float FadeFactor;
// textures
texture2D texColor;
texture2D texDepth;
texture2D texNoise;
texture2D texPalette;
texture2D texFocus; // computed focusing depth
texture2D texCurr; // 4*4 texture for focusing
texture2D texPrev; // 4*4 texture for focusing
sampler2D SamplerColor = sampler_state
{
Texture = <texColor>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Mirror;
AddressV = Mirror;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerDepth = sampler_state
{
Texture = <texDepth>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerNoise = sampler_state
{
Texture = <texNoise>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Wrap;
AddressV = Wrap;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerPalette = sampler_state
{
Texture = <texPalette>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
// for focus computation
sampler2D SamplerCurr = sampler_state
{
Texture = <texCurr>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
// for focus computation
sampler2D SamplerPrev = sampler_state
{
Texture = <texPrev>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
// for dof only in PostProcess techniques
sampler2D SamplerFocus = sampler_state
{
Texture = <texFocus>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
struct VS_OUTPUT_POST
{
float4 vpos : POSITION;
float2 txcoord : TEXCOORD0;
};
struct VS_INPUT_POST
{
float3 pos : POSITION;
float2 txcoord : TEXCOORD0;
};
////////////////////////////////////////////////////////////////////
// Begin focusing (by Boris Vorontsov)
////////////////////////////////////////////////////////////////////
VS_OUTPUT_POST VS_Focus(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;
}
//SRCpass1X=ScreenWidth;
//SRCpass1Y=ScreenHeight;
//DESTpass2X=4;
//DESTpass2Y=4;
float4 PS_ReadFocus(VS_OUTPUT_POST IN) : COLOR
{
float res = tex2D(SamplerDepth, 0.5).x;
//float3 color = tex2D(SamplerColor, 0.5).rgb;
return res;
}
//SRCpass1X=4;
//SRCpass1Y=4;
//DESTpass2X=4;
//DESTpass2Y=4;
float4 PS_WriteFocus(VS_OUTPUT_POST IN) : COLOR
{
float res = 0.0;
float curr = tex2D(SamplerCurr, 0.5).x;
float prev = tex2D(SamplerPrev, 0.5).x;
res = lerp(prev, curr, saturate(FadeFactor));// time elapsed factor
res = max(res, 0.0);
return res;
}
technique ReadFocus
{
pass P0
{
VertexShader = compile vs_3_0 VS_Focus();
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_Focus();
PixelShader = compile ps_3_0 PS_WriteFocus();
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
////////////////////////////////////////////////////////////////////
// End focusing code
////////////////////////////////////////////////////////////////////
/*------------------------------------------------------------------------------
ENB prepass modification 2.0.6 by Matso
Credits to Boris Vorontsov
------------------------------------------------------------------------------*/
// Effects enabling options
//#define ENABLE_DOF 1 // comment to disable depth of field
#define ENABLE_FAST_DOF 1 // comment to disable fast depth of field (never use both ENABLE_DOF and ENABLE_FAST_DOF - possible game crash or horrible FPS drop)
//#define ENABLE_SHARP 1 // comment to disable sharpening
//#define ENABLE_CHROMA 1 // comment to disable chromatic aberration (additional chromatic aberration applied beyond depth of field)
// Methods enabling options
//#define USE_CHROMA_DOF 1 // comment it to disable chromatic aberration sampling in DoF
#define USE_SMOOTH_DOF 1 // comment it to disable smooth DoF
#define USE_BOKEH_DOF 1 // comment it to disable bokeh DoF
//#define USE_ANAMFLARE 1 // comment it to disable anamorphic lens flare (not working very well -_-)
#define USE_DOUBLE_BLUR 1 // comment it to disable additional blur
// Useful constants
#define SEED Timer.x
#define PI 3.1415926535897932384626433832795
#define CHROMA_POW 65.0 // the bigger the value, the more visible chomatic aberration effect in DoF
// Fast DoF constants
#define DOF_SCALE 2356.1944901923449288469825374596 // PI * 750
#define FIRST_PASS 0 // only 0, 1, 2, or 3
#define SECOND_PASS 1 // only 0, 1, 2, or 3
#define THIRD_PASS 2 // only 0, 1, 2, or 3
#define FOURTH_PASS 3 // only 0, 1, 2, or 3
#define DOF(sd,sf) fBlurScale * smoothstep(fDofBias, fDofCutoff, abs(sd - sf))
#define USE_NATURAL_BOKEH 1
// Chromatic aberration parameters
float3 fvChroma = float3(0.995, 1.000, 1.005); // displacement scales of red, green and blue respectively
float fBaseRadius = 0.9; // below this radius the effect is less visible
float fFalloffRadius = 1.8; // over this radius the effects is maximal
float fChromaPower = 1.0; // power of the chromatic displacement (curve of the 'fvChroma' vector)
// Sharpen parameters
float fSharpScale = 0.32; // intensity of sharpening
float2 fvTexelSize = float2(1.0 / 1920.0, 1.0 / 1080.0); // set your resolution sizes
// Depth of field parameters
float fFocusBias = 0.045; // bigger values for nearsightedness, smaller for farsightedness (lens focal point distance)
float fDofCutoff = 0.25; // manages the smoothness of the DoF (bigger value results in wider depth of field)
float fDofBias = 0.12; // distance not taken into account in DoF (all closer then the distance is in focus)
float fBlurScale = 0.002; // governs image blur scale (the bigger value, the stronger blur)
float fBlurCutoff = 0.1; // bluring tolerance depending on the pixel and sample depth (smaller causes objects edges to be preserved)
// Bokeh parameters
float fBokehCurve = 2.0; // the larger the value, the more visible the bokeh effect is
float fBokehIntensity = 0.95; // governs bokeh brightness
float fBokehConstant = 0.1; // constant value of the bokeh weighting (bigger cause more powerful bokeh)
// Grain parameters
float fGrainFreq = 2000.0; // movie grain frequency
float fGrainScale = 0.02; // effect scale
// Anamorphic flare parameters (by default not used)
float fLuminance = 0.85; // bright pass luminance value
float fBlur = 2000.0; // blur amount, manages the size of the flare
float fIntensity = 0.25; // effect intensity
// External parameters
extern float fWaterLevel = 1.0; // DO NOT CHANGE - must be 1.0 for now!
/**
* Chromatic aberration function - given texture coordinate and a focus value
* retrieves chromatically distorted color of the pixel. Each of the color
* channels are displaced according to the pixel coordinate and its distance
* from the center of the image. Also the DoF out-of-focus value is applied.
* (http://en.wikipedia.org/wiki/Chromatic_aberration)
*/
float4 ChromaticAberration(float2 tex, float outOfFocus)
{
float d = distance(tex, float2(0.5, 0.5));
float f = smoothstep(fBaseRadius, fFalloffRadius, d + outOfFocus * d);
float3 chroma = pow(f + fvChroma, fChromaPower);
float2 tr = ((2.0 * tex - 1.0) * chroma.r) * 0.5 + 0.5;
float2 tg = ((2.0 * tex - 1.0) * chroma.g) * 0.5 + 0.5;
float2 tb = ((2.0 * tex - 1.0) * chroma.b) * 0.5 + 0.5;
float3 color = float3(tex2D(SamplerColor, tr).r, tex2D(SamplerColor, tg).g, tex2D(SamplerColor, tb).b) * (1.0 - f);
return float4(color, 1.0);
}
/**
* Chromatic aberration done accoriding to the focus factor provided.
*/
float4 ChromaticAberrationFocus(float2 tex, float outOfFocus)
{
float d = distance(tex, float2(0.5, 0.5));
float f = smoothstep(fBaseRadius, fFalloffRadius, d);
float3 chroma = pow(f + fvChroma, CHROMA_POW * outOfFocus * fChromaPower);
float2 tr = ((2.0 * tex - 1.0) * chroma.r) * 0.5 + 0.5;
float2 tg = ((2.0 * tex - 1.0) * chroma.g) * 0.5 + 0.5;
float2 tb = ((2.0 * tex - 1.0) * chroma.b) * 0.5 + 0.5;
float3 color = float3(tex2D(SamplerColor, tr).r, tex2D(SamplerColor, tg).g, tex2D(SamplerColor, tb).b) * (1.0 - outOfFocus);
return float4(color, 1.0);
}
/**
* Pseudo-random number generator - returns a number generated according to the provided vector.
*/
float Random(float2 co)
{
return frac(sin(dot(co.xy, float2(12.9898, 78.233))) * 43758.5453);
}
/**
* Movie grain function - returns a random, time scaled value for the given pixel coordinate.
*/
float Grain(float3 tex)
{
float r = Random(tex.xy);
float grain = sin(PI * tex.z * r * fGrainFreq) * fGrainScale * r;
return grain;
}
/**
* Bright pass - rescales sampled pixel to emboss bright enough value.
*/
float3 BrightPass(float2 tex)
{
float3 c = tex2D(SamplerColor, tex).rgb;
float3 bC = max(c - float3(fLuminance, fLuminance, fLuminance), 0.0);
float bright = dot(bC, 1.0);
bright = smoothstep(0.0f, 0.5, bright);
return lerp(0.0, c, bright);
}
float3 BrightColor(float3 c)
{
float3 bC = max(c - float3(fLuminance, fLuminance, fLuminance), 0.0);
float bright = dot(bC, 1.0);
bright = smoothstep(0.0f, 0.5, bright);
return lerp(0.0, c, bright);
}
/**
* Anamorphic sampling function - scales pixel coordinate
* to stratch the image along one of the axels.
* (http://en.wikipedia.org/wiki/Anamorphosis)
*/
float3 AnamorphicSample(int axis, float2 tex, float blur)
{
tex = 2.0 * tex - 1.0;
if (!axis) tex.x /= -blur;
else tex.y /= -blur;
tex = 0.5 * tex + 0.5;
return BrightPass(tex);
}
/**
* Converts pixel color to gray-scale.
*/
float GrayScale(float3 sample)
{
return dot(sample, float3(0.3, 0.59, 0.11));
}
/**
* Returns an under water distortion according to the given coordinate and time factor.
*/
float2 UnderWaterDistortion(float2 coord)
{
float2 distortion = float2(0.0, 0.0);
// TODO:...
return coord;// + distortion * (fWaterLevel - 1.0);
}
///// Shaders ////////////////////////////////////////////////////////////////////////////////
// Vertex shader (Boris code)
VS_OUTPUT_POST VS_PostProcess(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;
}
// Sharpen pixel shader (Matso code)
float4 PS_ProcessPass_Sharpen(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 Color = 9.0 * tex2D(SamplerColor, coord.xy);
Color -= tex2D(SamplerColor, coord.xy + float2(-fvTexelSize.x, fvTexelSize.y) * fSharpScale);
Color -= tex2D(SamplerColor, coord.xy + float2(0.0, fvTexelSize.y) * fSharpScale);
Color -= tex2D(SamplerColor, coord.xy + float2(fvTexelSize.x, fvTexelSize.y) * fSharpScale);
Color -= tex2D(SamplerColor, coord.xy + float2(fvTexelSize.x, 0.0) * fSharpScale);
Color -= tex2D(SamplerColor, coord.xy + float2(fvTexelSize.x, -fvTexelSize.y) * fSharpScale);
Color -= tex2D(SamplerColor, coord.xy + float2(0.0, -fvTexelSize.y) * fSharpScale);
Color -= tex2D(SamplerColor, coord.xy + float2(-fvTexelSize.x, -fvTexelSize.y) * fSharpScale);
Color -= tex2D(SamplerColor, coord.xy + float2(-fvTexelSize.x, 0.0) * fSharpScale);
Color.a = 1.0;
return Color;
}
// Anamorphic lens flare pixel shader (Matso code)
float4 PS_ProcessPass_Anamorphic(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float4 res;
float2 coord = IN.txcoord.xy;
float3 anamFlare = AnamorphicSample(0, coord.xy, fBlur) * float3(0.0, 0.0, 1.0);
res.rgb = anamFlare * fIntensity;
res.a = 1.0;
return res;
}
// Fast depth of field pixel shader (Matso code)
float4 PS_ProcessPass_FastDoF(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform int axis) : COLOR
{
float4 res;
float2 base = UnderWaterDistortion(IN.txcoord.xy);
float4 tcol = tex2D(SamplerColor, base.xy);
float sd = tex2D(SamplerDepth, base).x;
#ifndef USE_SMOOTH_DOF
float sf = tex2D(SamplerDepth, 0.5).x - fFocusBias * fWaterLevel;
#else
float sf = tex2D(SamplerFocus, 0.5).x - fFocusBias * 2.0 * fWaterLevel;
#endif
float outOfFocus = DOF(sd, sf);
float offset[4] = { -1.282, -0.524, 0.524, 1.282 };
#ifndef USE_NATURAL_BOKEH
float2 tds[4] = { float2(1.0, 0.0), float2(0.0, 1.0), float2(0.707, 0.707), float2(-0.707, 0.707) };
#else
float2 tds[16] = {
float2(0.2007, 0.9796),
float2(-0.2007, 0.9796),
float2(0.2007, 0.9796),
float2(-0.2007, 0.9796),
float2(0.8240, 0.5665),
float2(0.5665, 0.8240),
float2(0.8240, 0.5665),
float2(0.5665, 0.8240),
float2(0.9796, 0.2007),
float2(0.9796, -0.2007),
float2(0.9796, 0.2007),
float2(0.9796, -0.2007),
float2(-0.8240, 0.5665),
float2(-0.5665, 0.8240),
float2(-0.8240, 0.5665),
float2(-0.5665, 0.8240)
};
#endif
float blur = DOF_SCALE * outOfFocus;
float wValue = 1.0;
#ifndef USE_NATURAL_BOKEH
tdirs[axis].x *= fvTexelSize.x;
tdirs[axis].y *= fvTexelSize.y;
#endif
#ifdef USE_BOKEH_DOF
blur *= 0.35;
#endif
for (int i = 0; i < 4; i++)
{
#ifndef USE_NATURAL_BOKEH
float2 tdir = offset[i] * tds[axis] * blur;
#else
float2 tdir = tds[axis * 4 + i] * fvTexelSize * offset[i] * blur;
#endif
float2 coord = base + tdir.xy;
#ifdef USE_CHROMA_DOF
float4 ct = ChromaticAberrationFocus(coord.xy, outOfFocus);
#else
float4 ct = tex2D(SamplerColor, coord.xy);
#endif
float sds = tex2D(SamplerDepth, coord).x;
#ifndef USE_BOKEH_DOF
float w = 1.0 + abs(offset[i]); // weight blur for better effect
#else
#if USE_BOKEH_DOF == 1 // my own bokeh weighting
float b = GrayScale(ct.rgb) + length(ct.rgb) + fBokehConstant + blur;
float w = pow(b * fBokehIntensity, fBokehCurve) + abs(offset[i]) + blur;
#endif
#endif
w *= (1.0 - smoothstep(0.0, fBlurCutoff, abs(sds - sd)));
tcol += ct * w;
wValue += w;
}
tcol /= wValue;
res.xyz = tcol.xyz;
res.w = 1.0;
return res;
}
// Chromatic abrration with no DoF (Matso code)
float4 PS_ProcessPass_Chroma(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 result = ChromaticAberration(coord.xy, 0.0);
result.a = 1.0;
return result;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef ENABLE_SHARP
technique PostProcess
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader = compile ps_3_0 PS_ProcessPass_Sharpen();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
#ifdef USE_ANAMFLARE
pass P1
{
AlphaBlendEnable = true;
SrcBlend = One;
DestBlend = One;
PixelShader = compile ps_3_0 PS_ProcessPass_Anamorphic();
}
#endif
}
#endif
#ifndef ENABLE_FAST_DOF
#ifdef ENABLE_CHROMA
#ifndef ENABLE_SHARP
technique PostProcess
#else
technique PostProcess2
#endif
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader = compile ps_3_0 PS_ProcessPass_Chroma();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
#endif
#endif
#ifndef ENABLE_CHROMA
#ifdef ENABLE_FAST_DOF
#ifndef ENABLE_SHARP
technique PostProcess
#else
technique PostProcess2
#endif
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader = compile ps_3_0 PS_ProcessPass_FastDoF(FIRST_PASS);
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
#ifndef ENABLE_SHARP
technique PostProcess2
#else
technique PostProcess3
#endif
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader = compile ps_3_0 PS_ProcessPass_FastDoF(SECOND_PASS);
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
#ifdef USE_DOUBLE_BLUR
#ifndef ENABLE_SHARP
technique PostProcess3
#else
technique PostProcess4
#endif
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader = compile ps_3_0 PS_ProcessPass_FastDoF(THIRD_PASS);
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
#ifndef ENABLE_SHARP
technique PostProcess4
#else
technique PostProcess5
#endif
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader = compile ps_3_0 PS_ProcessPass_FastDoF(FOURTH_PASS);
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
#endif
#endif
#endif

View file

@ -1,351 +1,58 @@
//++++++++++++++++++++++++++++++++++++++++++++
// ENBSeries effect file
// visit http://enbdev.com for updates
// Copyright (c) 2007-2013 Boris Vorontsov
//++++++++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++
//internal parameters, can be modified
//+++++++++++++++++++++++++++++
//none
//+++++++++++++++++++++++++++++
//external parameters, do not modify
//+++++++++++++++++++++++++++++
//keyboard controlled temporary variables (in some versions exists in the config file). Press and hold key 1,2,3...8 together with PageUp or PageDown to modify. By default all set to 1.0
float4 tempF1; //0,1,2,3
float4 tempF2; //5,6,7,8
float4 tempF3; //9,0
//x=Width, y=1/Width, z=ScreenScaleY, w=1/ScreenScaleY
float4 ScreenSize;
//changes in range 0..1, 0 means that night time, 1 - day time
float ENightDayFactor;
//changes 0 or 1. 0 means that exterior, 1 - interior
float EInteriorFactor;
//x=generic timer in range 0..1, period of 16777216 ms (4.6 hours), w=frame time elapsed (in seconds)
float4 Timer;
//additional info for computations
float4 TempParameters;
//x=reflection intensity, y=reflection power, z=dirt intensity, w=dirt power
float4 LensParameters;
//fov in degrees
float FieldOfView;
texture2D texColor;
texture2D texMask;//enblensmask texture
texture2D texBloom1;
texture2D texBloom2;
texture2D texBloom3;
texture2D texBloom4;
texture2D texBloom5;
texture2D texBloom6;
texture2D texBloom7;
texture2D texBloom8;
sampler2D SamplerColor = sampler_state
{
Texture = <texColor>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerMask = sampler_state
{
Texture = <texMask>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom1 = sampler_state
{
Texture = <texBloom1>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom2 = sampler_state
{
Texture = <texBloom2>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom3 = sampler_state
{
Texture = <texBloom3>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom4 = sampler_state
{
Texture = <texBloom4>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom5 = sampler_state
{
Texture = <texBloom5>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom6 = sampler_state
{
Texture = <texBloom6>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom7 = sampler_state
{
Texture = <texBloom7>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerBloom8 = sampler_state
{
Texture = <texBloom8>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
/*
enblens.fx : MariENB Lens filters.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* Effects have yet to be implemented. Sorry for the inconvenience. */
struct VS_OUTPUT_POST
{
float4 vpos : POSITION;
float4 vpos : POSITION;
float2 txcoord0 : TEXCOORD0;
};
struct VS_INPUT_POST
{
float3 pos : POSITION;
float3 pos : POSITION;
float2 txcoord0 : TEXCOORD0;
};
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VS_OUTPUT_POST VS_Draw(VS_INPUT_POST IN)
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+TempParameters.xy;//1.0/(bloomtexsize*2.0)
OUT.vpos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
OUT.txcoord0.xy = IN.txcoord0.xy;
return OUT;
}
float4 PS_Draw(VS_OUTPUT_POST In) : COLOR
float4 PS_Dummy( VS_OUTPUT_POST In ) : COLOR
{
float4 res=0.0;
float2 coord;
//deepness, curvature, inverse size
const float3 offset[4]=
{
float3(1.6, 4.0, 1.0),
float3(0.7, 0.25, 2.0),
float3(0.3, 1.5, 0.5),
float3(-0.5, 1.0, 1.0)
};
//color filter per reflection
const float3 factors[4]=
{
float3(0.3, 0.4, 0.4),
float3(0.2, 0.4, 0.5),
float3(0.5, 0.3, 0.7),
float3(0.1, 0.2, 0.7)
};
for (int i=0; i<4; i++)
{
float2 distfact=(In.txcoord0.xy-0.5);
coord.xy=offset[i].x*distfact;
coord.xy*=pow(2.0*length(float2(distfact.x*ScreenSize.z,distfact.y)), offset[i].y);
coord.xy*=offset[i].z;
coord.xy=0.5-coord.xy;//v1
// coord.xy=In.txcoord0.xy-coord.xy;//v2
float3 templens=tex2D(SamplerBloom2, coord.xy);
templens=templens*factors[i];
distfact=(coord.xy-0.5);
distfact*=2.0;
templens*=saturate(1.0-dot(distfact,distfact));//limit by uv 0..1
// templens=factors[i] * (1.0-dot(distfact,distfact));
float maxlens=max(templens.x, max(templens.y, templens.z));
// float3 tempnor=(templens.xyz/maxlens);
// tempnor=pow(tempnor, tempF1.z);
// templens.xyz=tempnor.xyz*maxlens;
float tempnor=(maxlens/(1.0+maxlens));
tempnor=pow(tempnor, LensParameters.y);
templens.xyz*=tempnor;
res.xyz+=templens;
}
res.xyz*=0.25*LensParameters.x;
//add mask
{
coord=In.txcoord0.xy;
//coord.y*=ScreenSize.w;//remove stretching of image
float4 mask=tex2D(SamplerMask, coord);
float3 templens=tex2D(SamplerBloom6, In.txcoord0.xy);
float maxlens=max(templens.x, max(templens.y, templens.z));
float tempnor=(maxlens/(1.0+maxlens));
tempnor=pow(tempnor, LensParameters.w);
templens.xyz*=tempnor * LensParameters.z;
res.xyz+=mask.xyz * templens.xyz;
}
return res;
return 0.0;
}
//blurring may required when quality of blurring is too bad for bilinear filtering on screen
float4 PS_LensPostPass(VS_OUTPUT_POST In) : COLOR
{
float4 res=0.0;
/*
//blur
const float2 offset[4]=
{
float2( 1.25, 1.25),
float2( 1.25,-1.25),
float2(-1.25, 1.25),
float2(-1.25,-1.25)
};
//float2 screenfact=TempParameters.y;
//screenfact.y*=ScreenSize.z;
float2 screenfact=ScreenSize.y;
screenfact.y*=ScreenSize.z;
for (int i=0; i<4; i++)
{
float2 coord=offset[i].xy*screenfact.xy+In.txcoord0.xy;
res.xyz+=tex2D(SamplerColor, coord);
}
res.xyz*=0.25;
res.xyz=min(res.xyz, 32768.0);
res.xyz=max(res.xyz, 0.0);
*/
//no blur
res=tex2D(SamplerColor, In.txcoord0.xy);
res.xyz=min(res.xyz, 32768.0);
res.xyz=max(res.xyz, 0.0);
return res;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//actual computation, draw all effects to small texture
technique Draw
{
pass p0
{
VertexShader = compile vs_3_0 VS_Draw();
PixelShader = compile ps_3_0 PS_Draw();
ColorWriteEnable=ALPHA|RED|GREEN|BLUE;
CullMode=NONE;
AlphaBlendEnable=FALSE;
AlphaTestEnable=FALSE;
SeparateAlphaBlendEnable=FALSE;
SRGBWriteEnable=FALSE;
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;
}
}
//final pass, output to screen with additive blending and no alpha
technique LensPostPass
{
pass p0
{
VertexShader = compile vs_3_0 VS_Draw();
PixelShader = compile ps_3_0 PS_LensPostPass();
AlphaBlendEnable=TRUE;
SrcBlend=ONE;
DestBlend=ONE;
ColorWriteEnable=RED|GREEN|BLUE;//warning, no alpha output!
CullMode=NONE;
AlphaTestEnable=FALSE;
SeparateAlphaBlendEnable=FALSE;
SRGBWriteEnable=FALSE;
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;
}
}

View file

@ -1,88 +0,0 @@
; enblocal.ini : ENB configuration file.
; (C)2013 Marisa Kirisame, UnSX Team.
; Part of MariENB, the personal ENB of Marisa.
; Released under the MIT License.
[PROXY]
EnableProxyLibrary=false
InitProxyFunctions=false
ProxyLibrary=
[GLOBAL]
UsePatchSpeedhackWithoutGraphics=false
UseDefferedRendering=true
ForceFakeVideocard=false
IgnoreCreationKit=true
[PERFORMANCE]
SpeedHack=true
EnableOcclusionCulling=true
[MULTIHEAD]
ForceVideoAdapterIndex=false
VideoAdapterIndex=0
[MEMORY]
ExpandSystemMemoryX64=true
ReduceSystemMemoryUsage=true
DisableDriverMemoryManager=false
ReservedMemorySizeMb=1024
EnableUnsafeMemoryHacks=false
DisablePreloadToVRAM=true
VideoMemorySizeMb=1024
EnableCompression=true
AutodetectVideoMemorySize=true
[WINDOW]
ForceBorderless=true
ForceBorderlessFullscreen=true
[ENGINE]
ForceAnisotropicFiltering=true
MaxAnisotropy=16
EnableVSync=false
AddDisplaySuperSamplingResolutions=false
VSyncSkipNumFrames=0
ForceLodBias=true
LodBias=-0.5
[LIMITER]
WaitBusyRenderer=true
EnableFPSLimit=true
FPSLimit=60.0
[INPUT]
KeyReadConfig=8
KeyCombination=16
KeyUseEffect=123
KeyFPSLimit=0
KeyShowFPS=106
KeyScreenshot=44
KeyEditor=13
KeyFreeVRAM=115
[ADAPTIVEQUALITY]
Enable=false
Quality=2
DesiredFPS=60.0
[FIX]
FixPhysics=true
FixGameBugs=true
FixParallaxBugs=true
FixAliasedTextures=true
IgnoreLoadingScreen=false
IgnoreInventory=true
FixSsaoWaterTransparency=true
FixSsaoHairTransparency=true
FixTintGamma=true
RemoveBlur=false
FixSubSurfaceScattering=true
FixSkyReflection=true
FixCursorVisibility=true
[ANTIALIASING]
EnableEdgeAA=false
EnableSubPixelAA=false
EnableTemporalAA=true
EnableTransparencyAA=false

View file

@ -1,19 +1,19 @@
; enbseries.ini : ENB configuration file.
; (C)2013 Marisa Kirisame, UnSX Team.
; (C)2013-2014 Marisa Kirisame, UnSX Team.
; Part of MariENB, the personal ENB of Marisa.
; Released under the MIT License.
[GLOBAL]
AdditionalConfigFile=
UseEffect=false
UseEffect=true
[EFFECT]
UseOriginalPostProcessing=false
UseOriginalObjectsProcessing=false
EnableBloom=true
EnableAdaptation=false
EnableAmbientOcclusion=true
EnableDepthOfField=false
EnableAmbientOcclusion=false
EnableDepthOfField=true
EnableDetailedShadow=true
EnableSunRays=true
EnableSkyLighting=true
@ -33,8 +33,8 @@ EnableMist=true
[BLOOM]
Quality=1
AmountDay=0.06
AmountNight=0.09
AmountDay=0.5
AmountNight=0.85
AmountInterior=1.35
BlueShiftAmountDay=21.369999
BlueShiftAmountNight=13.0
@ -42,13 +42,13 @@ BlueShiftAmountInterior=12.0
ContrastDay=1.0
ContrastNight=3.0
ContrastInterior=2.0
AmountSunrise=0.19
AmountSunset=0.15
AmountInteriorDay=0.1
AmountInteriorNight=0.11
AmountSunrise=1.02
AmountSunset=1.31
AmountInteriorDay=0.66
AmountInteriorNight=0.9
BlueShiftAmountSunrise=15.77
BlueShiftAmountSunset=17.539999
BlueShiftAmountInteriorDay=19.209999
BlueShiftAmountSunset=17.530001
BlueShiftAmountInteriorDay=19.219999
BlueShiftAmountInteriorNight=14.86
IgnoreWeatherSystem=true
@ -79,17 +79,17 @@ FadeFogRangeInterior=0.0
SizeScale=0.5
SourceTexturesScale=0.5
FilterQuality=1
AOAmount=2.24
AOAmount=2.44
ILAmount=0.0
UseComplexAmbientOcclusion=true
UseComplexAmbientOcclusion=false
UseAmbientIndirectLighting=false
SamplingPrecision=1
FadeFogRange=4.18
FadeFogRange=3.14
FilterType=0
AOAmountInterior=2.04
AOAmountInterior=2.71
ILAmountInterior=0.0
AOIntensity=1.13
AOIntensityInterior=1.01
AOIntensity=1.49
AOIntensityInterior=1.51
AOType=0
AOMixingType=0
AOMixingTypeInterior=0
@ -107,7 +107,7 @@ DetectorLevelCurve=1.0
DetectorOldVersion=false
[ADAPTATION]
ForceMinMaxValues=false
ForceMinMaxValues=true
AdaptationSensitivity=0.35
AdaptationTime=3.22
AdaptationMin=0.85001
@ -115,40 +115,40 @@ AdaptationMax=1.23
[ENVIRONMENT]
DirectLightingIntensityDay=1.29
DirectLightingIntensityNight=1.28
DirectLightingIntensityNight=1.32
DirectLightingIntensityInterior=1.014688
DirectLightingCurveDay=1.24
DirectLightingCurveNight=1.28
DirectLightingCurveNight=1.15
DirectLightingCurveInterior=1.25
DirectLightingDesaturationDay=0.0
DirectLightingDesaturationNight=0.0
DirectLightingDesaturationInterior=0.0
SpecularAmountMultiplierDay=0.81
SpecularAmountMultiplierNight=1.07
SpecularAmountMultiplierDay=1.15
SpecularAmountMultiplierNight=1.44
SpecularAmountMultiplierInterior=1.0
SpecularPowerMultiplierDay=0.641
SpecularPowerMultiplierNight=0.401
SpecularPowerMultiplierDay=1.551
SpecularPowerMultiplierNight=1.651
SpecularPowerMultiplierInterior=1.0
SpecularFromLightDay=0.0
SpecularFromLightNight=0.0
SpecularFromLightInterior=0.0
AmbientLightingIntensityDay=0.66
AmbientLightingIntensityNight=0.16
AmbientLightingIntensityNight=0.22
AmbientLightingIntensityInterior=0.914
AmbientLightingCurveDay=1.29
AmbientLightingCurveNight=1.29
AmbientLightingCurveNight=1.18
AmbientLightingCurveInterior=0.75
AmbientLightingDesaturationDay=0.0
AmbientLightingDesaturationNight=0.0
AmbientLightingDesaturationInterior=0.0
PointLightingIntensityDay=1.04
PointLightingIntensityNight=1.26
PointLightingIntensityDay=1.29
PointLightingIntensityNight=2.15
PointLightingIntensityInterior=0.825
PointLightingCurveDay=1.01875
PointLightingCurveNight=1.21
PointLightingCurveDay=1.26875
PointLightingCurveNight=1.56
PointLightingCurveInterior=0.825
PointLightingDesaturationDay=0.07
PointLightingDesaturationNight=0.06
PointLightingDesaturationDay=0.12
PointLightingDesaturationNight=0.3
PointLightingDesaturationInterior=0.0
FogColorMultiplierDay=0.6
FogColorMultiplierNight=0.51
@ -159,26 +159,26 @@ FogColorCurveInterior=1.0
ColorPowDay=1.0
ColorPowNight=1.0
ColorPowInterior=0.9
DirectLightingIntensitySunrise=1.3
DirectLightingIntensitySunset=1.41
DirectLightingIntensitySunrise=1.55
DirectLightingIntensitySunset=2.09
DirectLightingIntensityInteriorDay=1.27
DirectLightingIntensityInteriorNight=1.28
DirectLightingCurveSunrise=1.37
DirectLightingCurveSunset=1.48
DirectLightingIntensityInteriorNight=1.27
DirectLightingCurveSunrise=1.59
DirectLightingCurveSunset=1.91
DirectLightingCurveInteriorDay=1.05
DirectLightingCurveInteriorNight=1.23
DirectLightingCurveInteriorNight=1.11
DirectLightingDesaturationSunrise=0.0
DirectLightingDesaturationSunset=0.0
DirectLightingDesaturationInteriorDay=0.0
DirectLightingDesaturationInteriorNight=0.0
SpecularAmountMultiplierSunrise=1.17
SpecularAmountMultiplierSunset=1.2
SpecularAmountMultiplierInteriorDay=0.92
SpecularAmountMultiplierInteriorNight=1.1
SpecularPowerMultiplierSunrise=0.231
SpecularPowerMultiplierSunset=0.211
SpecularPowerMultiplierInteriorDay=0.491
SpecularPowerMultiplierInteriorNight=0.441
SpecularAmountMultiplierSunrise=1.49
SpecularAmountMultiplierSunset=1.51
SpecularAmountMultiplierInteriorDay=1.27
SpecularAmountMultiplierInteriorNight=1.38
SpecularPowerMultiplierSunrise=1.181
SpecularPowerMultiplierSunset=1.141
SpecularPowerMultiplierInteriorDay=1.241
SpecularPowerMultiplierInteriorNight=1.441
SpecularFromLightSunrise=0.0
SpecularFromLightSunset=0.0
SpecularFromLightInteriorDay=0.0
@ -198,9 +198,9 @@ AmbientLightingDesaturationInteriorNight=0.0
AmbientColorFilterAmountSunrise=0.12
AmbientColorFilterAmountDay=0.11
AmbientColorFilterAmountSunset=0.14
AmbientColorFilterAmountNight=0.17
AmbientColorFilterAmountNight=0.33
AmbientColorFilterAmountInteriorDay=0.11
AmbientColorFilterAmountInteriorNight=0.15
AmbientColorFilterAmountInteriorNight=0.24
AmbientColorFilterTopSunrise=0.902, 0.784, 0.212
AmbientColorFilterTopDay=0.882, 0.863, 0.71
AmbientColorFilterTopSunset=0.945, 0.369, 0.0353
@ -219,24 +219,24 @@ AmbientColorFilterBottomSunset=0.851, 0.384, 0.184
AmbientColorFilterBottomNight=0.11, 0.165, 0.408
AmbientColorFilterBottomInteriorDay=0.169, 0.29, 0.294
AmbientColorFilterBottomInteriorNight=0.0824, 0.133, 0.278
PointLightingIntensitySunrise=1.11
PointLightingIntensitySunset=1.11
PointLightingIntensityInteriorDay=1.17
PointLightingIntensityInteriorNight=1.15
PointLightingCurveSunrise=1.3
PointLightingCurveSunset=1.33
PointLightingCurveInteriorDay=1.06
PointLightingCurveInteriorNight=1.16
PointLightingDesaturationSunrise=0.08
PointLightingDesaturationSunset=0.06
PointLightingDesaturationInteriorDay=0.03
PointLightingDesaturationInteriorNight=0.04
ParticleLightsIntensitySunrise=0.92
ParticleLightsIntensityDay=0.86
ParticleLightsIntensitySunset=0.93
ParticleLightsIntensityNight=0.96
ParticleLightsIntensityInteriorDay=0.62
ParticleLightsIntensityInteriorNight=0.81
PointLightingIntensitySunrise=1.72
PointLightingIntensitySunset=1.69
PointLightingIntensityInteriorDay=1.8
PointLightingIntensityInteriorNight=2.01
PointLightingCurveSunrise=1.59
PointLightingCurveSunset=1.78
PointLightingCurveInteriorDay=1.3
PointLightingCurveInteriorNight=1.45
PointLightingDesaturationSunrise=0.28
PointLightingDesaturationSunset=0.32
PointLightingDesaturationInteriorDay=0.18
PointLightingDesaturationInteriorNight=0.26
ParticleLightsIntensitySunrise=1.19
ParticleLightsIntensityDay=0.94
ParticleLightsIntensitySunset=1.14
ParticleLightsIntensityNight=1.15
ParticleLightsIntensityInteriorDay=0.77
ParticleLightsIntensityInteriorNight=0.96
FogColorMultiplierSunrise=0.4
FogColorMultiplierSunset=0.35
FogColorMultiplierInteriorDay=0.39
@ -272,7 +272,7 @@ GradientIntensityDay=1.310001
GradientIntensityNight=0.740001
GradientIntensityInterior=0.85
GradientDesaturationDay=0.29
GradientDesaturationNight=0.04
GradientDesaturationNight=0.05
GradientDesaturationInterior=0.325
GradientTopIntensityDay=2.570001
GradientTopIntensityNight=1.550001
@ -393,47 +393,47 @@ MoonDesaturationSunset=0.14
MoonDesaturationNight=0.12
MoonDesaturationInteriorDay=0.22
MoonDesaturationInteriorNight=0.13
CloudsOpacitySunrise=1.48
CloudsOpacityDay=1.52
CloudsOpacitySunset=1.37
CloudsOpacityNight=1.12
CloudsOpacityInteriorDay=1.63
CloudsOpacityInteriorNight=1.43
CloudsOpacitySunrise=0.98
CloudsOpacityDay=1.31
CloudsOpacitySunset=0.94
CloudsOpacityNight=0.48
CloudsOpacityInteriorDay=1.27
CloudsOpacityInteriorNight=0.45
CloudsEdgeFadeRange=0.95
CloudsEdgeMoonMultiplier=4.32
IgnoreWeatherSystem=true
[OBJECT]
SubSurfaceScatteringMultiplierDay=0.0
SubSurfaceScatteringMultiplierNight=0.0
SubSurfaceScatteringMultiplierDay=0.48
SubSurfaceScatteringMultiplierNight=0.26
SubSurfaceScatteringMultiplierInterior=0.0
SubSurfaceScatteringPowerDay=1.0
SubSurfaceScatteringPowerNight=1.0
SubSurfaceScatteringPowerDay=4.0
SubSurfaceScatteringPowerNight=4.6
SubSurfaceScatteringPowerInterior=1.1
SubSurfaceScatteringMultiplierSunrise=0.0
SubSurfaceScatteringMultiplierSunset=0.0
SubSurfaceScatteringMultiplierInteriorDay=0.0
SubSurfaceScatteringMultiplierInteriorNight=0.0
SubSurfaceScatteringPowerSunrise=1.0
SubSurfaceScatteringPowerSunset=1.0
SubSurfaceScatteringPowerInteriorDay=1.0
SubSurfaceScatteringPowerInteriorNight=1.0
SubSurfaceScatteringMultiplierSunrise=0.71
SubSurfaceScatteringMultiplierSunset=0.84
SubSurfaceScatteringMultiplierInteriorDay=0.31
SubSurfaceScatteringMultiplierInteriorNight=0.19
SubSurfaceScatteringPowerSunrise=2.81
SubSurfaceScatteringPowerSunset=2.52
SubSurfaceScatteringPowerInteriorDay=5.06
SubSurfaceScatteringPowerInteriorNight=5.63
IgnoreWeatherSystem=true
[LIGHTSPRITE]
IntensityDay=0.53
IntensityNight=0.81
IntensityNight=1.56
IntensityInterior=0.5
CurveDay=0.93
CurveNight=1.305
CurveInterior=0.925
IntensitySunrise=0.64
IntensitySunset=0.7
IntensityInteriorDay=1.07
IntensityInteriorNight=0.96
IntensitySunrise=0.92
IntensitySunset=0.99
IntensityInteriorDay=1.82
IntensityInteriorNight=1.75
CurveSunrise=1.16
CurveSunset=0.93
CurveInteriorDay=1.25
CurveInteriorDay=1.17
CurveInteriorNight=1.34
IgnoreWeatherSystem=true
@ -515,7 +515,7 @@ IgnoreWeatherSystem=true
[DEPTHOFFIELD]
FadeTime=0.85
Quality=1
Quality=2
IgnoreWeatherSystem=true
[RAYS]
@ -529,15 +529,15 @@ SunRaysMultiplierInteriorNight=0.44
IgnoreWeatherSystem=true
[SKYLIGHTING]
Quality=1
Quality=2
FilterQuality=1
AmbientMinLevel=0.39375
AmbientMinLevelSunrise=0.33
AmbientMinLevelDay=0.64
AmbientMinLevelSunset=0.4
AmbientMinLevelNight=0.29
AmbientMinLevelInteriorDay=0.22
AmbientMinLevelInteriorNight=0.18
AmbientMinLevelInteriorDay=0.2
AmbientMinLevelInteriorNight=0.19
IgnoreWeatherSystem=true
[WEATHER]
@ -553,18 +553,18 @@ DuskDuration=2.0
NightTime=0.0
[VEGETATION]
SubSurfaceScatteringMultiplierSunrise=0.0
SubSurfaceScatteringMultiplierDay=0.0
SubSurfaceScatteringMultiplierSunset=0.0
SubSurfaceScatteringMultiplierNight=0.0
SubSurfaceScatteringMultiplierInteriorDay=0.0
SubSurfaceScatteringMultiplierInteriorNight=0.0
SubSurfaceScatteringPowerSunrise=1.0
SubSurfaceScatteringPowerDay=1.0
SubSurfaceScatteringPowerSunset=1.0
SubSurfaceScatteringPowerNight=1.0
SubSurfaceScatteringPowerInteriorDay=1.0
SubSurfaceScatteringPowerInteriorNight=1.0
SubSurfaceScatteringMultiplierSunrise=1.24
SubSurfaceScatteringMultiplierDay=0.88
SubSurfaceScatteringMultiplierSunset=1.4
SubSurfaceScatteringMultiplierNight=1.14
SubSurfaceScatteringMultiplierInteriorDay=0.96
SubSurfaceScatteringMultiplierInteriorNight=1.08
SubSurfaceScatteringPowerSunrise=4.09
SubSurfaceScatteringPowerDay=4.44
SubSurfaceScatteringPowerSunset=3.41
SubSurfaceScatteringPowerNight=5.9
SubSurfaceScatteringPowerInteriorDay=5.31
SubSurfaceScatteringPowerInteriorNight=6.37
IgnoreWeatherSystem=true
[PARTICLE]
@ -588,7 +588,7 @@ FilterQuality=1
FilterBluriness=1.0
SizeScale=0.5
SourceTexturesScale=0.5
Amount=0.56
Amount=0.64
Power=1.41
GlosinessMin=0.0
GlosinessMax=1.0
@ -622,39 +622,39 @@ IgnoreWeatherSystem=true
[RAIN]
Enable=true
EnableAntialiasing=false
EnableAntialiasing=true
EnableSupersampling=false
MotionStretch=0.35
MotionTransparency=0.89
MotionStretch=0.38
MotionTransparency=0.86
IgnoreWeatherSystem=true
[EYES]
SubSurfaceScatteringMultiplierSunrise=0.0
SubSurfaceScatteringMultiplierDay=0.0
SubSurfaceScatteringMultiplierSunset=0.0
SubSurfaceScatteringMultiplierNight=0.0
SubSurfaceScatteringMultiplierInteriorDay=0.0
SubSurfaceScatteringMultiplierInteriorNight=0.0
SubSurfaceScatteringPowerSunrise=1.0
SubSurfaceScatteringPowerDay=1.0
SubSurfaceScatteringPowerSunset=1.0
SubSurfaceScatteringPowerNight=1.0
SubSurfaceScatteringPowerInteriorDay=1.0
SubSurfaceScatteringPowerInteriorNight=1.0
SubSurfaceScatteringMultiplierSunrise=1.5
SubSurfaceScatteringMultiplierDay=1.09
SubSurfaceScatteringMultiplierSunset=1.66
SubSurfaceScatteringMultiplierNight=1.38
SubSurfaceScatteringMultiplierInteriorDay=1.12
SubSurfaceScatteringMultiplierInteriorNight=1.26
SubSurfaceScatteringPowerSunrise=2.69
SubSurfaceScatteringPowerDay=3.83
SubSurfaceScatteringPowerSunset=2.56
SubSurfaceScatteringPowerNight=4.4
SubSurfaceScatteringPowerInteriorDay=4.11
SubSurfaceScatteringPowerInteriorNight=5.13
IgnoreWeatherSystem=true
[SUBSURFACESCATTERING]
Quality=1
Radius=2.18
Amount=0.5
EpidermalAmount=1.23
SubdermalAmount=2.25
EpidermalDiffuseSaturation=-0.13
SubdermalDiffuseSaturation=0.03
EpidermalMix=0.92
SubdermalMix=0.49
SubdermalTranslucency=0.95
SubdermalPhase=0.92
Radius=0.88
Amount=0.81
EpidermalAmount=1.52
SubdermalAmount=2.39
EpidermalDiffuseSaturation=-0.45
SubdermalDiffuseSaturation=0.23
EpidermalMix=0.6
SubdermalMix=0.55
SubdermalTranslucency=0.92
SubdermalPhase=0.75
IgnoreWeatherSystem=true
[LENS]
@ -687,20 +687,20 @@ IgnoreWeatherSystem=true
[WATER]
EnableDispersion=true
EnableCaustics=true
ReflectionAmount=0.86
FrennelMultiplier=3.16
FrennelMin=0.18
ReflectionAmount=0.58
FrennelMultiplier=3.18
FrennelMin=0.15
FrennelMax=1.0
DispersionAmount=0.93
CausticsAmount=1.46
DispersionAmount=0.91
CausticsAmount=1.47
EnableParallax=true
EnableShadow=true
EnableSelfReflection=true
EnableLighting=true
EnableDisplacement=true
DisplacementQuality=1
SunSpecularMultiplier=1.63
SunScatteringMultiplier=2.07
SunSpecularMultiplier=1.6
SunScatteringMultiplier=3.04
WavesAmplitudeSunrise=1.0
WavesAmplitudeDay=1.0
WavesAmplitudeSunset=1.0
@ -709,9 +709,9 @@ WavesAmplitudeInteriorDay=1.0
WavesAmplitudeInteriorNight=1.0
ShadowQuality=1
EnableShadowNoise=true
SunLightingMultiplier=0.76
WetMultiplier=0.7
Muddiness=0.44
SunLightingMultiplier=0.82
WetMultiplier=0.42
Muddiness=0.31
EnablePreCache=true
EnableVolumetricShadow=true
DisplacementFilterQuality=1

View file

@ -1,96 +1,165 @@
[EFFECT.TXT]
TECHNIQUE=0
EnableFXAA=false
FXAASpanMax=3.999999
FXAAReduceMul=16.0
FXAASpanMax=2.0
FXAAReduceMul=32.0
FXAAReduceMin=128.0
EnableBorderBlur=true
BorderBlurSamplingRange=1.0
BorderBlurPower=22.0
BorderBlurCurve=1.5
BorderBlurRadius=0.55
BorderBlurSize=1
EnableCrossBlur=true
CrossBlurSamplingRange=1.0
CrossBlurSize=1
BlurEnable=false
BlurSampleNight=1.0
BlurSampleDay=0.86
BlurSampleInteriorNight=0.93
BlurSampleInteriorDay=0.75
BlurLevel=1
BlurPowerNight=14.95
BlurPowerDay=11.57
BlurPowerInteriorNight=16.059999
BlurPowerInteriorDay=12.22
BlurCurveNight=1.45
BlurCurveDay=1.53
BlurCurveInteriorNight=1.32
BlurCurveInteriorDay=1.49
BlurRadiusNight=0.68
BlurRadiusDay=0.62
BlurRadiusInteriorNight=0.74
BlurRadiusInteriorDay=0.7
DarkEnable=true
DarkRadiusNight=0.35
DarkRadiusDay=0.25
DarkRadiusInteriorNight=0.45
DarkRadiusInteriorDay=0.3
DarkCurveNight=2.16
DarkCurveDay=2.45
DarkCurveInteriorNight=1.95
DarkCurveInteriorDay=2.34
DarkBumpNight=0.79
DarkBumpDay=0.62
DarkBumpInteriorNight=0.9
DarkBumpInteriorDay=0.82
EnableCompensate=true
CompensateFactor=0.19
CompensatePower=1.05
CompensateSaturation=0.3
CompensateBump=0.0
CompensateFactorNight=0.65
CompensateFactorDay=0.72
CompensateFactorInteriorNight=0.71
CompensateFactorInteriorDay=0.78
CompensatePowerNight=1.14
CompensatePowerDay=1.18
CompensatePowerInteriorNight=1.16
CompensatePowerInteriorDay=1.23
CompensateSaturationNight=0.86
CompensateSaturationDay=0.41
CompensateSaturationInteriorNight=0.82
CompensateSaturationInteriorDay=0.49
CompensateBumpNight=0.0
CompensateBumpDay=0.0
CompensateBumpInteriorNight=0.0
CompensateBumpInteriorDay=0.0
EnableGrading=true
GradingAddR=0.0
GradingAddG=0.0
GradingAddB=0.0
GradingMulR=1.02
GradingMulG=1.08
GradingMulB=1.04
GradingPowR=1.07
GradingPowG=1.12
GradingPowB=1.08
GradingColR=0.04
GradingColG=0.07
GradingColB=0.59
GradingColFactor=-0.24
EnableSoftGrain=true
SoftGrainSpeed=2.679999
SoftGrainIntensity=0.04
SoftGrainSaturation=0.09
SoftGrainPatterned=true
GradingAddRNight=0.0
GradingAddGNight=0.0
GradingAddBNight=0.0
GradingAddRDay=0.0
GradingAddGDay=0.0
GradingAddBDay=0.0
GradingAddRInteriorNight=0.0
GradingAddGInteriorNight=0.0
GradingAddBInteriorNight=0.0
GradingAddRInteriorDay=0.0
GradingAddGInteriorDay=0.0
GradingAddBInteriorDay=0.0
GradingMulRNight=3.01
GradingMulGNight=3.12
GradingMulBNight=3.24
GradingMulRDay=3.42
GradingMulGDay=3.34
GradingMulBDay=3.24
GradingMulRInteriorNight=3.57
GradingMulGInteriorNight=3.43
GradingMulBInteriorNight=3.27
GradingMulRInteriorDay=3.67
GradingMulGInteriorDay=3.56
GradingMulBInteriorDay=3.48
GradingPowRNight=1.03
GradingPowGNight=1.01
GradingPowBNight=0.95
GradingPowRDay=1.23
GradingPowGDay=1.2
GradingPowBDay=1.14
GradingPowRInteriorNight=1.07
GradingPowGInteriorNight=1.02
GradingPowBInteriorNight=0.97
GradingPowRInteriorDay=1.21
GradingPowGInteriorDay=1.16
GradingPowBInteriorDay=1.11
GradingColRNight=-0.21
GradingColGNight=-0.28
GradingColBNight=-1.41
GradingColRDay=-0.8
GradingColGDay=-0.2
GradingColBDay=-0.62
GradingColRInteriorNight=-0.52
GradingColGInteriorNight=-0.3
GradingColBInteriorNight=-1.37
GradingColRInteriorDay=-0.52
GradingColGInteriorDay=-0.36
GradingColBInteriorDay=-0.72
GradingColFactorNight=-0.27
GradingColFactorDay=-0.16
GradingColFactorInteriorNight=-0.24
GradingColFactorInteriorDay=-0.12
EnableSoftGrain=false
SoftGrainSpeedNight=0.02
SoftGrainSpeedDay=0.07
SoftGrainSpeedInteriorNight=0.01
SoftGrainSpeedInteriorDay=0.03
SoftGrainIntensityNight=0.03
SoftGrainIntensityDay=0.01
SoftGrainIntensityInteriorNight=0.03
SoftGrainIntensityInteriorDay=0.01
SoftGrainSaturationNight=-0.22
SoftGrainSaturationDay=-0.18
SoftGrainSaturationInteriorNight=-0.24
SoftGrainSaturationInteriorDay=-0.31
SoftGrainTwopass=false
SoftGrainBlendfunc=1
SoftGrainDeviation=0.05
SoftGrainMagnification11=2.049997
SoftGrainMagnification12=3.109994
SoftGrainMagnification1=13.69
SoftGrainMagnification2=19.26
SoftGrainMagnification3=17.889999
SoftGrainMagnification11=2.05
SoftGrainMagnification12=3.11
SoftGrainMagnification13=2.22
SoftGrainMagnification21=4.249999
SoftGrainMagnification22=0.419999
SoftGrainMagnification23=6.290002
SoftGrainPower=2.93
SoftGrainMagnification21=4.25
SoftGrainMagnification22=0.42
SoftGrainMagnification23=6.29
SoftGrainPowerNight=2.16
SoftGrainPowerDay=5.22
SoftGrainPowerInteriorNight=2.59
SoftGrainPowerInteriorDay=4.7
EnableBlockGFX=false
BlockGFXResolutionW=1.0
BlockGFXResolutionH=1.0
BlockGFXNoScale=false
BlockGFXAspect=false
BlockGFXBorder=0.0
BlockGFXpalette=5
EnableDotMatrix=false
DotBlend=0.2
DotSize=1
EnableDirt=true
DirtFactor=0.03
EnableCurvature=false
CurveChromaticAberration=0.03
CurveZoom=49.999928
CurveLens=0.0
CurveLensCubic=0.0
SoftGrainTwopass=true
SoftGrainMagnification1=1.250002
SoftGrainMagnification2=0.639998
SoftGrainMagnification3=0.350001
DirtCoordFactor=0.09
BlockGFXpalette=0
BlockGFXcgamode=0
BlockGFXegamode=1
BlockGFXDither=5
BlockGFXPrepassGamma=0.25
BlockGFXDitherBump=-0.5
BlockGFXDitherMultiplier=0.5
BlockGFXPrepassSaturation=-0.0
EnableDirt=false
DirtCoordFactor=0.25
DirtLuminanceFactor=0.0
DirtCoordMagnification=3.039998
DirtCoordMagnification=2.0
DirtLuminanceMagnification=1.0
EnableBox=true
BoxHorizontal=1.5
BoxVertical=1.0
BoxSoften=0.02
BoxAlpha=6.069999
BlockGFXcgamode=0
DarkEnable=true
DarkRadius=0.37
DarkCurve=1.94
DarkBump=0.79
BlurEnable=true
BlurSample=2.25
BlurLevel=1
BlurPower=15.46
BlurCurve=1.2
BlurRadius=0.69
EnableMud=true
MudLevel=3
MudSample=16.32
MudFactor=1.52
MudPower=1.73
MudSaturation=1.6
MudBump=-0.32
BoxVertical=0.85
BoxSoften=0.01
BoxAlpha=5.999999
EnableCurvature=false
CurveChromaticAberration=0.06
CurveZoom=50.299999
CurveLens=0.0
CurveLensCubic=0.0
EnableSharpen=true
SharpenSample=0.2
SharpenBlend=1.0

View file

@ -1,2 +1,11 @@
[ENBBLOOM.FX]
TECHNIQUE=0
PreEnable=true
PreSample=1.0
PreLevel=1
PostSample=1.000001
PostLevel=1
BloomIntensity=0.4
BloomBump=-0.1
BloomPower=1.5
BloomSaturation=0.75

View file

@ -1,23 +1,28 @@
[ENBEFFECT.FX]
TECHNIQUE=0
EBrightnessV2Day=6.25
EAdaptationMinV2Day=0.03
EAdaptationMaxV2Day=0.93
EToneMappingCurveV2Day=3.61
EIntensityContrastV2Day=0.97
EToneMappingOversaturationV2Day=15.990001
EColorSaturationV2Day=1.01
EBrightnessV2Night=3.77
EAdaptationMinV2Night=1.14
EAdaptationMaxV2Night=0.05
EToneMappingCurveV2Night=3.26
EIntensityContrastV2Night=0.94
EToneMappingOversaturationV2Night=26.289999
EColorSaturationV2Night=0.9
EBrightnessV2Interior=10.27
EAdaptationMinV2Interior=1.27
EAdaptationMaxV2Interior=0.1
EToneMappingCurveV2Interior=3.62
EIntensityContrastV2Interior=0.99
EToneMappingOversaturationV2Interior=15.94
EColorSaturationV2Interior=1.09
EnableAdaptation=true
AdaptationMinNight=0.89
AdaptationMinDay=0.09
AdaptationMinInteriorNight=1.12
AdaptationMinInteriorDay=0.14
AdaptationMaxNight=0.5
AdaptationMaxDay=0.94
AdaptationMaxInteriorNight=0.02
AdaptationMaxInteriorDay=1.08
EnableTonemapping=true
TonemappingNight=1.13
TonemappingDay=1.64
TonemappingInteriorNight=1.25
TonemappingInteriorDay=1.37
TonemappingOversaturationNight=26.289999
TonemappingOversaturationDay=10.95
TonemappingOversaturationInteriorNight=22.74
TonemappingOversaturationInteriorDay=15.83
EnablePalette=true
PaletteBlendNight=0.19
PaletteBlendDay=0.33
PaletteBlendInteriorNight=0.25
PaletteBlendInteriorDay=0.45
EnableBloomSoften=true
BloomSoftenLevel=1
BloomSoftenRadius=1.0

View file

@ -1,2 +1,50 @@
[ENBEFFECTPREPASS.FX]
TECHNIQUE=0
CelEnable=true
CelMode=0
CelRadius=0.5
CelPower=0.25
CelBump=0.0
CelBlend=2.5
SSAOEnable=true
SSAODebug=0
SSAORadius=16.0
SSAOBump=0.0
SSAOPower=4.0
SSAOBlend=1.25
SSAONoise=1.0
DoFEnable=true
DoFRadius=1.5
DoFBump=0.0
DoFPow=3.0
DoFBlend=1.0
DoFCut=0.0
DoFDebug=0
CelMult=2.0
SSAOMult=2.0
DoFMult=12.000001
DoFLevel=1
FocusCircleEnable=true
FocusCircleSlices=3
FocusCircleRadius=10.0
FocusCircleCircles=1
FocusDotDebugRadius=0.01
FocusCircleStep=0.25
FocusCircleOffset=0.0
FocusCircleMix=0.25
SSAONormalOffset1=0.0
SSAONormalOffset2=0.01
SSAONormalOffset3=0.01
SSAONormalOffset4=0.0
SSAONoiseSize=64.0
SSAOBlurEnable=true
SSAOBlurRadius=1.0
SSAOBlurLevel=2
SSAOTrim=1.0
SSAOFadeBump=0.0
SSAOFadeMult=0.5
SSAOFadePow=1.0
CelTrim=1.01
CelFade=2.5
SSAOFade=0.6
DoFTrim=1.01

View file

@ -1,25 +1,2 @@
[ENBLENS.FX]
TECHNIQUE=0
EnableLens=true
LensAspect=false
LensGhosts=3
LensDistortion=0.85
LensBaseScale=1.94
LensBaseBias=-0.32
LensDisplacement=0.79
LensHalo=0.44
LensHaloScale=0.44
LensHaloBias=-0.74
LensBasePower=6.33
LensHaloPower=2.85
LensMirrorScale=3.25
LensMirrorBias=-0.33
LensMirrorPower=0.67
LensBaseSaturation=0.52
LensHaloSaturation=0.67
LensMirrorSaturation=0.74
DirtFactor=0.42
DirtPower=1.65
DirtSample=8.0
LensLevel=0
LensSample=8.0

View file

@ -1,735 +1,49 @@
// K ENB
// Multiple Passes Lenzes w_Individual Size and Color Control
// Code extensive modifications by KYO aka Oyama w/some help from Boris ;)
// Lenz Texture by OpethFeldt
// Copyright (c) 2007-2013 Boris Vorontsov
// Medium Hexagons
//=====================================================================================================
// Internal parameters
//=====================================================================================================
float ELenzIntensity=1.0; //[Global Intensity]
float LenzScaleFactor=0.288; //[Global Scale, will affect all lenzes] //1.0, 0.75, 0.66, 0.5, 0.25, 0.33, 0.322, so on
float LenzFactorDraw=1.0; //[Allows for separated factors in case of additional Draw techniques, such as Draw2, ect...]
float LenzContrastDraw=1.3; //[Contrast to clouds - More is weaker opacity compared to clouds]
/**
* Separated Lenzes controls for Draw techniques : Offset, Scale, Scale Factor, Color RGB, Color Multiplier
* KYO : color balance will also act as a separate intensity control for each lenz
* Color : 1.0, 1.0, 1.0 is full intensity / opacity
* If color components are below 1.0, lenz is losing opacity
* You can counterbalance it by increasing f#_ColorMultiplier over 1.0
* Fine tuning is balancing global intensity, RGB balance, multiplier
*/
//Lenz #1
#define f1_LenzOffset -0.8 //Position from Sun to Eye
#define f1_LenzScale 0.093 //Size of the Lenz Flare
#define f1_LenzFactor 1.0 //Multiplier for Size, in case 2 lenzes are sharing close offset a/o scale
#define f1_LenzColor float3(0.75, 0.75, 0.50) //Color in RGB (0.00 to 1.00) for the Lenz Flare
#define f1_ColorMultiplier 1.0 //Color Multiplier, in case RGB values are too low - Fine Tuning
//Lenz #2
#define f2_LenzOffset -0.54
#define f2_LenzScale 0.066
#define f2_LenzFactor 1.0
#define f2_LenzColor float3(0.85, 0.65, 0.85)
#define f2_ColorMultiplier 1.2
//Lenz #3
#define f3_LenzOffset -0.34
#define f3_LenzScale 0.100
#define f3_LenzFactor 1.0
#define f3_LenzColor float3(1.0, 1.0, 1.0)
#define f3_ColorMultiplier 1.0
//Lenz #4
#define f4_LenzOffset -0.14
#define f4_LenzScale 0.099
#define f4_LenzFactor 0.75
#define f4_LenzColor float3(0.25, 1.0, 0.75)
#define f4_ColorMultiplier 1.0
//Lenz #5
#define f5_LenzOffset -0.27
#define f5_LenzScale 0.072
#define f5_LenzFactor 1.0
#define f5_LenzColor float3(0.3, 0.3, 0.25)
#define f5_ColorMultiplier 2.0
//Lenz #6
#define f6_LenzOffset -0.3
#define f6_LenzScale 0.115
#define f6_LenzFactor 0.75
#define f6_LenzColor float3(0.20, 0.30, 0.35)
#define f6_ColorMultiplier 1.2
//Lenz #7
#define f7_LenzOffset -0.4
#define f7_LenzScale 0.098
#define f7_LenzFactor 1.0
#define f7_LenzColor float3(1.0, 1.0, 1.0)
#define f7_ColorMultiplier 1.0
//Lenz #8
#define f8_LenzOffset -0.2
#define f8_LenzScale 0.081
#define f8_LenzFactor 0.5
#define f8_LenzColor float3(0.25, 0.95, 0.45)
#define f8_ColorMultiplier 1.8
//Lenz #9
#define f9_LenzOffset -0.1
#define f9_LenzScale 0.121
#define f9_LenzFactor 0.85
#define f9_LenzColor float3(1.0, 1.0, 1.0)
#define f9_ColorMultiplier 1.0
//Lenz #10
#define f10_LenzOffset 0.0
#define f10_LenzScale 0.111
#define f10_LenzFactor 1.0
#define f10_LenzColor float3(0.55, 0.55, 0.55)
#define f10_ColorMultiplier 1.0
//Lenz #11
#define f11_LenzOffset 0.8
#define f11_LenzScale 0.234
#define f11_LenzFactor 1.11
#define f11_LenzColor float3(0.35, 0.45, 0.62)
#define f11_ColorMultiplier 2.0
//Lenz #12
#define f12_LenzOffset 0.9
#define f12_LenzScale 0.144
#define f12_LenzFactor 1.11
#define f12_LenzColor float3(0.35, 0.35, 0.42)
#define f12_ColorMultiplier 1.0
//Lenz #13
#define f13_LenzOffset 1.0
#define f13_LenzScale 0.174
#define f13_LenzFactor 1.11
#define f13_LenzColor float3(0.35, 0.35, 0.42)
#define f13_ColorMultiplier 1.0
//Lenz #14
#define f14_LenzOffset 0.42
#define f14_LenzScale 0.064
#define f14_LenzFactor 1.11
#define f14_LenzColor float3(0.35, 0.35, 0.42)
#define f14_ColorMultiplier 1.0
//Lenz #15
#define f15_LenzOffset 0.53
#define f15_LenzScale 0.074
#define f15_LenzFactor 1.11
#define f15_LenzColor float3(0.35, 0.35, 0.42)
#define f15_ColorMultiplier 1.0
//Lenz #16
#define f16_LenzOffset 0.65
#define f16_LenzScale 0.094
#define f16_LenzFactor 1.11
#define f16_LenzColor float3(0.35, 0.35, 0.42)
#define f16_ColorMultiplier 1.0
//Lenz #17
#define f17_LenzOffset 0.76
#define f17_LenzScale 0.104
#define f17_LenzFactor 1.11
#define f17_LenzColor float3(0.35, 0.35, 0.42)
#define f17_ColorMultiplier 1.0
//Lenz #18
#define f18_LenzOffset 0.9
#define f18_LenzScale 0.114
#define f18_LenzFactor 1.11
#define f18_LenzColor float3(0.35, 0.35, 0.42)
#define f18_ColorMultiplier 1.0
//Lenz #19
#define f19_LenzOffset 1.0
#define f19_LenzScale 0.174
#define f19_LenzFactor 1.11
#define f19_LenzColor float3(0.35, 0.35, 0.42)
#define f19_ColorMultiplier 1.0
//Lenz #20
#define f20_LenzOffset 1.2
#define f20_LenzScale 0.224
#define f20_LenzFactor 1.11
#define f20_LenzColor float3(0.35, 0.35, 0.42)
#define f20_ColorMultiplier 1.0
//Lenz #21
#define f21_LenzOffset 1.6
#define f21_LenzScale 0.234
#define f21_LenzFactor 1.11
#define f21_LenzColor float3(0.35, 0.35, 0.42)
#define f21_ColorMultiplier 1.0
//Lenz #22
#define f22_LenzOffset 1.9
#define f22_LenzScale 0.064
#define f22_LenzFactor 1.11
#define f22_LenzColor float3(0.35, 0.35, 0.42)
#define f22_ColorMultiplier 1.0
//Add or Remove additional Lenzes controls here, as done above
//This being done, a/o remove passes of technique below
//=====================================================================================================
// External parameters
//=====================================================================================================
//Keyboard controlled temporary variables (in some versions exists in the config file).
//Press and hold key 1,2,3...8 together with PageUp or PageDown to modify. By default all set to 1.0
float4 tempF1; //0,1,2,3
float4 tempF2; //5,6,7,8
float4 tempF3; //9,0
//x=Width, y=1/Width, z=ScreenScaleY, w=1/ScreenScaleY
float4 ScreenSize;
//x=generic timer in range 0..1, period of 16777216 ms (4.6 hours), w=frame time elapsed (in seconds)
float4 Timer;
//xy=sun position on screen, w=visibility
float4 LightParameters;
//textures
texture2D texColor;
texture2D texMask;
sampler2D SamplerColor = sampler_state
{
Texture = <texColor>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerMask = sampler_state
{
Texture = <texMask>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
/*
enbsunsprite.fx : MariENB sun sprite filters.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* Effects have yet to be implemented. Sorry for the inconvenience. */
struct VS_OUTPUT_POST
{
float4 vpos : POSITION;
float4 vpos : POSITION;
float2 txcoord : TEXCOORD0;
};
struct VS_INPUT_POST
{
float3 pos : POSITION;
float3 pos : POSITION;
float2 txcoord : TEXCOORD0;
};
/**
* Several sprites moving similar to lenz effect
* They are transformed in vertex shader and drawed separately for better performance
* Offset is set in passes of technique
*/
VS_OUTPUT_POST VS_Draw(VS_INPUT_POST IN, uniform float offset, uniform float scale)
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);
pos.y*=ScreenSize.z;
//create own parameters instead of this, including uv offsets
float2 shift=LightParameters.xy * offset;
pos.xy=pos.xy * (scale * LenzScaleFactor) - shift;
OUT.vpos=pos;
OUT.txcoord.xy=IN.txcoord.xy;
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_Draw(VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform float3 colorfilter, uniform float colormultiplier) : COLOR
float4 PS_Dummy( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float4 res;
float2 coord=IN.txcoord.xy;
//read sun visibility as amount of effect
float sunmask=tex2D(SamplerMask, float2(0.5, 0.5)).x;
sunmask=pow(sunmask, LenzContrastDraw); //more contrast to clouds
clip(sunmask-0.02);//early exit if too low
float4 origcolor=tex2D(SamplerColor, coord.xy);
sunmask*=LightParameters.w * (ELenzIntensity * LenzFactorDraw);
res.xyz=origcolor * sunmask;
float clipper=dot(res.xyz, 0.333);
clip(clipper-0.0003);//skip draw if black
res.xyz*=colorfilter * colormultiplier;
res.w=1.0;
return res;
return 0.0;
}
//-------------------------------------------------------------------------------------------------------------------------
/**
* TECHNIQUES
*/
technique Draw
{
pass P0
{
VertexShader = compile vs_3_0 VS_Draw(f1_LenzOffset, (f1_LenzScale * f1_LenzFactor)); //offset, scale, scale factor
PixelShader = compile ps_3_0 PS_Draw(f1_LenzColor, f1_ColorMultiplier); //Color RGB
AlphaBlendEnable=TRUE;
SrcBlend=ONE;
DestBlend=ONE;
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;
}
pass P1
{
VertexShader = compile vs_3_0 VS_Draw(f2_LenzOffset, (f2_LenzScale * f2_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f2_LenzColor, f2_ColorMultiplier);
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;
}
pass P2
{
VertexShader = compile vs_3_0 VS_Draw(f3_LenzOffset, (f3_LenzScale * f3_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f3_LenzColor, f3_ColorMultiplier);
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;
}
pass P3
{
VertexShader = compile vs_3_0 VS_Draw(f4_LenzOffset, (f4_LenzScale * f4_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f4_LenzColor, f4_ColorMultiplier);
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;
}
pass P4
{
VertexShader = compile vs_3_0 VS_Draw(f5_LenzOffset, (f5_LenzScale * f5_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f5_LenzColor, f5_ColorMultiplier);
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;
}
pass P5
{
VertexShader = compile vs_3_0 VS_Draw(f6_LenzOffset, (f6_LenzScale * f6_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f6_LenzColor, f6_ColorMultiplier);
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;
}
pass P6
{
VertexShader = compile vs_3_0 VS_Draw(f7_LenzOffset, (f7_LenzScale * f7_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f7_LenzColor, f7_ColorMultiplier);
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;
}
pass P7
{
VertexShader = compile vs_3_0 VS_Draw(f8_LenzOffset, (f8_LenzScale * f8_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f8_LenzColor, f8_ColorMultiplier);
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;
}
pass P8
{
VertexShader = compile vs_3_0 VS_Draw(f9_LenzOffset, (f9_LenzScale * f9_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f9_LenzColor, f9_ColorMultiplier);
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;
}
pass P9
{
VertexShader = compile vs_3_0 VS_Draw(f10_LenzOffset, (f10_LenzScale * f10_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f10_LenzColor, f10_ColorMultiplier);
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;
}
pass P10
{
VertexShader = compile vs_3_0 VS_Draw(f11_LenzOffset, (f11_LenzScale * f11_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f11_LenzColor, f11_ColorMultiplier);
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;
}
pass P11
{
VertexShader = compile vs_3_0 VS_Draw(f11_LenzOffset, (f12_LenzScale * f12_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f12_LenzColor, f12_ColorMultiplier);
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;
}
pass P12
{
VertexShader = compile vs_3_0 VS_Draw(f13_LenzOffset, (f13_LenzScale * f13_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f13_LenzColor, f13_ColorMultiplier);
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;
}
pass P13
{
VertexShader = compile vs_3_0 VS_Draw(f14_LenzOffset, (f14_LenzScale * f14_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f14_LenzColor, f14_ColorMultiplier);
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;
}
pass P14
{
VertexShader = compile vs_3_0 VS_Draw(f15_LenzOffset, (f15_LenzScale * f15_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f15_LenzColor, f15_ColorMultiplier);
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;
}
pass P15
{
VertexShader = compile vs_3_0 VS_Draw(f16_LenzOffset, (f16_LenzScale * f16_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f16_LenzColor, f16_ColorMultiplier);
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;
}
pass P16
{
VertexShader = compile vs_3_0 VS_Draw(f17_LenzOffset, (f17_LenzScale * f17_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f17_LenzColor, f17_ColorMultiplier);
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;
}
pass P17
{
VertexShader = compile vs_3_0 VS_Draw(f18_LenzOffset, (f18_LenzScale * f18_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f18_LenzColor, f18_ColorMultiplier);
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;
}
pass P18
{
VertexShader = compile vs_3_0 VS_Draw(f19_LenzOffset, (f19_LenzScale * f19_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f19_LenzColor, f19_ColorMultiplier);
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;
}
pass P19
{
VertexShader = compile vs_3_0 VS_Draw(f20_LenzOffset, (f20_LenzScale * f20_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f20_LenzColor, f20_ColorMultiplier);
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;
}
pass P20
{
VertexShader = compile vs_3_0 VS_Draw(f21_LenzOffset, (f21_LenzScale * f21_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f21_LenzColor, f21_ColorMultiplier);
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;
}
pass P21
{
VertexShader = compile vs_3_0 VS_Draw(f22_LenzOffset, (f22_LenzScale * f22_LenzFactor));
PixelShader = compile ps_3_0 PS_Draw(f22_LenzColor, f22_ColorMultiplier);
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;
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
// KYO : and so on...

160
menbbloomfilters.fx Normal file
View file

@ -0,0 +1,160 @@
/*
menbbloomfilters.fx : MariENB bloom shader routines.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
VS_OUTPUT_POST VS_Bloom(VS_INPUT_POST IN)
{
VS_OUTPUT_POST OUT;
float4 pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1);
OUT.vpos = pos;
OUT.txcoord0.xy = IN.txcoord0.xy+TempParameters.xy;
return OUT;
}
/* pre-pass bloom texture preparation */
float4 PS_BloomPrePass(VS_OUTPUT_POST In) : COLOR
{
float2 coord = In.txcoord0.xy;
if ( !preenable )
return tex2D(SamplerBloom1,coord);
float4 res = 0.0;
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*presample;
int i, j;
if ( prelevel == 1 )
{
for ( i=-2; i<=2; i++ )
for ( j=-2; j<=2; j++ )
res += gauss5[abs(i)][abs(j)]
*tex2D(SamplerBloom1,coord+float2(i,j)
*bof);
}
else if ( prelevel == 2 )
{
for ( i=-3; i<=3; i++ )
for ( j=-3; j<=3; j++ )
res += gauss7[abs(i)][abs(j)]
*tex2D(SamplerBloom1,coord+float2(i,j)
*bof);
}
else
{
for ( i=-1; i<=1; i++ )
for ( j=-1; j<=1; j++ )
res += gauss3[abs(i)][abs(j)]
*tex2D(SamplerBloom1,coord+float2(i,j)
*bof);
}
return res;
}
/* multipass */
float4 PS_BloomTexture(VS_OUTPUT_POST In) : COLOR
{
float2 coord = In.txcoord0.xy;
float4 res = 0.0;
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*postsample
*(TempParameters.w+0.25);
int i, j;
if ( postlevel == 1 )
{
for ( i=-2; i<=2; i++ )
for ( j=-2; j<=2; j++ )
res += gauss5[abs(i)][abs(j)]
*tex2D(SamplerBloom1,coord+float2(i,j)
*bof);
}
else if ( postlevel == 2 )
{
for ( i=-3; i<=3; i++ )
for ( j=-3; j<=3; j++ )
res += gauss7[abs(i)][abs(j)]
*tex2D(SamplerBloom1,coord+float2(i,j)
*bof);
}
else
{
for ( i=-1; i<=1; i++ )
for ( j=-1; j<=1; j++ )
res += gauss3[abs(i)][abs(j)]
*tex2D(SamplerBloom1,coord+float2(i,j)
*bof);
}
return res;
}
/* end pass */
float4 PS_BloomPostPass(VS_OUTPUT_POST In) : COLOR
{
float2 coord = In.txcoord0.xy;
float4 res = (tex2D(SamplerBloom1,coord)+tex2D(SamplerBloom2,coord)
+tex2D(SamplerBloom3,coord)+tex2D(SamplerBloom4,coord)
+tex2D(SamplerBloom5,coord)+tex2D(SamplerBloom6,coord)
+tex2D(SamplerBloom7,coord)+tex2D(SamplerBloom8,coord))*0.125;
res = pow(saturate(res+bloombump),bloompower);
float ress = (res.r+res.g+res.b)/3.0;
res = res*bloomsaturation+ress*(1.0-bloomsaturation);
res.rgb *= bloomintensity;
return res;
}
/* techniques */
technique BloomPrePass
{
pass p0
{
VertexShader = compile vs_3_0 VS_Bloom();
PixelShader = compile ps_3_0 PS_BloomPrePass();
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
CullMode = NONE;
AlphaBlendEnable = FALSE;
AlphaTestEnable = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique BloomTexture1
{
pass p0
{
VertexShader = compile vs_3_0 VS_Bloom();
PixelShader = compile ps_3_0 PS_BloomTexture();
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
CullMode = NONE;
AlphaBlendEnable = FALSE;
AlphaTestEnable = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique BloomTexture2
{
pass p0
{
VertexShader = compile vs_3_0 VS_Bloom();
PixelShader = compile ps_3_0 PS_BloomTexture();
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
CullMode = NONE;
AlphaBlendEnable = FALSE;
AlphaTestEnable = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique BloomPostPass
{
pass p0
{
VertexShader = compile vs_3_0 VS_Bloom();
PixelShader = compile ps_3_0 PS_BloomPostPass();
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
CullMode = NONE;
AlphaBlendEnable = FALSE;
AlphaTestEnable = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}

152
menbbloominternals.fx Normal file
View file

@ -0,0 +1,152 @@
/*
menbbloominternals.fx : MariENB bloom internal variables.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* gaussian blur matrices */
static const float2x2 gauss3 =
{
0.16,0.12,
0.12,0.09
};
static const float3x3 gauss5 =
{
0.0865051903114,0.0692041522491,0.0346020761246,
0.0692041522491,0.0553633217993,0.0276816609,
0.0346020761246,0.0276816609,0.01384083045
};
static const float4x4 gauss7 =
{
0.0632507440209,0.0527089533508,0.0301194019147,0.011294775718,
0.0527089533508,0.0439241277923,0.0250995015956,0.00941231309835,
0.0301194019147,0.0250995015956,0.01434257234,0.00537846462763,
0.011294775718,0.00941231309835,0.00537846462763,0.00201692423536
};
/* standard stuff (not all used) */
float4 tempF1;
float4 tempF2;
float4 tempF3;
float4 ScreenSize;
float4 Timer;
float4 TempParameters;
float4 LenzParameters;
float4 BloomParameters;
float ENightDayFactor;
float EInteriorFactor;
/* samplers and textures (some left unused) */
texture2D texBloom1;
texture2D texBloom2;
texture2D texBloom3;
texture2D texBloom4;
texture2D texBloom5;
texture2D texBloom6;
texture2D texBloom7;
texture2D texBloom8;
sampler2D SamplerBloom1 = sampler_state
{
Texture = <texBloom1>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerBloom2 = sampler_state
{
Texture = <texBloom2>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerBloom3 = sampler_state
{
Texture = <texBloom3>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerBloom4 = sampler_state
{
Texture = <texBloom4>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerBloom5 = sampler_state
{
Texture = <texBloom5>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerBloom6 = sampler_state
{
Texture = <texBloom6>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerBloom7 = sampler_state
{
Texture = <texBloom7>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerBloom8 = sampler_state
{
Texture = <texBloom8>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
/* whatever */
struct VS_OUTPUT_POST
{
float4 vpos : POSITION;
float2 txcoord0 : TEXCOORD0;
};
struct VS_INPUT_POST
{
float3 pos : POSITION;
float2 txcoord0 : TEXCOORD0;
};

60
menbbloomsettings.fx Normal file
View file

@ -0,0 +1,60 @@
/*
menbbloomsettings.fx : MariENB bloom user-tweakable variables.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* do bloom prepass blur */
bool preenable
<
string UIName = "PreEnable";
string UIWidget = "Checkbox";
> = {true};
/* bloom prepass blur radius */
float presample
<
string UIName = "PreSample";
string UIWidget = "Spinner";
> = {2.0};
/* bloom prepass blur level */
int prelevel
<
string UIName = "PreLevel";
string UIWidget = "Spinner";
> = {2};
/* bloom postpass blur radius */
float postsample
<
string UIName = "PostSample";
string UIWidget = "Spinner";
> = {8.0};
/* bloom postpas blur level */
int postlevel
<
string UIName = "PostLevel";
string UIWidget = "Spinner";
> = {1};
/* bloom intensity */
float bloomintensity
<
string UIName = "BloomIntensity";
string UIWidget = "Spinner";
> = {0.25};
/* bloom power */
float bloompower
<
string UIName = "BloomPower";
string UIWidget = "Spinner";
> = {1.4};
/* bloom saturation */
float bloomsaturation
<
string UIName = "BloomSaturation";
string UIWidget = "Spinner";
> = {0.3};
/* bloom offset */
float bloombump
<
string UIName = "BloomBump";
string UIWidget = "Spinner";
> = {-0.10};

179
menbeffectfilters.fx Normal file
View file

@ -0,0 +1,179 @@
/*
menbeffectfilters.fx : MariENB base shader routines.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
VS_OUTPUT_POST VS_Pass( VS_INPUT_POST IN )
{
VS_OUTPUT_POST OUT;
OUT.vpos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
OUT.txcoord0.xy = IN.txcoord0.xy;
return OUT;
}
/* MariENB shader */
float4 PS_Mari( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord0.xy;
float4 res = tex2D(_s0,coord);
float tod = ENightDayFactor;
float ind = EInteriorFactor;
/* screen mud goes here */
if ( softbloom )
{
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*softbloomsmp;
int i,j;
if ( softbloomlv == 1 )
{
for ( i=-2; i<=2; i++ )
for ( j=-2; j<=2; j++ )
res += gauss5[abs(i)][abs(j)]
*tex2D(_s3,coord+float2(i,j)
*bof)*EBloomAmount;
}
else if ( softbloomlv == 2 )
{
for ( i=-3; i<=3; i++ )
for ( j=-3; j<=3; j++ )
res += gauss7[abs(i)][abs(j)]
*tex2D(_s3,coord+float2(i,j)
*bof)*EBloomAmount;
}
else
{
for ( i=-1; i<=1; i++ )
for ( j=-1; j<=1; j++ )
res += gauss3[abs(i)][abs(j)]
*tex2D(_s3,coord+float2(i,j)
*bof)*EBloomAmount;
}
}
else
res += tex2D(_s3,coord)*EBloomAmount;
float4 adapt = tex2D(_s4,0.5);
/* adaptation */
if ( aenable )
{
float adapts = clamp((adapt.r+adapt.g+adapt.b)/3.0,0.0,50.0);
float amin = lerp(lerp(amin_n,amin_d,tod),lerp(amin_in,amin_id,
tod),ind);
float amax = lerp(lerp(amax_n,amax_d,tod),lerp(amax_in,amax_id,
tod),ind);
res.rgb = res.rgb/(adapts*amax+amin);
}
/* tone mapping */
if ( tmenable )
{
float tone = lerp(lerp(tone_n,tone_d,tod),lerp(tone_in,tone_id,
tod),ind);
float tovr = lerp(lerp(tovr_n,tovr_d,tod),lerp(tovr_in,tovr_id,
tod),ind);
res.rgb = (res.rgb*(1+res.rgb/tovr))/(res.rgb+tone);
}
/* palette texture */
if ( palenable )
{
float palb = lerp(lerp(palb_n,palb_d,tod),lerp(palb_in,palb_id,
tod),ind);
res.rgb = saturate(res.rgb);
float3 bright = adapt.rgb/(adapt.rgb+1.0);
float brights = (bright.r+bright.g+bright.b)/3.0;
float3 pal = float3(tex2D(_s7,float2(res.r,brights)).r,
tex2D(_s7,float2(res.g,brights)).g,
tex2D(_s7,float2(res.b,brights)).b);
res.rgb = res.rgb*(1.0-palb)+pal.rgb*palb;
}
res.a = 1.0;
return res;
}
/*
So... let me get this straight... rather than simply switching techniques,
Boris just compiles the program twice with and without this macro, then
toggling "UseEffect" switches between each variation? What the fuck?
*/
#ifndef ENB_FLIPTECHNIQUE
technique Shader_D6EC7DD1
#else
technique Shader_ORIGINALPOSTPROCESS
#endif
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_Mari();
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
ZEnable = FALSE;
ZWriteEnable = FALSE;
CullMode = NONE;
AlphaTestEnable = FALSE;
AlphaBlendEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
#ifndef ENB_FLIPTECHNIQUE
technique Shader_ORIGINALPOSTPROCESS
#else
technique Shader_D6EC7DD1
#endif
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
/*
>2014
>inline assembly
Have to keep this part intact, sadly
Boris what the fuck have you done
*/
PixelShader = asm
{
ps_3_0
def c6,0,0,0,0
def c7,0.212500006,0.715399981,0.0720999986,1
dcl_texcoord v0.xy
dcl_2d s0
dcl_2d s1
dcl_2d s2
rcp r0.x,c2.y
texld r1,v0,s2
mul r0.yz,r1.xxyw,c1.y
rcp r0.w,r0.y
mul r0.z,r0.w,r0.z
texld r1,v0,s1
mul r1.xyz,r1,c1.y
dp3 r0.w,c7,r1
mul r1.w,r0.w,r0.z
mad r0.z,r0.z,r0.w,c7.w
rcp r0.z,r0.z
mad r0.x,r1.w,r0.x,c7.w
mul r0.x,r0.x,r1.w
mul r0.x,r0.z,r0.x
cmp r0.x,-r0.w,c6.x,r0.x
rcp r0.z,r0.w
mul r0.z,r0.z,r0.x
add_sat r0.x,-r0.x,c2.x
texld r2,v0,s0
mul r2.xyz,r2,c1.y
mul r2.xyz,r0.x,r2
mad r1.xyz,r1,r0.z,r2
dp3 r0.x,r1,c7
mov r1.w,c7.w
lrp r2,c3.x,r1,r0.x
mad r1,r0.x,c4,-r2
mad r1,c4.w,r1,r2
mad r1,c3.w,r1,-r0.y
mad r0,c3.z,r1,r0.y
add r1,-r0,c5
mad oC0,c5.w,r1,r0
};
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
ZEnable = FALSE;
ZWriteEnable = FALSE;
CullMode = NONE;
AlphaTestEnable = FALSE;
AlphaBlendEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}

124
menbeffectinternals.fx Normal file
View file

@ -0,0 +1,124 @@
/*
menbeffectinternals.fx : MariENB base internal variables.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* gaussian blur matrices */
static const float2x2 gauss3 =
{
0.16,0.12,
0.12,0.09
};
static const float3x3 gauss5 =
{
0.0865051903114,0.0692041522491,0.0346020761246,
0.0692041522491,0.0553633217993,0.0276816609,
0.0346020761246,0.0276816609,0.01384083045
};
static const float4x4 gauss7 =
{
0.0632507440209,0.0527089533508,0.0301194019147,0.011294775718,
0.0527089533508,0.0439241277923,0.0250995015956,0.00941231309835,
0.0301194019147,0.0250995015956,0.01434257234,0.00537846462763,
0.011294775718,0.00941231309835,0.00537846462763,0.00201692423536
};
/* standard stuff (not all used) */
float4 tempF1;
float4 tempF2;
float4 tempF3;
float4 Timer;
float4 ScreenSize;
float ENightDayFactor;
float EInteriorFactor;
float EBloomAmount;
/* samplers and textures (some unused) */
texture2D texs0;
texture2D texs1;
texture2D texs2;
texture2D texs3;
texture2D texs4;
texture2D texs7;
sampler2D _s0 = sampler_state
{
Texture = <texs0>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D _s1 = sampler_state
{
Texture = <texs1>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D _s2 = sampler_state
{
Texture = <texs2>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D _s3 = sampler_state
{
Texture = <texs3>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D _s4 = sampler_state
{
Texture = <texs4>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D _s7 = sampler_state
{
Texture = <texs7>;
MinFilter = POINT;
MagFilter = POINT;
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;
};

140
menbeffectsettings.fx Normal file
View file

@ -0,0 +1,140 @@
/*
menbeffectsettings.fx : MariENB base user-tweakable variables.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* Soften bloom */
bool softbloom
<
string UIName = "EnableBloomSoften";
string UIWidget = "Checkbox";
> = {true};
int softbloomlv
<
string UIName = "BloomSoftenLevel";
string UIWidget = "Slider";
> = {2};
float softbloomsmp
<
string UIName = "BloomSoftenRadius";
string UIWidget = "Slider";
> = {1.0};
/* Adaptation */
bool aenable
<
string UIName = "EnableAdaptation";
string UIWidget = "Checkbox";
> = {true};
float amin_n
<
string UIName = "AdaptationMinNight";
string UIWidget = "Spinner";
> = {0.0};
float amin_d
<
string UIName = "AdaptationMinDay";
string UIWidget = "Spinner";
> = {0.0};
float amin_in
<
string UIName = "AdaptationMinInteriorNight";
string UIWidget = "Spinner";
> = {0.0};
float amin_id
<
string UIName = "AdaptationMinInteriorDay";
string UIWidget = "Spinner";
> = {0.0};
float amax_n
<
string UIName = "AdaptationMaxNight";
string UIWidget = "Spinner";
> = {1.0};
float amax_d
<
string UIName = "AdaptationMaxDay";
string UIWidget = "Spinner";
> = {1.0};
float amax_in
<
string UIName = "AdaptationMaxInteriorNight";
string UIWidget = "Spinner";
> = {1.0};
float amax_id
<
string UIName = "AdaptationMaxInteriorDay";
string UIWidget = "Spinner";
> = {1.0};
/* tone mapping */
bool tmenable
<
string UIName = "EnableTonemapping";
string UIWidget = "Checkbox";
> = {true};
float tone_n
<
string UIName = "TonemappingNight";
string UIWidget = "Spinner";
> = {1.0};
float tone_d
<
string UIName = "TonemappingDay";
string UIWidget = "Spinner";
> = {1.0};
float tone_in
<
string UIName = "TonemappingInteriorNight";
string UIWidget = "Spinner";
> = {1.0};
float tone_id
<
string UIName = "TonemappingInteriorDay";
string UIWidget = "Spinner";
> = {1.0};
float tovr_n
<
string UIName = "TonemappingOversaturationNight";
string UIWidget = "Spinner";
> = {1.0};
float tovr_d
<
string UIName = "TonemappingOversaturationDay";
string UIWidget = "Spinner";
> = {1.0};
float tovr_in
<
string UIName = "TonemappingOversaturationInteriorNight";
string UIWidget = "Spinner";
> = {1.0};
float tovr_id
<
string UIName = "TonemappingOversaturationInteriorDay";
string UIWidget = "Spinner";
> = {1.0};
/* palette texture */
bool palenable
<
string UIName = "EnablePalette";
string UIWidget = "Checkbox";
> = {true};
float palb_n
<
string UIName = "PaletteBlendNight";
string UIWidget = "Spinner";
> = {1.0};
float palb_d
<
string UIName = "PaletteBlendDay";
string UIWidget = "Spinner";
> = {1.0};
float palb_in
<
string UIName = "PaletteBlendInteriorNight";
string UIWidget = "Spinner";
> = {1.0};
float palb_id
<
string UIName = "PaletteBlendInteriorDay";
string UIWidget = "Spinner";
> = {1.0};

627
menbfilters.fx Normal file
View file

@ -0,0 +1,627 @@
/*
menbfilters.fx : MariENB shader routines.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
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;
}
float4 PS_FXAA( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = float2(IN.txcoord.x,IN.txcoord.y);
float4 res = tex2D(SamplerColor,coord);
if ( !fxaaenable )
return res;
float fxaareducemul_ = 1.0/max(abs(fxaareducemul),1.0);
float fxaareducemin_ = 1.0/max(abs(fxaareducemin),1.0);
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y);
float3 rgbNW = tex2D(SamplerColor,coord+float2(-1,-1)*bof).rgb;
float3 rgbNE = tex2D(SamplerColor,coord+float2(1,-1)*bof).rgb;
float3 rgbSW = tex2D(SamplerColor,coord+float2(-1,1)*bof).rgb;
float3 rgbSE = tex2D(SamplerColor,coord+float2(1,1)*bof).rgb;
float3 rgbM = tex2D(SamplerColor,coord).rgb;
float3 luma = float3(0.299,0.587,0.114);
float lumaNW = dot(rgbNW,luma);
float lumaNE = dot(rgbNE,luma);
float lumaSW = dot(rgbSW,luma);
float lumaSE = dot(rgbSE,luma);
float lumaM = dot(rgbM,luma);
float lumaMin = min(lumaM,min(min(lumaNW,lumaNE),min(lumaSW,lumaSE)));
float lumaMax = max(lumaM,max(max(lumaNW,lumaNE),max(lumaSW,lumaSE)));
float2 dir = float2(-((lumaNW+lumaNE)-(lumaSW+lumaSE)),((lumaNW+lumaSW)
-(lumaNE+lumaSE)));
float dirReduce = max((lumaNW+lumaNE+lumaSW+lumaSE)*(0.25
*fxaareducemul_),fxaareducemin_);
float rcpDirMin = 1.0/(min(abs(dir.x),abs(dir.y))+dirReduce);
dir = min(float2(fxaaspanmax,fxaaspanmax),max(float2(-fxaaspanmax,
-fxaaspanmax),dir*rcpDirMin))/bresl;
float3 rgbA = (1.0/2.0)*(tex2D(SamplerColor,coord+dir*(1.0/3.0-0.5))
.rgb+tex2D(SamplerColor,coord+dir*(2.0/3.0-0.5)).rgb);
float3 rgbB = rgbA*(1.0/2.0)+(1.0/4.0)*(tex2D(SamplerColor,coord+dir
*(0.0/3.0-0.5)).rgb+tex2D(SamplerColor,coord+dir*(3.0/3.0-0.5))
.rgb);
float lumaB = dot(rgbB,luma);
if ( (lumaB < lumaMin) || (lumaB > lumaMax) )
res.rgb = rgbA;
else
res.rgb = rgbB;
res.a = 1.0;
return res;
}
float4 PS_Enhance( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = float2(IN.txcoord.x,IN.txcoord.y);
float4 res = tex2D(SamplerColor,coord);
float tod = ENightDayFactor;
float ind = EInteriorFactor;
if ( bbenable )
{
float4 origcolor = res;
float4 tcol = float4(0,0,0,0);
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float bbsamp = lerp(lerp(bbsamp_n,bbsamp_d,tod),lerp(bbsamp_in,
bbsamp_id,tod),ind);
float bbradius = lerp(lerp(bbradius_n,bbradius_d,tod),
lerp(bbradius_in,bbradius_id,tod),ind);
float bbcurve = lerp(lerp(bbcurve_n,bbcurve_d,tod),
lerp(bbcurve_in,bbcurve_id,tod),ind);
float bbpow = lerp(lerp(bbpow_n,bbpow_d,tod),lerp(bbpow_in,
bbpow_id,tod),ind);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*bbsamp;
int i, j;
if ( bblevel == 1 )
{
for ( i=-2; i<=2; i++ )
for ( j=-2; j<=2; j++ )
tcol += gauss5[abs(i)][abs(j)]
*tex2D(SamplerColor,coord
+float2(i,j)*bof);
}
else if ( bblevel == 2 )
{
for ( i=-3; i<=3; i++ )
for ( j=-3; j<=3; j++ )
tcol += gauss7[abs(i)][abs(j)]
*tex2D(SamplerColor,coord
+float2(i,j)*bof);
}
else
{
for ( i=-1; i<=1; i++ )
for ( j=-1; j<=1; j++ )
tcol += gauss3[abs(i)][abs(j)]
*tex2D(SamplerColor,coord
+float2(i,j)*bof);
}
float2 uv = (coord.xy-0.5)*bbradius;
float vig = clamp(pow(saturate(dot(uv.xy,uv.xy)),bbcurve),0.0
,1.0);
res.rgb = lerp(origcolor.rgb,tcol.rgb,clamp(vig*bbpow,0.0
,1.0));
}
if ( dkenable )
{
float2 bresl = float2(1.0,ScreenSize.w);
float dkradius = lerp(lerp(dkradius_n,dkradius_d,tod),
lerp(dkradius_in,dkradius_id,tod),ind);
float dkbump = lerp(lerp(dkbump_n,dkbump_d,tod),lerp(dkbump_in,
dkbump_id,tod),ind);
float dkcurve = lerp(lerp(dkcurve_n,dkcurve_d,tod),
lerp(dkcurve_in,dkcurve_id,tod),ind);
float2 bof = bresl*dkradius;
float val = 0.0;
if ( coord.x < bof.x )
val = lerp(val,1,1.0-coord.x/bof.x);
if ( coord.y < bof.y )
val = lerp(val,1,1.0-coord.y/bof.y);
if ( 1.0-coord.x < bof.x )
val = lerp(val,1,1.0-(1.0-coord.x)/bof.x);
if ( 1.0-coord.y < bof.y )
val = lerp(val,1,1.0-(1.0-coord.y)/bof.y);
val = clamp(val*dkbump,0,1);
res.rgb = lerp(res.rgb,float3(0,0,0),pow(val,dkcurve));
}
if ( ne )
{
float nf = lerp(lerp(nf_n,nf_d,tod),lerp(nf_in,nf_id,tod),ind);
float ns = lerp(lerp(ns_n,ns_d,tod),lerp(ns_in,ns_id,tod),ind);
float nj = lerp(lerp(nj_n,nj_d,tod),lerp(nj_in,nj_id,tod),ind);
float ni = lerp(lerp(ni_n,ni_d,tod),lerp(ni_in,ni_id,tod),ind);
float ts = Timer.x*nf;
ts *= 1000.0;
float2 tcs = coord;
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)
/NOISERES;
if ( np )
{
n1 = tex2D(SamplerNoise2,s1*nm11*nr).r;
n2 = tex2D(SamplerNoise2,s2*nm12*nr).g;
n3 = tex2D(SamplerNoise2,s3*nm13*nr).b;
s1 = tcs+float2(ts+n1*nk,n2*nk);
s2 = tcs+float2(n2,ts+n3*nk);
s3 = tcs+float2(ts+n3*nk,ts+n1*nk);
n1 = tex2D(SamplerNoise2,s1*nm21*nr).r;
n2 = tex2D(SamplerNoise2,s2*nm22*nr).g;
n3 = tex2D(SamplerNoise2,s3*nm23*nr).b;
}
else
{
n1 = tex2D(SamplerNoise3,s1*nm1*nr).r;
n2 = tex2D(SamplerNoise3,s2*nm2*nr).g;
n3 = tex2D(SamplerNoise3,s3*nm3*nr).b;
}
float n4 = (n1+n2+n3)/3;
float3 ng = float3(n4,n4,n4);
float3 nc = float3(n1,n2,n3);
float3 nt = pow(clamp(lerp(ng,nc,ns),0.0,1.0),nj);
if ( nb == 1 )
res.rgb += nt*ni;
else if ( nb == 2 )
{
res.r = (res.r<0.5)?(2.0*res.r*(0.5+(nt.r*ni)))
:(1.0-2.0*(1.0-res.r)*(1.0-((0.5+(nt.r*ni)))));
res.g = (res.g<0.5)?(2.0*res.g*(0.5+(nt.g*ni)))
:(1.0-2.0*(1.0-res.g)*(1.0-((0.5+(nt.g*ni)))));
res.b = (res.b<0.5)?(2.0*res.b*(0.5+(nt.b*ni)))
:(1.0-2.0*(1.0-res.b)*(1.0-((0.5+(nt.b*ni)))));
}
else if ( nb == 3 )
res.rgb *= 1.0+(nt*ni);
else
res.rgb = lerp(res.rgb,nt,ni);
}
if ( compenable )
{
float compbump = lerp(lerp(compbump_n,compbump_d,tod),
lerp(compbump_in,compbump_id,tod),ind);
float comppow = lerp(lerp(comppow_n,comppow_d,tod),
lerp(comppow_in,comppow_id,tod),ind);
float compsat = lerp(lerp(compsat_n,compsat_d,tod),
lerp(compsat_in,compsat_id,tod),ind);
float compfactor = lerp(lerp(compfactor_n,compfactor_d,tod),
lerp(compfactor_in,compfactor_id,tod),ind);
float4 ovr = pow(saturate(res+compbump),comppow);
float ovrs = (ovr.r+ovr.g+ovr.b)/3.0;
ovr = ovr*compsat+ovrs*(1.0-compsat);
res.rgb -= ovr.rgb*compfactor;
}
if ( gradeenable )
{
float gradeadd_r = lerp(lerp(gradeadd_r_n,gradeadd_r_d,tod),
lerp(gradeadd_r_in,gradeadd_r_id,tod),ind);
float gradeadd_g = lerp(lerp(gradeadd_g_n,gradeadd_g_d,tod),
lerp(gradeadd_g_in,gradeadd_g_id,tod),ind);
float gradeadd_b = lerp(lerp(gradeadd_b_n,gradeadd_b_d,tod),
lerp(gradeadd_b_in,gradeadd_b_id,tod),ind);
float grademul_r = lerp(lerp(grademul_r_n,grademul_r_d,tod),
lerp(grademul_r_in,grademul_r_id,tod),ind);
float grademul_g = lerp(lerp(grademul_g_n,grademul_g_d,tod),
lerp(grademul_g_in,grademul_g_id,tod),ind);
float grademul_b = lerp(lerp(grademul_b_n,grademul_b_d,tod),
lerp(grademul_b_in,grademul_b_id,tod),ind);
float gradepow_r = lerp(lerp(gradepow_r_n,gradepow_r_d,tod),
lerp(gradepow_r_in,gradepow_r_id,tod),ind);
float gradepow_g = lerp(lerp(gradepow_g_n,gradepow_g_d,tod),
lerp(gradepow_g_in,gradepow_g_id,tod),ind);
float gradepow_b = lerp(lerp(gradepow_b_n,gradepow_b_d,tod),
lerp(gradepow_b_in,gradepow_b_id,tod),ind);
float gradecol_r = lerp(lerp(gradecol_r_n,gradecol_r_d,tod),
lerp(gradecol_r_in,gradecol_r_id,tod),ind);
float gradecol_g = lerp(lerp(gradecol_g_n,gradecol_g_d,tod),
lerp(gradecol_g_in,gradecol_g_id,tod),ind);
float gradecol_b = lerp(lerp(gradecol_b_n,gradecol_b_d,tod),
lerp(gradecol_b_in,gradecol_b_id,tod),ind);
float gradecolfact = lerp(lerp(gradecolfact_n,gradecolfact_d,
tod),lerp(gradecolfact_in,gradecolfact_id,tod),ind);
float3 gradeadd = float3(gradeadd_r,gradeadd_g,gradeadd_b);
float3 grademul = float3(grademul_r,grademul_g,grademul_b);
float3 gradepow = float3(gradepow_r,gradepow_g,gradepow_b);
float3 gradecol = float3(gradecol_r,gradecol_g,gradecol_b);
res.rgb = saturate(res.rgb+gradeadd);
res.rgb = saturate(res.rgb*grademul);
res.rgb = saturate(pow(res.rgb,gradepow));
float tonev = (res.r+res.g+res.b)/3.0;
float3 tonecolor = gradecol*tonev;
res.rgb = res.rgb*(1.0-gradecolfact)+tonecolor*gradecolfact;
}
if ( dirtenable )
{
float2 r = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w)
/NOISERES;
float4 ncolc = tex2D(SamplerNoise1,coord*dirtmc*r);
float2 ds = float2(res.r+res.g,res.g+res.b)/2.0;
float4 ncoll = tex2D(SamplerNoise1,ds*dirtml);
res = lerp(res,(ncolc.r+1)*res,
dirtcfactor*saturate(1-(ds.x+ds.y)*0.25));
res = lerp(res,(ncoll.r+1)*res,
dirtlfactor*saturate(1-(ds.x+ds.y)*0.25));
}
if ( boxe )
{
res.rgb = saturate(res.rgb);
float boxf = pow(clamp(boxh-abs(2.0*coord.x-1.0),0.0,1.0),boxb)
*pow(clamp(boxv-abs(2.0*coord.y-1.0),0.0,1.0),boxb);
res.rgb = lerp(res.rgb*(1.0-boxa),res.rgb,boxf);
}
res.a = 1.0;
return res;
}
float4 ReducePrepass( in float4 color, in float2 coord )
{
color.rgb = pow(max(color.rgb,0.0),bgamma);
float4 dac;
dac.a = (color.r+color.g+color.b)/3.0;
dac.rgb = dac.a+(color.rgb-dac.a)*bsaturation;
if ( bdither == 0 )
dac.rgb += bdbump+tex2D(SamplerNoise3,coord/NOISERES).r*bdmult;
else if ( bdither == 1 )
dac.rgb += bdbump+checkers[int(coord.x%2)+2*int(coord.y%2)]
*bdmult;
else if ( bdither == 2 )
dac.rgb += bdbump+ordered2[int(coord.x%2)+2*int(coord.y%2)]
*bdmult;
else if ( bdither == 3 )
dac.rgb += bdbump+ordered3[int(coord.x%3)+3*int(coord.y%3)]
*bdmult;
else if ( bdither == 4 )
dac.rgb += bdbump+ordered4[int(coord.x%4)+4*int(coord.y%4)]
*bdmult;
else if ( bdither == 5 )
dac.rgb += bdbump+ordered8[int(coord.x%8)+8*int(coord.y%8)]
*bdmult;
dac = saturate(dac);
return dac;
}
float4 ReduceCGA( in float4 color, in float2 coord )
{
float4 dac = ReducePrepass(color,coord);
if ( bcganum == 0 )
{
dac.a = (dac.r+dac.g+dac.b)/3.0;
return (dac.a>0.5);
}
float dist = 2.0;
int idx = 0;
if ( bcganum == 1 )
{
for ( int i=0; i<4; i++ )
{
if ( distance(dac.rgb,cga1l[i]) < dist )
{
idx = i;
dist = distance(dac.rgb,cga1l[i]);
}
}
color.rgb = cga1l[idx];
}
else if ( bcganum == 2 )
{
for ( int i=0; i<4; i++ )
{
if ( distance(dac.rgb,cga1h[i]) < dist )
{
idx = i;
dist = distance(dac.rgb,cga1h[i]);
}
}
color.rgb = cga1h[idx];
}
else if ( bcganum == 3 )
{
for ( int i=0; i<4; i++ )
{
if ( distance(dac.rgb,cga2l[i]) < dist )
{
idx = i;
dist = distance(dac.rgb,cga2l[i]);
}
}
color.rgb = cga2l[idx];
}
else if ( bcganum == 4 )
{
for ( int i=0; i<4; i++ )
{
if ( distance(dac.rgb,cga2h[i]) < dist )
{
idx = i;
dist = distance(dac.rgb,cga2h[i]);
}
}
color.rgb = cga2h[idx];
}
else if ( bcganum == 5 )
{
for ( int i=0; i<4; i++ )
{
if ( distance(dac.rgb,cga3l[i]) < dist )
{
idx = i;
dist = distance(dac.rgb,cga3l[i]);
}
}
color.rgb = cga3l[idx];
}
else if ( bcganum == 6 )
{
for ( int i=0; i<4; i++ )
{
if ( distance(dac.rgb,cga3h[i]) < dist )
{
idx = i;
dist = distance(dac.rgb,cga3h[i]);
}
}
color.rgb = cga3h[idx];
}
return color;
}
float4 ReduceEGA( in float4 color, in float2 coord )
{
float4 dac = ReducePrepass(color,coord);
float dist = 2.0;
int idx = 0;
if ( beganum == 0 )
{
for ( int i=0; i<16; i++ )
{
if ( distance(dac.rgb,stdega[i]) < dist )
{
idx = i;
dist = distance(dac.rgb,stdega[i]);
}
}
color.rgb = stdega[idx];
}
else
{
for ( int i=0; i<16; i++ )
{
if ( distance(dac.rgb,aosega[i]) < dist )
{
idx = i;
dist = distance(dac.rgb,aosega[i]);
}
}
color.rgb = aosega[idx];
}
return color;
}
float4 ReduceRGB2( in float4 color, in float2 coord )
{
float4 dac = ReducePrepass(color,coord);
color.rgb = trunc(dac.rgb*4.0)/4.0;
return color;
}
float4 ReduceRGB323( in float4 color, in float2 coord )
{
float4 dac = ReducePrepass(color,coord);
color.rgb = trunc(dac.rgb*float3(8.0,4.0,8.0))/float3(8.0,4.0,8.0);
return color;
}
float4 ReduceRGB4( in float4 color, in float2 coord )
{
float4 dac = ReducePrepass(color,coord);
color.rgb = trunc(dac.rgb*16.0)/16.0;
return color;
}
float4 ReduceRGB565( in float4 color, in float2 coord )
{
float4 dac = ReducePrepass(color,coord);
color.rgb = trunc(dac.rgb*float3(32.0,64.0,32.0))
/float3(32.0,64.0,32.0);
return color;
}
float4 ReduceRGB6( in float4 color, in float2 coord )
{
float4 dac = ReducePrepass(color,coord);
color.rgb = trunc(dac.rgb*64.0)/64.0;
return color;
}
float4 PS_Block( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = float2(IN.txcoord.x,IN.txcoord.y);
float4 res = tex2D(SamplerColor,coord);
if ( !benable )
return res;
float2 rresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bresl;
if ( bresw <= 0 || bresh <= 0 )
bresl = rresl;
else
{
if ( bresw <= 1.0 )
bresl.x = rresl.x*bresw;
else
bresl.x = bresw;
if ( bresh <= 1.0 )
bresl.y = rresl.y*bresh;
else
bresl.y = bresh;
}
float2 ncoord = (coord-float2(0.5,0.5))+float2(0.5,0.5);
ncoord = floor(ncoord*bresl)/bresl;
if ( bresw <= 0 || bresh <= 0 )
ncoord = coord;
float4 tcol = tex2D(SamplerColor,ncoord);
/* clamp */
if ( ncoord.x < 0 || ncoord.x >= 1 || ncoord.y < 0 || ncoord.y >= 1 )
tcol *= 0;
if ( bpaltype == 0 )
res = ReduceCGA(tcol,coord*bresl);
else if ( bpaltype == 1 )
res = ReduceEGA(tcol,coord*bresl);
else if ( bpaltype == 2 )
res = ReduceRGB2(tcol,coord*bresl);
else if ( bpaltype == 3 )
res = ReduceRGB323(tcol,coord*bresl);
else if ( bpaltype == 4 )
res = ReduceRGB4(tcol,coord*bresl);
else if ( bpaltype == 5 )
res = ReduceRGB565(tcol,coord*bresl);
else if ( bpaltype == 6 )
res = ReduceRGB6(tcol,coord*bresl);
else
res = tcol;
res.a = 1.0;
return res;
}
float4 PS_Curve( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = float2(IN.txcoord.x,IN.txcoord.y);
float4 res = tex2D(SamplerColor,coord);
if ( !crtenable )
return res;
float4 tcol = res;
float3 eta = float3(1+chromaab*0.09,1+chromaab*0.06,1+chromaab*0.03);
float2 center = float2(coord.x-0.5,coord.y-0.5);
float zfact = 100.0/lenszoom;
float r2 = center.x*center.x+center.y*center.y;
float f = 0;
if( lensdistc == 0.0)
f = 1+r2*lensdist*0.1;
else
f = 1+r2*(lensdist*0.1+lensdistc*0.1*sqrt(r2));
float x = f*zfact*center.x+0.5;
float y = f*zfact*center.y+0.5;
float2 rcoord = (f*eta.r)*zfact*(center.xy*0.5)+0.5;
float2 gcoord = (f*eta.g)*zfact*(center.xy*0.5)+0.5;
float2 bcoord = (f*eta.b)*zfact*(center.xy*0.5)+0.5;
float4 idist = float4(tex2D(SamplerColor,rcoord).r,
tex2D(SamplerColor,gcoord).g,
tex2D(SamplerColor,bcoord).b,
tex2D(SamplerColor,float2(x,y)).a);
res.rgb = idist.rgb;
res.a = 1.0;
return res;
}
float4 PS_Sharp( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = float2(IN.txcoord.x,IN.txcoord.y);
float4 res = tex2D(SamplerColor,coord);
if ( !shenable )
return res;
float4 origcolor = res;
float4 tcol = float4(0,0,0,0);
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*shsamp;
int i, j;
tcol = float4(0,0,0,0);
for ( i=-2; i<=2; i++ )
for ( j=-2; j<=2; j++ )
tcol += shmat[abs(i)][abs(j)]
*tex2D(SamplerColor,coord+float2(i,j)*bof);
res = res*(1.0-shblend)+tcol*shblend;
res.a = 1.0;
return res;
}
technique PostProcess
{
pass FXAA
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_FXAA();
AlphaBlendEnable = TRUE;
SrcBlend = ONE;
DestBlend = ONE;
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess2
{
pass Reel
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_Enhance();
AlphaBlendEnable = TRUE;
SrcBlend = ONE;
DestBlend = ONE;
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess3
{
pass Turboslut
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_Sharp();
AlphaBlendEnable = TRUE;
SrcBlend = ONE;
DestBlend = ONE;
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess4
{
pass Retrograde
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_Block();
AlphaBlendEnable = TRUE;
SrcBlend = ONE;
DestBlend = ONE;
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess5
{
pass Butt
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_Curve();
AlphaBlendEnable = TRUE;
SrcBlend = ONE;
DestBlend = ONE;
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}

277
menbinternals.fx Normal file
View file

@ -0,0 +1,277 @@
/*
menbinternals.fx : MariENB internal variables.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* texture sizes */
#define NOISERES 256.0
/* sharpen matrix quadrant */
static const float3x3 shmat =
{
5.76,-0.5,-0.2,
-0.5,-0.25,-0.1,
-0.2,-0.1,-0.04,
};
/* gaussian blur matrices */
static const float2x2 gauss3 =
{
0.16,0.12,
0.12,0.09
};
static const float3x3 gauss5 =
{
0.0865051903114,0.0692041522491,0.0346020761246,
0.0692041522491,0.0553633217993,0.0276816609,
0.0346020761246,0.0276816609,0.01384083045
};
static const float4x4 gauss7 =
{
0.0632507440209,0.0527089533508,0.0301194019147,0.011294775718,
0.0527089533508,0.0439241277923,0.0250995015956,0.00941231309835,
0.0301194019147,0.0250995015956,0.01434257234,0.00537846462763,
0.011294775718,0.00941231309835,0.00537846462763,0.00201692423536
};
/* dithering threshold maps */
static const float checkers[4] =
{
1,0,
0,1
};
#define d(x) x/4.0
static const float ordered2[4] =
{
d(0),d(2),
d(4),d(2)
};
#undef d
#define d(x) x/9.0
static const float ordered3[9] =
{
d(2),d(6),d(3),
d(5),d(0),d(8),
d(1),d(7),d(4)
};
#undef d
#define d(x) x/16.0
static const float ordered4[16] =
{
d( 0),d( 8),d( 2),d(10),
d(12),d( 4),d(14),d( 6),
d( 3),d(11),d( 1),d( 9),
d(15),d( 7),d(13),d( 5)
};
#undef d
#define d(x) x/64.0
static const float ordered8[64] =
{
d( 0),d(48),d(12),d(60),d( 3),d(51),d(15),d(63),
d(32),d(16),d(44),d(28),d(35),d(19),d(47),d(31),
d( 8),d(56),d( 4),d(52),d(11),d(59),d( 7),d(55),
d(40),d(24),d(36),d(20),d(43),d(27),d(39),d(23),
d( 2),d(50),d(14),d(62),d( 1),d(49),d(13),d(61),
d(34),d(18),d(46),d(30),d(33),d(17),d(45),d(29),
d(10),d(58),d( 6),d(54),d( 9),d(57),d( 5),d(53),
d(42),d(26),d(38),d(22),d(41),d(25),d(37),d(21)
};
#undef d
/* palettes */
#define d(x) x/3.0
static const float3 cga1l[4] =
{
float3(d(0),d(0),d(0)),
float3(d(0),d(2),d(2)),
float3(d(2),d(0),d(2)),
float3(d(2),d(2),d(2))
};
static const float3 cga1h[4] =
{
float3(d(0),d(0),d(0)),
float3(d(1),d(3),d(3)),
float3(d(3),d(1),d(3)),
float3(d(3),d(3),d(3))
};
static const float3 cga2l[4] =
{
float3(d(0),d(0),d(0)),
float3(d(0),d(2),d(0)),
float3(d(2),d(0),d(0)),
float3(d(2),d(1),d(0))
};
static const float3 cga2h[4] =
{
float3(d(0),d(0),d(0)),
float3(d(1),d(3),d(1)),
float3(d(3),d(1),d(1)),
float3(d(3),d(2),d(1))
};
static const float3 cga3l[4] =
{
float3(d(0),d(0),d(0)),
float3(d(0),d(2),d(2)),
float3(d(2),d(0),d(0)),
float3(d(2),d(2),d(2))
};
static const float3 cga3h[4] =
{
float3(d(0),d(0),d(0)),
float3(d(1),d(3),d(3)),
float3(d(3),d(1),d(1)),
float3(d(3),d(3),d(3))
};
static const float3 stdega[16] =
{
float3(d(0),d(0),d(0)),
float3(d(2),d(0),d(0)),
float3(d(0),d(2),d(0)),
float3(d(2),d(1),d(0)),
float3(d(0),d(0),d(2)),
float3(d(2),d(0),d(2)),
float3(d(0),d(2),d(2)),
float3(d(2),d(2),d(2)),
float3(d(1),d(1),d(1)),
float3(d(3),d(1),d(1)),
float3(d(1),d(3),d(1)),
float3(d(3),d(3),d(1)),
float3(d(1),d(1),d(3)),
float3(d(3),d(1),d(3)),
float3(d(1),d(3),d(3)),
float3(d(3),d(3),d(3))
};
#undef d
#define d(x) x/256.0
static const float3 aosega[16] =
{
float3(d( 0),d( 0),d( 0)),
float3(d(128),d( 0),d( 0)),
float3(d( 32),d(128),d( 0)),
float3(d(160),d( 64),d( 32)),
float3(d( 0),d( 32),d( 88)),
float3(d( 60),d( 0),d( 88)),
float3(d( 16),d(160),d(208)),
float3(d( 88),d( 88),d( 88)),
float3(d( 32),d( 32),d( 32)),
float3(d(256),d( 64),d( 64)),
float3(d( 72),d(256),d( 64)),
float3(d(256),d(224),d( 60)),
float3(d( 48),d(128),d(256)),
float3(d(192),d( 48),d(256)),
float3(d( 72),d(224),d(256)),
float3(d(256),d(256),d(256)),
};
#undef d
/* standard stuff (not all used) */
float tempF1;
float tempF2;
float tempF3;
float tempF4;
float tempF5;
float tempF6;
float tempF7;
float tempF8;
float tempF9;
float tempF0;
float4 ScreenSize;
float ENightDayFactor;
float EInteriorFactor;
float4 Timer;
float FieldOfView;
/* samplers and textures (some not yet used) */
texture2D texColor;
texture2D texDepth;
texture2D texPalette;
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 SamplerPalette = sampler_state
{
Texture = <texPalette>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
texture2D texNoise1
<
string ResourceName = "menbnoise1.png";
>;
texture2D texNoise2
<
string ResourceName = "menbnoise2.png";
>;
texture2D texNoise3
<
string ResourceName = "menbnoise3.png";
>;
sampler2D SamplerNoise1 = sampler_state
{
Texture = <texNoise1>;
MinFilter = LINEAR;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Wrap;
AddressV = Wrap;
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;
};
/* whatever */
struct VS_OUTPUT_POST
{
float4 vpos : POSITION;
float2 txcoord : TEXCOORD0;
};
struct VS_INPUT_POST
{
float3 pos : POSITION;
float2 txcoord : TEXCOORD0;
};

BIN
menblens.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
menblensbump.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

340
menbprepassfilters.fx Normal file
View file

@ -0,0 +1,340 @@
/*
menbeffectfilters.fx : MariENB base shader routines.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
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;
}
/* Focus */
float4 PS_ReadFocus( VS_OUTPUT_POST IN ) : COLOR
{
float cfocus = tex2D(SamplerDepth,0.5).x;
if ( !focuscircle || (focusslice <= 0) || (focuscircles <= 0) )
return cfocus;
int i, j;
float step = (1.0/focusslice);
float mfocus;
float2 coord;
float2 bof = float2(1.0,ScreenSize.w)*focusradius*0.01;
for ( i=0; i<focuscircles; i++ )
{
mfocus = 0.0;
for ( j=0; j<focusslice; j++ )
{
coord.x = 0.5+cos(2.0*pi*float(j)*step)*bof.x;
coord.y = 0.5+sin(2.0*pi*float(j)*step)*bof.y;
mfocus += step*tex2D(SamplerDepth,coord).x;
}
bof *= 0.5;
cfocus = (1.0-focusmix)*cfocus+focusmix*mfocus;
}
return cfocus;
}
float4 PS_WriteFocus( VS_OUTPUT_POST IN ) : COLOR
{
return max(lerp(tex2D(SamplerPrev,0.5).x,tex2D(SamplerCurr,0.5).x,
saturate(FadeFactor)),0.0);
}
/* Dummy */
float4 PS_DummyPrepass( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
return tex2D(SamplerColor,IN.txcoord.xy);
}
/* border detect */
float4 PS_Border( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,coord);
if ( !celenable )
return res;
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*celradius;
float3x3 GX = {-1,0,1,-2,0,2,-1,0,1}, GY = {1,2,1,0,0,0,-1,-2,-1};
float mdx = 0, mdy = 0, mud;
int i,j;
for ( i=-1; i<=1; i++ )
{
for ( j=-1; j<=1; j++ )
{
mdx += GX[i+1][j+1]*tex2D(SamplerDepth,coord
+float2(i,j)*bof).x;
mdy += GY[i+1][j+1]*tex2D(SamplerDepth,coord
+float2(i,j)*bof).x;
}
}
mud = pow(pow(mdx,2)+pow(mdy,2),0.5);
mud = saturate(pow(mud+celbump,celpower)*celmult);
float depth = tex2D(SamplerDepth,coord).x;
if ( depth >= celtrim )
mud = 0.0;
mud *= saturate(depth*celfade);
if ( celmode == 1 )
res.rgb = (1.0-saturate(tex2D(SamplerDepth,coord).x))
*(1.0-saturate(mud*celblend));
else if ( celmode == 2 )
res.rgb *= saturate(mud*celblend);
else if ( celmode == 3 )
res.rgb = saturate(mud*celblend);
else
res.rgb *= 1.0-saturate(mud*celblend);
return res;
}
/* SSAO */
float3 pseudonormal( float dep, float2 coord )
{
float2 ofs1 = float2(ssaonoff1*0.01,ssaonoff2*0.01);
float2 ofs2 = float2(ssaonoff3*0.01,ssaonoff4*0.01);
float dep1 = tex2D(SamplerDepth,coord+ofs1).x;
float dep2 = tex2D(SamplerDepth,coord+ofs2).x;
float3 p1 = float3(ofs1,dep1-dep);
float3 p2 = float3(ofs2,dep2-dep);
float3 normal = cross(p1,p2);
normal.z = -normal.z;
return normalize(normal);
}
float4 PS_SSAO( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,coord);
if ( !ssaoenable )
return res;
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*ssaoradius;
float depth = tex2D(SamplerDepth,coord).x;
float3 normal = pseudonormal(depth,coord);
float2 nc = tex2D(SamplerNoise,coord).xy;
normal += ssaonoise*normalize(tex2D(SamplerNoise,
float2(1.0,ScreenSize.w)*nc*ssaonoisesize).xyz*2.0-1.0);
normal = normalize(normal);
float occ = 0.0;
int i;
for( i=0; i<16; i++ )
{
float3 cs = ssao_samples[i];
cs = reflect(cs,normal);
float2 tc = float2(coord+i*cs.xy*bof);
float nd = tex2D(SamplerDepth,tc).x;
float dif = nd-depth;
float fall;
if ( nd > depth )
occ += 1.0/(1.0+(pow(dif,2)));
}
float uocc = 1.0-(occ/16.0);
uocc = saturate(pow(uocc+ssaobump,ssaopow)*ssaomult);
uocc *= saturate(depth*ssaofade);
if ( depth >= ssaotrim )
uocc = 0.0;
if ( ssaodebug == 1 )
return uocc;
else if ( ssaodebug == 2 )
return (float4(normal.x,normal.y,normal.z,1.0)+1.0)*0.5;
res.a = (1.0-(uocc*ssaoblend));
return res;
}
float4 PS_SSAO_Post( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord.xy;
float4 res = tex2D(SamplerColor,coord);
if ( !ssaoenable )
return res;
if ( !ssaobenable || (ssaodebug != 0) )
return res*res.a;
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*ssaobradius;
int i,j;
res.a *= 0;
if ( ssaoblevel == 1 )
{
for ( i=-2; i<=2; i++ )
for ( j=-2; j<=2; j++ )
res.a += gauss5[abs(i)][abs(j)]
*tex2D(SamplerColor,coord+float2(i,j)
*bof).a;
}
else if ( ssaoblevel == 2 )
{
for ( i=-3; i<=3; i++ )
for ( j=-3; j<=3; j++ )
res.a += gauss7[abs(i)][abs(j)]
*tex2D(SamplerColor,coord+float2(i,j)
*bof).a;
}
else
{
for ( i=-1; i<=1; i++ )
for ( j=-1; j<=1; j++ )
res.a += gauss3[abs(i)][abs(j)]
*tex2D(SamplerColor,coord+float2(i,j)
*bof).a;
}
res *= res.a;
return res;
}
/* Depth of Field */
float4 PS_DoF( VS_OUTPUT_POST IN, float2 vPos : VPOS, uniform int p ) : COLOR
{
float2 coord = IN.txcoord.xy;
if ( !dofenable )
return tex2D(SamplerColor,coord);
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
float2 bof = float2(1.0/bresl.x,1.0/bresl.y)*dofradius
*pow(clamp(doflevel+1,1,3),p);
float dep = tex2D(SamplerDepth,coord).x;
float foc = tex2D(SamplerFocus,coord).x;
float dfc = abs(dep-foc);
dfc = saturate(pow(dfc+dofbump,dofpow)*dofmult);
if ( dep >= doftrim )
dfc = 0.0;
int i,j;
float4 res = 0.0;
if ( doflevel == 1 )
{
for ( i=-2; i<=2; i++ )
for ( j=-2; j<=2; j++ )
res += gauss5[abs(i)][abs(j)]
*tex2D(SamplerColor,coord+float2(i,j)
*bof*dfc);
}
else if ( doflevel == 2 )
{
for ( i=-3; i<=3; i++ )
for ( j=-3; j<=3; j++ )
res += gauss7[abs(i)][abs(j)]
*tex2D(SamplerColor,coord+float2(i,j)
*bof*dfc);
}
else
{
for ( i=-1; i<=1; i++ )
for ( j=-1; j<=1; j++ )
res += gauss3[abs(i)][abs(j)]
*tex2D(SamplerColor,coord+float2(i,j)
*bof*dfc);
}
if ( dofdebug == 1 )
return dfc;
else if ( dofdebug == 2 )
return dep;
return (1.0-dofblend)*tex2D(SamplerColor,coord)+dofblend*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_Border();
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_SSAO();
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_SSAO_Post();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess4
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_DoF(0);
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
technique PostProcess5
{
pass p0
{
VertexShader = compile vs_3_0 VS_Pass();
PixelShader = compile ps_3_0 PS_DoF(1);
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}

137
menbprepassinternals.fx Normal file
View file

@ -0,0 +1,137 @@
/*
menbprepassinternals.fx : MariENB prepass internal variables.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* mathematical constants */
static const float pi = 3.1415926535898;
/* gaussian blur matrices */
static const float2x2 gauss3 =
{
0.16,0.12,
0.12,0.09
};
static const float3x3 gauss5 =
{
0.0865051903114,0.0692041522491,0.0346020761246,
0.0692041522491,0.0553633217993,0.0276816609,
0.0346020761246,0.0276816609,0.01384083045
};
static const float4x4 gauss7 =
{
0.0632507440209,0.0527089533508,0.0301194019147,0.011294775718,
0.0527089533508,0.0439241277923,0.0250995015956,0.00941231309835,
0.0301194019147,0.0250995015956,0.01434257234,0.00537846462763,
0.011294775718,0.00941231309835,0.00537846462763,0.00201692423536
};
/* SSAO sample sphere */
static const float3 ssao_samples[16] =
{
float3( 0.5381, 0.1856,-0.4319),float3( 0.1379, 0.2486, 0.4430),
float3( 0.3371, 0.5679,-0.0057),float3(-0.6999,-0.0451,-0.0019),
float3( 0.0689,-0.1598,-0.8547),float3( 0.0560, 0.0069,-0.1843),
float3(-0.0146, 0.1402, 0.0762),float3( 0.0100,-0.1924,-0.0344),
float3(-0.3577,-0.5301,-0.4358),float3(-0.3169, 0.1063, 0.0158),
float3( 0.0103,-0.5869, 0.0046),float3(-0.0897,-0.4940, 0.3287),
float3( 0.7119,-0.0154,-0.0918),float3(-0.0533, 0.0596,-0.5411),
float3( 0.0352,-0.0631, 0.5460),float3(-0.4776, 0.2847,-0.0271)
};
/* standard stuff (not all used) */
float4 tempF1;
float4 tempF2;
float4 tempF3;
float4 Timer;
float4 ScreenSize;
float FadeFactor;
extern float fWaterLevel = 1.0;
/* samplers and textures (some unused) */
texture2D texColor;
texture2D texDepth;
texture2D texNoise;
texture2D texFocus;
texture2D texCurr;
texture2D texPrev;
sampler2D SamplerColor = sampler_state
{
Texture = <texColor>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Mirror;
AddressV = Mirror;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerDepth = sampler_state
{
Texture = <texDepth>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerNoise = sampler_state
{
Texture = <texNoise>;
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 = LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
sampler2D SamplerPrev = sampler_state
{
Texture = <texPrev>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
/* whatever */
struct VS_OUTPUT_POST
{
float4 vpos : POSITION;
float2 txcoord : TEXCOORD0;
};
struct VS_INPUT_POST
{
float3 pos : POSITION;
float2 txcoord : TEXCOORD0;
};

215
menbprepasssettings.fx Normal file
View file

@ -0,0 +1,215 @@
/*
menbprepasssettings.fx : MariENB prepass user-tweakable variables.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* circle average focus */
bool focuscircle
<
string UIName = "FocusCircleEnable";
string UIWidget = "Checkbox";
> = {false};
int focusslice
<
string UIName = "FocusCircleSlices";
string UIWidget = "Spinner";
> = {4};
int focuscircles
<
string UIName = "FocusCircleCircles";
string UIWidget = "Spinner";
> = {1};
float focusradius
<
string UIName = "FocusCircleRadius";
string UIWidget = "Spinner";
> = {12.5};
float focusmix
<
string UIName = "FocusCircleMix";
string UIWidget = "Spinner";
> = {0.25};
/* cel filter */
bool celenable
<
string UIName = "CelEnable";
string UIWidget = "Checkbox";
> = {false};
int celmode
<
string UIName = "CelMode";
string UIWidget = "Spinner";
> = {0};
float celradius
<
string UIName = "CelRadius";
string UIWidget = "Spinner";
> = {1.0};
float celpower
<
string UIName = "CelPower";
string UIWidget = "Spinner";
> = {1.0};
float celbump
<
string UIName = "CelBump";
string UIWidget = "Spinner";
> = {0.0};
float celmult
<
string UIName = "CelMult";
string UIWidget = "Spinner";
> = {1.0};
float celblend
<
string UIName = "CelBlend";
string UIWidget = "Spinner";
> = {1.0};
float celtrim
<
string UIName = "CelTrim";
string UIWidget = "Spinner";
> = {1.0};
float celfade
<
string UIName = "CelFade";
string UIWidget = "Spinner";
> = {0.5};
/* ssao filter */
bool ssaoenable
<
string UIName = "SSAOEnable";
string UIWidget = "Checkbox";
> = {true};
int ssaodebug
<
string UIName = "SSAODebug";
string UIWidget = "Spinner";
> = 0;
float ssaonoff1
<
string UIName = "SSAONormalOffset1";
string UIWidget = "Spinner";
> = {0.0};
float ssaonoff2
<
string UIName = "SSAONormalOffset2";
string UIWidget = "Spinner";
> = {0.1};
float ssaonoff3
<
string UIName = "SSAONormalOffset3";
string UIWidget = "Spinner";
> = {0.1};
float ssaonoff4
<
string UIName = "SSAONormalOffset4";
string UIWidget = "Spinner";
> = {0.0};
float ssaoradius
<
string UIName = "SSAORadius";
string UIWidget = "Spinner";
> = {1.0};
float ssaonoise
<
string UIName = "SSAONoise";
string UIWidget = "Spinner";
> = {0.1};
float ssaonoisesize
<
string UIName = "SSAONoiseSize";
string UIWidget = "Spinner";
> = {64.0};
float ssaotrim
<
string UIName = "SSAOTrim";
string UIWidget = "Spinner";
> = {1.0};
float ssaofade
<
string UIName = "SSAOFade";
string UIWidget = "Spinner";
> = {0.5};
float ssaobump
<
string UIName = "SSAOBump";
string UIWidget = "Spinner";
> = {0.0};
float ssaomult
<
string UIName = "SSAOMult";
string UIWidget = "Spinner";
> = {1.0};
float ssaopow
<
string UIName = "SSAOPower";
string UIWidget = "Spinner";
> = {1.0};
float ssaoblend
<
string UIName = "SSAOBlend";
string UIWidget = "Spinner";
> = {1.0};
bool ssaobenable
<
string UIName = "SSAOBlurEnable";
string UIWidget = "Spinner";
> = {true};
float ssaobradius
<
string UIName = "SSAOBlurRadius";
string UIWidget = "Spinner";
> = {1.0};
int ssaoblevel
<
string UIName = "SSAOBlurLevel";
string UIWidget = "Spinner";
> = {2};
/* dof filter */
bool dofenable
<
string UIName = "DoFEnable";
string UIWidget = "Checkbox";
> = {true};
int dofdebug
<
string UIName = "DoFDebug";
string UIWidget = "Spinner";
> = {0};
float dofradius
<
string UIName = "DoFRadius";
string UIWidget = "Spinner";
> = {1.0};
int doflevel
<
string UIName = "DoFLevel";
string UIWidget = "Spinner";
> = {2};
float dofbump
<
string UIName = "DoFBump";
string UIWidget = "Spinner";
> = {0.0};
float dofmult
<
string UIName = "DoFMult";
string UIWidget = "Spinner";
> = {1.0};
float dofpow
<
string UIName = "DoFPow";
string UIWidget = "Spinner";
> = {1.0};
float dofblend
<
string UIName = "DoFBlend";
string UIWidget = "Spinner";
> = {1.0};
float doftrim
<
string UIName = "DoFTrim";
string UIWidget = "Spinner";
> = {1.0};

872
menbsettings.fx Normal file
View file

@ -0,0 +1,872 @@
/*
menbsettings.fx : MariENB user-tweakable variables.
(C)2013-2014 Marisa Kirisame, UnSX Team.
Part of MariENB, the personal ENB of Marisa.
Released under the MIT License.
*/
/* FXAA */
bool fxaaenable
<
string UIName = "EnableFXAA";
string UIWidget = "Checkbox";
> = {false};
float fxaaspanmax
<
string UIName = "FXAASpanMax";
string UIWidget = "Checkbox";
> = {4.0};
float fxaareducemul
<
string UIName = "FXAAReduceMul";
string UIWidget = "Checkbox";
> = {16.0};
float fxaareducemin
<
string UIName = "FXAAReduceMin";
string UIWidget = "Checkbox";
> = {128.0};
/* border blurring */
bool bbenable
<
string UIName = "BlurEnable";
string UIWidget = "Checkbox";
> = {true};
/* border blur sampling range */
float bbsamp_n
<
string UIName = "BlurSampleNight";
string UIWidget = "Spinner";
> = {1.0};
float bbsamp_d
<
string UIName = "BlurSampleDay";
string UIWidget = "Spinner";
> = {1.0};
float bbsamp_in
<
string UIName = "BlurSampleInteriorNight";
string UIWidget = "Spinner";
> = {1.0};
float bbsamp_id
<
string UIName = "BlurSampleInteriorDay";
string UIWidget = "Spinner";
> = {1.0};
/* border blur level */
int bblevel
<
string UIName = "BlurLevel";
string UIWidget = "Spinner";
> = {1};
/* blend power of blur */
float bbpow_n
<
string UIName = "BlurPowerNight";
string UIWidget = "Spinner";
> = {15.46};
float bbpow_d
<
string UIName = "BlurPowerDay";
string UIWidget = "Spinner";
> = {15.46};
float bbpow_in
<
string UIName = "BlurPowerInteriorNight";
string UIWidget = "Spinner";
> = {15.46};
float bbpow_id
<
string UIName = "BlurPowerInteriorDay";
string UIWidget = "Spinner";
> = {15.46};
/* falloff curve of blur towards center of screen */
float bbcurve_n
<
string UIName = "BlurCurveNight";
string UIWidget = "Spinner";
> = {1.2};
float bbcurve_d
<
string UIName = "BlurCurveDay";
string UIWidget = "Spinner";
> = {1.2};
float bbcurve_in
<
string UIName = "BlurCurveInteriorNight";
string UIWidget = "Spinner";
> = {1.2};
float bbcurve_id
<
string UIName = "BlurCurveInteriorDay";
string UIWidget = "Spinner";
> = {1.2};
/* blur falloff radius */
float bbradius_n
<
string UIName = "BlurRadiusNight";
string UIWidget = "Spinner";
> = {0.69};
float bbradius_d
<
string UIName = "BlurRadiusDay";
string UIWidget = "Spinner";
> = {0.69};
float bbradius_in
<
string UIName = "BlurRadiusInteriorNight";
string UIWidget = "Spinner";
> = {0.69};
float bbradius_id
<
string UIName = "BlurRadiusInteriorDay";
string UIWidget = "Spinner";
> = {0.69};
/* border darkening */
bool dkenable
<
string UIName = "DarkEnable";
string UIWidget = "Checkbox";
> = {true};
/* radius of darkening (relative to screen width) */
float dkradius_n
<
string UIName = "DarkRadiusNight";
string UIWidget = "Spinner";
> = {0.37};
float dkradius_d
<
string UIName = "DarkRadiusDay";
string UIWidget = "Spinner";
> = {0.37};
float dkradius_in
<
string UIName = "DarkRadiusInteriorNight";
string UIWidget = "Spinner";
> = {0.37};
float dkradius_id
<
string UIName = "DarkRadiusInteriorDay";
string UIWidget = "Spinner";
> = {0.37};
/* falloff of darkening */
float dkcurve_n
<
string UIName = "DarkCurveNight";
string UIWidget = "Spinner";
> = {1.94};
float dkcurve_d
<
string UIName = "DarkCurveDay";
string UIWidget = "Spinner";
> = {1.94};
float dkcurve_in
<
string UIName = "DarkCurveInteriorNight";
string UIWidget = "Spinner";
> = {1.94};
float dkcurve_id
<
string UIName = "DarkCurveInteriorDay";
string UIWidget = "Spinner";
> = {1.94};
/* bump of darkening */
float dkbump_n
<
string UIName = "DarkBumpNight";
string UIWidget = "Spinner";
> = {0.79};
float dkbump_d
<
string UIName = "DarkBumpDay";
string UIWidget = "Spinner";
> = {0.79};
float dkbump_in
<
string UIName = "DarkBumpInteriorNight";
string UIWidget = "Spinner";
> = {0.79};
float dkbump_id
<
string UIName = "DarkBumpInteriorDay";
string UIWidget = "Spinner";
> = {0.79};
/* shine/bloom compensation */
bool compenable
<
string UIName = "EnableCompensate";
string UIWidget = "Checkbox";
> = {true};
/* compensation factor */
float compfactor_n
<
string UIName = "CompensateFactorNight";
string UIWidget = "Spinner";
> = {0.19};
float compfactor_d
<
string UIName = "CompensateFactorDay";
string UIWidget = "Spinner";
> = {0.19};
float compfactor_in
<
string UIName = "CompensateFactorInteriorNight";
string UIWidget = "Spinner";
> = {0.19};
float compfactor_id
<
string UIName = "CompensateFactorInteriorDay";
string UIWidget = "Spinner";
> = {0.19};
/* compensation power */
float comppow_n
<
string UIName = "CompensatePowerNight";
string UIWidget = "Spinner";
> = {1.05};
float comppow_d
<
string UIName = "CompensatePowerDay";
string UIWidget = "Spinner";
> = {1.05};
float comppow_in
<
string UIName = "CompensatePowerInteriorNight";
string UIWidget = "Spinner";
> = {1.05};
float comppow_id
<
string UIName = "CompensatePowerInteriorDay";
string UIWidget = "Spinner";
> = {1.05};
/* compensation saturation */
float compsat_n
<
string UIName = "CompensateSaturationNight";
string UIWidget = "Spinner";
> = {0.3};
float compsat_d
<
string UIName = "CompensateSaturationDay";
string UIWidget = "Spinner";
> = {0.3};
float compsat_in
<
string UIName = "CompensateSaturationInteriorNight";
string UIWidget = "Spinner";
> = {0.3};
float compsat_id
<
string UIName = "CompensateSaturationInteriorDay";
string UIWidget = "Spinner";
> = {0.3};
/* brightness bump for compensation */
float compbump_n
<
string UIName = "CompensateBumpNight";
string UIWidget = "Spinner";
> = {0.0};
float compbump_d
<
string UIName = "CompensateBumpDay";
string UIWidget = "Spinner";
> = {0.0};
float compbump_in
<
string UIName = "CompensateBumpInteriorNight";
string UIWidget = "Spinner";
> = {0.0};
float compbump_id
<
string UIName = "CompensateBumpInteriorDay";
string UIWidget = "Spinner";
> = {0.0};
bool gradeenable
<
string UIName = "EnableGrading";
string UIWidget = "Checkbox";
> = {true};
/* miscellaneous color grading parameters */
float gradeadd_r_n
<
string UIName = "GradingAddRNight";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_g_n
<
string UIName = "GradingAddGNight";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_b_n
<
string UIName = "GradingAddBNight";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_r_d
<
string UIName = "GradingAddRDay";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_g_d
<
string UIName = "GradingAddGDay";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_b_d
<
string UIName = "GradingAddBDay";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_r_in
<
string UIName = "GradingAddRInteriorNight";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_g_in
<
string UIName = "GradingAddGInteriorNight";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_b_in
<
string UIName = "GradingAddBInteriorNight";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_r_id
<
string UIName = "GradingAddRInteriorDay";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_g_id
<
string UIName = "GradingAddGInteriorDay";
string UIWidget = "Spinner";
> = {0.0};
float gradeadd_b_id
<
string UIName = "GradingAddBInteriorDay";
string UIWidget = "Spinner";
> = {0.0};
float grademul_r_n
<
string UIName = "GradingMulRNight";
string UIWidget = "Spinner";
> = {1.02};
float grademul_g_n
<
string UIName = "GradingMulGNight";
string UIWidget = "Spinner";
> = {1.08};
float grademul_b_n
<
string UIName = "GradingMulBNight";
string UIWidget = "Spinner";
> = {1.04};
float grademul_r_d
<
string UIName = "GradingMulRDay";
string UIWidget = "Spinner";
> = {1.02};
float grademul_g_d
<
string UIName = "GradingMulGDay";
string UIWidget = "Spinner";
> = {1.08};
float grademul_b_d
<
string UIName = "GradingMulBDay";
string UIWidget = "Spinner";
> = {1.04};
float grademul_r_in
<
string UIName = "GradingMulRInteriorNight";
string UIWidget = "Spinner";
> = {1.02};
float grademul_g_in
<
string UIName = "GradingMulGInteriorNight";
string UIWidget = "Spinner";
> = {1.08};
float grademul_b_in
<
string UIName = "GradingMulBInteriorNight";
string UIWidget = "Spinner";
> = {1.04};
float grademul_r_id
<
string UIName = "GradingMulRInteriorDay";
string UIWidget = "Spinner";
> = {1.02};
float grademul_g_id
<
string UIName = "GradingMulGInteriorDay";
string UIWidget = "Spinner";
> = {1.08};
float grademul_b_id
<
string UIName = "GradingMulBInteriorDay";
string UIWidget = "Spinner";
> = {1.04};
float gradepow_r_n
<
string UIName = "GradingPowRNight";
string UIWidget = "Spinner";
> = {1.07};
float gradepow_g_n
<
string UIName = "GradingPowGNight";
string UIWidget = "Spinner";
> = {1.12};
float gradepow_b_n
<
string UIName = "GradingPowBNight";
string UIWidget = "Spinner";
> = {1.08};
float gradepow_r_d
<
string UIName = "GradingPowRDay";
string UIWidget = "Spinner";
> = {1.07};
float gradepow_g_d
<
string UIName = "GradingPowGDay";
string UIWidget = "Spinner";
> = {1.12};
float gradepow_b_d
<
string UIName = "GradingPowBDay";
string UIWidget = "Spinner";
> = {1.08};
float gradepow_r_in
<
string UIName = "GradingPowRInteriorNight";
string UIWidget = "Spinner";
> = {1.07};
float gradepow_g_in
<
string UIName = "GradingPowGInteriorNight";
string UIWidget = "Spinner";
> = {1.12};
float gradepow_b_in
<
string UIName = "GradingPowBInteriorNight";
string UIWidget = "Spinner";
> = {1.08};
float gradepow_r_id
<
string UIName = "GradingPowRInteriorDay";
string UIWidget = "Spinner";
> = {1.07};
float gradepow_g_id
<
string UIName = "GradingPowGInteriorDay";
string UIWidget = "Spinner";
> = {1.12};
float gradepow_b_id
<
string UIName = "GradingPowBInteriorDay";
string UIWidget = "Spinner";
> = {1.08};
float gradecol_r_n
<
string UIName = "GradingColRNight";
string UIWidget = "Spinner";
> = {0.04};
float gradecol_g_n
<
string UIName = "GradingColGNight";
string UIWidget = "Spinner";
> = {0.07};
float gradecol_b_n
<
string UIName = "GradingColBNight";
string UIWidget = "Spinner";
> = {0.59};
float gradecol_r_d
<
string UIName = "GradingColRDay";
string UIWidget = "Spinner";
> = {0.04};
float gradecol_g_d
<
string UIName = "GradingColGDay";
string UIWidget = "Spinner";
> = {0.07};
float gradecol_b_d
<
string UIName = "GradingColBDay";
string UIWidget = "Spinner";
> = {0.59};
float gradecol_r_in
<
string UIName = "GradingColRInteriorNight";
string UIWidget = "Spinner";
> = {0.04};
float gradecol_g_in
<
string UIName = "GradingColGInteriorNight";
string UIWidget = "Spinner";
> = {0.07};
float gradecol_b_in
<
string UIName = "GradingColBInteriorNight";
string UIWidget = "Spinner";
> = {0.59};
float gradecol_r_id
<
string UIName = "GradingColRInteriorDay";
string UIWidget = "Spinner";
> = {0.04};
float gradecol_g_id
<
string UIName = "GradingColGInteriorDay";
string UIWidget = "Spinner";
> = {0.07};
float gradecol_b_id
<
string UIName = "GradingColBInteriorDay";
string UIWidget = "Spinner";
> = {0.59};
float gradecolfact_n
<
string UIName = "GradingColFactorNight";
string UIWidget = "Spinner";
> = {-0.24};
float gradecolfact_d
<
string UIName = "GradingColFactorDay";
string UIWidget = "Spinner";
> = {-0.24};
float gradecolfact_in
<
string UIName = "GradingColFactorInteriorNight";
string UIWidget = "Spinner";
> = {-0.24};
float gradecolfact_id
<
string UIName = "GradingColFactorInteriorDay";
string UIWidget = "Spinner";
> = {-0.24};
/* Soft grain */
bool ne
<
string UIName = "EnableSoftGrain";
string UIWidget = "Checkbox";
> = {true};
/* soft grain speed */
float nf_n
<
string UIName = "SoftGrainSpeedNight";
string UIWidget = "Spinner";
> = {2.68};
float nf_d
<
string UIName = "SoftGrainSpeedDay";
string UIWidget = "Spinner";
> = {2.68};
float nf_in
<
string UIName = "SoftGrainSpeedInteriorNight";
string UIWidget = "Spinner";
> = {2.68};
float nf_id
<
string UIName = "SoftGrainSpeedInteriorDay";
string UIWidget = "Spinner";
> = {2.68};
/* soft grain intensity */
float ni_n
<
string UIName = "SoftGrainIntensityNight";
string UIWidget = "Spinner";
> = {0.04};
float ni_d
<
string UIName = "SoftGrainIntensityDay";
string UIWidget = "Spinner";
> = {0.04};
float ni_in
<
string UIName = "SoftGrainIntensityInteriorNight";
string UIWidget = "Spinner";
> = {0.04};
float ni_id
<
string UIName = "SoftGrainIntensityInteriorDay";
string UIWidget = "Spinner";
> = {0.04};
/* soft grain saturation */
float ns_n
<
string UIName = "SoftGrainSaturationNight";
string UIWidget = "Spinner";
> = {0.09};
float ns_d
<
string UIName = "SoftGrainSaturationDay";
string UIWidget = "Spinner";
> = {0.09};
float ns_in
<
string UIName = "SoftGrainSaturationInteriorNight";
string UIWidget = "Spinner";
> = {0.09};
float ns_id
<
string UIName = "SoftGrainSaturationInteriorDay";
string UIWidget = "Spinner";
> = {0.09};
/* Two-pass noise */
bool np
<
string UIName = "SoftGrainTwopass";
string UIWidget = "Checkbox";
> = {true};
/* grain blend function: 0 normal, 1 add, 2 overlay, 3 multiply */
int nb
<
string UIName = "SoftGrainBlendfunc";
string UIWidget = "Spinner";
> = {1};
/* grain deviation */
float nk
<
string UIName = "SoftGrainDeviation";
string UIWidget = "Spinner";
> = {0.05};
/* grain magnification */
float nm1
<
string UIName = "SoftGrainMagnification1";
string UIWidget = "Spinner";
> = {1.25};
float nm2
<
string UIName = "SoftGrainMagnification2";
string UIWidget = "Spinner";
> = {0.64};
float nm3
<
string UIName = "SoftGrainMagnification3";
string UIWidget = "Spinner";
> = {0.35};
/* grain magnification pass 1 */
float nm11
<
string UIName = "SoftGrainMagnification11";
string UIWidget = "Spinner";
> = {2.05};
float nm12
<
string UIName = "SoftGrainMagnification12";
string UIWidget = "Spinner";
> = {3.11};
float nm13
<
string UIName = "SoftGrainMagnification13";
string UIWidget = "Spinner";
> = {2.22};
/* grain magnification pass 2 */
float nm21
<
string UIName = "SoftGrainMagnification21";
string UIWidget = "Spinner";
> = {4.25};
float nm22
<
string UIName = "SoftGrainMagnification22";
string UIWidget = "Spinner";
> = {0.42};
float nm23
<
string UIName = "SoftGrainMagnification23";
string UIWidget = "Spinner";
> = {6.29};
/* grain power */
float nj_n
<
string UIName = "SoftGrainPowerNight";
string UIWidget = "Spinner";
> = {2.93};
float nj_d
<
string UIName = "SoftGrainPowerDay";
string UIWidget = "Spinner";
> = {2.93};
float nj_in
<
string UIName = "SoftGrainPowerInteriorNight";
string UIWidget = "Spinner";
> = {2.93};
float nj_id
<
string UIName = "SoftGrainPowerInteriorDay";
string UIWidget = "Spinner";
> = {2.93};
/* Block graphics filter with palette reduction */
bool benable
<
string UIName = "EnableBlockGFX";
string UIWidget = "Checkbox";
> = {false};
/* emulated resolution for block graphics (0 or less for real resolution) */
float bresw
<
string UIName = "BlockGFXResolutionW";
string UIWidget = "Spinner";
> = {1.0};
float bresh
<
string UIName = "BlockGFXResolutionH";
string UIWidget = "Spinner";
> = {1.0};
/* palette type for block graphics */
int bpaltype
<
string UIName = "BlockGFXpalette";
string UIWidget = "Spinner";
> = {5};
/* CGA subpalette */
int bcganum
<
string UIName = "BlockGFXcgamode";
string UIWidget = "Spinner";
> = {0};
/* EGA subpalette */
int beganum
<
string UIName = "BlockGFXegamode";
string UIWidget = "Spinner";
> = {0};
/* Dithering method */
int bdither
<
string UIName= "BlockGFXDither";
string UIWidget = "Spinner";
> = {4};
/* Gamma modifier */
float bgamma
<
string UIName= "BlockGFXPrepassGamma";
string UIWidget = "Spinner";
> = {1.0};
/* dither bump */
float bdbump
<
string UIName= "BlockGFXDitherBump";
string UIWidget = "Spinner";
> = {-0.01};
/* dither multiplier */
float bdmult
<
string UIName= "BlockGFXDitherMultiplier";
string UIWidget = "Spinner";
> = {0.02};
/* dither saturation */
float bsaturation
<
string UIName= "BlockGFXPrepassSaturation";
string UIWidget = "Spinner";
> = {1.0};
/* Dirty screen effect (static noise) */
bool dirtenable
<
string UIName = "EnableDirt";
string UIWidget = "Checkbox";
> = {true};
/* dirt amount */
float dirtcfactor
<
string UIName = "DirtCoordFactor";
string UIWidget = "Spinner";
> = {0.09};
float dirtlfactor
<
string UIName = "DirtLuminanceFactor";
string UIWidget = "Spinner";
> = {0.0};
float dirtmc
<
string UIName = "DirtCoordMagnification";
string UIWidget = "Spinner";
> = {3.04};
float dirtml
<
string UIName = "DirtLuminanceMagnification";
string UIWidget = "Spinner";
> = {1.0};
/* Letterbox */
bool boxe
<
string UIName = "EnableBox";
string UIWidget = "Checkbox";
> = {true};
/* horizontal factor */
float boxh
<
string UIName = "BoxHorizontal";
string UIWidget = "Spinner";
> = {1.5};
/* vertical factor */
float boxv
<
string UIName = "BoxVertical";
string UIWidget = "Spinner";
> = {1.0};
/* softening */
float boxb
<
string UIName = "BoxSoften";
string UIWidget = "Spinner";
> = {0.02};
/* box alpha */
float boxa
<
string UIName = "BoxAlpha";
string UIWidget = "Spinner";
> = {6.07};
/* Use CRT curvature shader */
bool crtenable
<
string UIName = "EnableCurvature";
string UIWidget = "Checkbox";
> = {false};
/* chromatic aberration on CRT: fancy effect that isn't really realistic */
float chromaab
<
string UIName = "CurveChromaticAberration";
string UIWidget = "Spinner";
> = {0.93};
/* curvature lens zoom (0.5 = none) */
float lenszoom
<
string UIName = "CurveZoom";
string UIWidget = "Spinner";
> = {50.0};
/* curvature lens distortion */
float lensdist
<
string UIName = "CurveLens";
string UIWidget = "Spinner";
> = {0.0};
/* curvature CUBIC lens distortion */
float lensdistc
<
string UIName = "CurveLensCubic";
string UIWidget = "Spinner";
> = {0.0};
/* Use sharpening filter */
bool shenable
<
string UIName = "EnableSharpen";
string UIWidget = "Checkbox";
> = {false};
float shsamp
<
string UIName = "SharpenSample";
string UIWidget = "Spinner";
> = {0.6};
float shblend
<
string UIName = "SharpenBlend";
string UIWidget = "Spinner";
> = {0.2};