1
Fork 0

MariENB 1.2015.5.1

This commit is contained in:
Marisa the Magician 2019-04-07 17:16:05 +02:00
commit 0e69aeb0bc
5 changed files with 11 additions and 35 deletions

View file

@ -300,30 +300,17 @@ float3 FilmGrain( float3 res, float2 coord )
}
return lerp(res,nt,ni);
}
/* REVOLUTIONARY ULTRA-AWESOME FILTER */
float3 Aberration( sampler2D smp, float2 coord )
{
float3 eta = float3(1+chromaab*0.09,1+chromaab*0.06,1+chromaab*0.03);
float2 mid = coord-0.5;
float2 rc = eta.r*(1.0-chromaab*0.1)*mid+0.5;
float2 gc = eta.g*(1.0-chromaab*0.1)*mid+0.5;
float2 bc = eta.b*(1.0-chromaab*0.1)*mid+0.5;
float3 ab = float3(tex2D(smp,rc).r,tex2D(smp,gc).g,tex2D(smp,bc).b);
return ab;
}
/* MariENB shader */
float4 PS_Mari( VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
float2 coord = IN.txcoord0.xy;
float4 res = tex2D(_s0,coord);
if ( usecurve ) res.rgb = Aberration(_s0,coord);
if ( aenable ) res.rgb = Adaptation(res.rgb);
if ( tmapenable && tmapbeforecomp ) res.rgb = Tonemap(res.rgb);
if ( compenable ) res.rgb = Compensate(res.rgb);
if ( tmapenable && !tmapbeforecomp ) res.rgb = Tonemap(res.rgb);
if ( bloomdebug ) res.rgb *= 0;
if ( usecurve ) res.rgb += Aberration(_s3,coord)*EBloomAmount;
else res += tex2D(_s3,coord)*EBloomAmount;
res.rgb += tex2D(_s3,coord).rgb*EBloomAmount;
if ( tintbeforegrade && tintenable ) res.rgb = Tint(res.rgb);
if ( vgradeenable ) res.rgb = GradingGame(res.rgb);
if ( gradeenable1 ) res.rgb = GradingRGB(res.rgb);

View file

@ -205,18 +205,6 @@ float nj
string UIWidget = "Spinner";
float UIMin = 0.0;
> = {2.0};
/* use curvature + chromatic aberration filter */
bool usecurve
<
string UIName = "UseCurve";
string UIWidget = "Checkbox";
> = {false};
/* this is a stupid filter and you should feel bad for using it */
float chromaab
<
string UIName = "CurveChromaAberration";
string UIWidget = "Spinner";
> = {0.05};
/* "adaptation" factors */
bool aenable
<

View file

@ -85,10 +85,6 @@ texture2D texNoise3
<
string ResourceName = "menbnoise2.png";
>;
texture2D texWater
<
string ResourceName = "menbwater.png";
>;
texture2D texHeat
<
string ResourceName = "menbheat.png";