MariENB 1.2015.6.1
This commit is contained in:
parent
3129cbf055
commit
49a3cf6757
8 changed files with 79 additions and 8 deletions
|
|
@ -204,6 +204,25 @@ float3 GradingGame( float3 res )
|
|||
tcol = max(0,(tcol*_r3.w-_r3.y)*_r3.z+_r3.y);
|
||||
return lerp(res,tcol,vgradeblend);
|
||||
}
|
||||
/* LUT colour grading */
|
||||
float3 GradingLUT( float3 res )
|
||||
{
|
||||
/*
|
||||
gross hacks were needed to "fix" the way direct3d interpolates on
|
||||
sampling, and to manually interpolate on the blue channel
|
||||
*/
|
||||
float3 tcol = clamp(res,0.0,1.0)*0.875+0.0625;
|
||||
float2 lc1 = float2(tcol.r/16.0+floor(tcol.b*16.0)/16.0,tcol.g/64.0
|
||||
+clut/64.0);
|
||||
float2 lc2 = float2(tcol.r/16.0+ceil(tcol.b*16.0)/16.0,tcol.g/64.0
|
||||
+clut/64.0);
|
||||
float dec = frac(tcol.b*16.0);
|
||||
float3 tcl1 = tex2D(SamplerLUT,lc1);
|
||||
float3 tcl2 = tex2D(SamplerLUT,lc2);
|
||||
tcol = lerp(tcl1,tcl2,dec);
|
||||
tcol = (tcol-0.0625)/0.875;
|
||||
return lerp(res,tcol,lutblend);
|
||||
}
|
||||
/* display debug register */
|
||||
float debugreg( float r, float2 coord, int p )
|
||||
{
|
||||
|
|
@ -324,6 +343,7 @@ float4 PS_Mari( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
|||
if ( gradeenable2 ) res.rgb = GradingColorize(res.rgb);
|
||||
if ( gradeenable3 ) res.rgb = GradingHSV(res.rgb);
|
||||
}
|
||||
if ( lutenable ) res.rgb = GradingLUT(res.rgb);
|
||||
if ( !tintbeforegrade && tintenable ) res.rgb = Tint(res.rgb);
|
||||
if ( fadebeforefilm ) res.rgb = _r5.rgb*_r5.a + res.rgb*(1.0-_r5.a);
|
||||
if ( ne ) res.rgb = FilmGrain(res.rgb,coord);
|
||||
|
|
|
|||
|
|
@ -71,6 +71,10 @@ texture2D texNoise3
|
|||
<
|
||||
string ResourceName = "menbnoise2.png";
|
||||
>;
|
||||
texture2D texLUT
|
||||
<
|
||||
string ResourceName = "menblutpreset.png";
|
||||
>;
|
||||
sampler2D _s0 = sampler_state
|
||||
{
|
||||
Texture = <texs0>;
|
||||
|
|
@ -167,6 +171,18 @@ sampler2D SamplerNoise3 = sampler_state
|
|||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
sampler2D SamplerLUT = sampler_state
|
||||
{
|
||||
Texture = <texLUT>;
|
||||
MinFilter = LINEAR;
|
||||
MagFilter = LINEAR;
|
||||
MipFilter = NONE;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
SRGBTexture = FALSE;
|
||||
MaxMipLevel = 0;
|
||||
MipMapLodBias = 0;
|
||||
};
|
||||
/* whatever */
|
||||
struct VS_OUTPUT_POST
|
||||
{
|
||||
|
|
|
|||
|
|
@ -828,6 +828,24 @@ float vgradeblend
|
|||
float UIMin = 0.0;
|
||||
float UIMax = 1.0;
|
||||
> = {1.0};
|
||||
/* LUT grading */
|
||||
bool lutenable
|
||||
<
|
||||
string UIName = "EnableLUTGrading";
|
||||
string UIWidget = "Checkbox";
|
||||
> = {false};
|
||||
float lutblend
|
||||
<
|
||||
string UIName = "LUTBlend";
|
||||
string UIWidget = "Spinner";
|
||||
> = {1.0};
|
||||
int clut
|
||||
<
|
||||
string UIName = "LUTPreset";
|
||||
string UIWidget = "Spinner";
|
||||
int UIMin = 0;
|
||||
int UIMax = 63;
|
||||
> = {1};
|
||||
bool fadebeforefilm
|
||||
<
|
||||
string UIName = "FadeBeforeFilmFilters";
|
||||
|
|
@ -862,4 +880,4 @@ float regdebugscale
|
|||
string UIName = "DebugRegistersScale";
|
||||
string UIWidget = "Spinner";
|
||||
float UIMin = 0.0;
|
||||
> = {5.0};
|
||||
> = {5.0};
|
||||
|
|
|
|||
|
|
@ -226,11 +226,11 @@ float4 PS_ASCII( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
|
|||
float4 res = tex2D(SamplerColor,coord);
|
||||
if ( !asciienable ) return res;
|
||||
float2 bresl = float2(ScreenSize.x,ScreenSize.x*ScreenSize.w);
|
||||
float2 fresl = float2(8,4096);
|
||||
float2 cresl = float2(8,16);
|
||||
float2 fresl = float2(FONT_WIDTH,FONT_HEIGHT);
|
||||
float2 cresl = float2(GLYPH_WIDTH,GLYPH_HEIGHT);
|
||||
float2 bscl = floor(bresl/cresl);
|
||||
float3 col = tex2D(SamplerColor,floor(bscl*coord)/bscl).rgb;
|
||||
int lum = luminance(col)*255;
|
||||
int lum = luminance(col)*FONT_LEVELS;
|
||||
float2 itx = floor(coord*bresl);
|
||||
float2 blk = floor(itx/cresl)*cresl;
|
||||
float2 ofs = itx-blk;
|
||||
|
|
@ -420,4 +420,4 @@ technique PostProcess5
|
|||
FogEnable = FALSE;
|
||||
SRGBWRITEENABLE = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,6 +138,12 @@ static const float3 aosega[16] =
|
|||
float3(d(256),d(256),d(256)),
|
||||
};
|
||||
#undef d
|
||||
/* dimensions for ascii art font */
|
||||
#define FONT_WIDTH 8
|
||||
#define FONT_HEIGHT 4096
|
||||
#define GLYPH_WIDTH 8
|
||||
#define GLYPH_HEIGHT 16
|
||||
#define FONT_LEVELS 255
|
||||
/* standard stuff */
|
||||
float4 ScreenSize;
|
||||
float ENightDayFactor;
|
||||
|
|
|
|||
BIN
enbseries/menblutpreset.png
Normal file
BIN
enbseries/menblutpreset.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 196 KiB |
|
|
@ -17,7 +17,7 @@ UseBox=false
|
|||
BoxVertical=0.8
|
||||
UseGrain=false
|
||||
GrainFrequency=2500.0
|
||||
GrainIntensity=0.03
|
||||
GrainIntensity=0.02
|
||||
GrainSaturation=0.0
|
||||
GrainTwoPass=true
|
||||
GrainBlend=3
|
||||
|
|
@ -32,7 +32,7 @@ GrainPass1Magnification3=2.22
|
|||
GrainPass2Magnification1=4.25
|
||||
GrainPass2Magnification2=0.42
|
||||
GrainPass2Magnification3=6.29
|
||||
GrainPower=2.05
|
||||
GrainPower=2.8
|
||||
UseCurve=false
|
||||
CurveChromaAberration=0.03
|
||||
UseAdaptation=true
|
||||
|
|
@ -163,3 +163,14 @@ ChromaAberration=0.01
|
|||
ChromaAberrationOverbright=0.0
|
||||
ChromaAberrationOverbrightMax=4.0
|
||||
ChromaAberrationOverbrightMin=0.8
|
||||
EnableLUTGrading=false
|
||||
LUTBlendNight=1.0
|
||||
LUTBlendDay=1.0
|
||||
LUTBlendInteriorNight=1.0
|
||||
LUTBlendInteriorDay=1.0
|
||||
LUTNight=1
|
||||
LUTDay=1
|
||||
LUTInteriorNight=1
|
||||
LUTInteriorDay=1
|
||||
LUTBlend=1.0
|
||||
LUTPreset=50
|
||||
|
|
|
|||
|
|
@ -122,6 +122,6 @@ FocusCenterX=0.5
|
|||
FocusCenterY=0.5
|
||||
FocusCircleAngle=0.0
|
||||
FocusManual=false
|
||||
FocusManualValue=0.7
|
||||
FocusManualValue=0.75
|
||||
DistortionChromaticAberration=12.460001
|
||||
FocusPointDisplay=false
|
||||
|
|
|
|||
Reference in a new issue