leavesleaves22 发表于 2012-9-17 15:21

:(:(:(:(:(

qqweilaiai 发表于 2012-9-17 15:52

ddddddddddddddddddddddddddddddddddddddddd

经典黑白 发表于 2012-9-17 17:18

//++++++++++++++++++++++++++++++++++++++++++++
// ENBSeries effect file
// visit http://enbdev.com for updates
// Copyright (c) 2007-2012 Boris Vorontsov
// Tweaks by LSiwora
//++++++++++++++++++++++++++++++++++++++++++++
//ADDITIONAL POST-PROCESSING EFFECTS
//MAKE A BACKUP BEFORE CHANGING ANYTHING
//enable blurring
#define EBLURRING
//enable sharpening
#define ESHARPENING
//enable color
#define ECOLORSHIFT
//enable noise in dark areas
#define ENOISE
//if defined, color sharpen, otherwise sharp by gray
#define ESHARPENINGCOLOR
//+++++++++++++++++++++++++++++
//internal parameters, can be modified
//+++++++++++++++++++++++++++++
float BlurSamplingRange=0.4;//0.4
float ShiftSamplingRange=0.50;
float SharpSamplingRange=0.59;//0.56; //sharpening or blurring range
float SharpeningAmount=4.2;//2.7;
float ScanLineAmount=0.0;
float ScanLineRepeat=0.0; //0.5, 0.3333, 0.25, 0.125, so on
float NoiseAmount=0.03125;

//+++++++++++++++++++++++++++++
//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;

//textures
texture2D texColor;
texture2D texNoise;
sampler2D SamplerColor = sampler_state
{
Texture   = <texColor>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;//NONE;
AddressU= Clamp;
AddressV= Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};
sampler2D SamplerNoise = sampler_state
{
Texture   = <texNoise>;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;//NONE;
AddressU= Wrap;
AddressV= Wrap;
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;
};

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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;
}

//1 blur
float4 PS_ProcessBlur(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float4 res;
float4 coord=0.0;
coord.xy=IN.txcoord.xy;
float4 origcolor;
coord.w=0.0;
origcolor=tex2Dlod(SamplerColor, coord);
float2 offset=
{
float2(1.0, 1.0),
float2(-1.0, -1.0),
float2(-1.0, 1.0),
float2(1.0, -1.0),
float2(1.0, 0.0),
float2(-1.0, 0.0),
float2(0.0, 1.0),
float2(0.0, -1.0),
float2(1.41, 0.0),
float2(-1.41, 0.0),
float2(0.0, 1.41),
float2(0.0, -1.41),
float2(1.41, 1.41),
float2(-1.41, -1.41),
float2(-1.41, 1.41),
float2(1.41, -1.41)
};
int i=0;
float4 tcol=origcolor;
float2 invscreensize=1.0/ScreenSize.x;
invscreensize.y=invscreensize.y/ScreenSize.z;
//for (i=0; i<8; i++) //higher quality
//for (i=0; i<4; i++)
for (i=0; i<16; i++)
{
float2 tdir=offset.xy;
coord.xy=IN.txcoord.xy+tdir.xy*invscreensize*BlurSamplingRange;//*1.0;
float4 ct=tex2Dlod(SamplerColor, coord);
tcol+=ct;
}
//tcol*=0.2; // 1.0/(4+1)
//tcol*=0.111; // 1.0/(8+1)//higher quality
tcol*=0.05882353;
res.xyz=tcol.xyz;
res.w=1.0;
return res;
}

//2 sharp
float4 PS_ProcessSharp(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float4 res;
float4 coord=0.0;
coord.xy=IN.txcoord.xy;
float4 origcolor;
coord.w=0.0;
origcolor=tex2Dlod(SamplerColor, coord);
float2 offset=
{
float2(1.0, 1.0),
float2(-1.0, -1.0),
float2(-1.0, 1.0),
float2(1.0, -1.0),
float2(1.41, 0.0),
float2(-1.41, 0.0),
float2(0.0, 1.41),
float2(0.0, -1.41)
};
int i=0;
float4 tcol=origcolor;
float2 invscreensize=1.0/ScreenSize.x;
invscreensize.y=invscreensize.y/ScreenSize.z;
//for (i=0; i<8; i++) //higher quality
for (i=0; i<4; i++)
{
float2 tdir=offset.xy;
coord.xy=IN.txcoord.xy+tdir.xy*invscreensize*SharpSamplingRange;//tempF3;//*1.0;
float4 ct=tex2Dlod(SamplerColor, coord);
tcol+=ct;
}
tcol*=0.2; // 1.0/(4+1)
//tcol*=0.111; // 1.0/(8+1)//higher quality
//sharp
#ifdef ESHARPENING
#ifdef ESHARPENINGCOLOR
//color
res=origcolor*(1.0+((origcolor-tcol)*SharpeningAmount));
#else
//non color
float difffact=dot((origcolor.xyz-tcol.xyz), 0.333);
res=origcolor*(1.0+difffact*SharpeningAmount);
#endif
//less sharpening for bright pixels
float rgray=origcolor.z; //blue fit well
//float rgray=max(origcolor.x, max(origcolor.y, origcolor.z));
rgray=pow(rgray, 3.0);
res=lerp(res, origcolor, saturate(rgray));
#endif

//grain noise
#ifdef ENOISE
float origgray=max(res.x, res.y);//dot(res.xyz, 0.333);
origgray=max(origgray, res.z);
coord.xy=IN.txcoord.xy*16.0 + origgray;
float4 cnoi=tex2Dlod(SamplerNoise, coord);
res=lerp(res, (cnoi.x+0.5)*res, NoiseAmount*saturate(1.0-origgray*0.0));
#endif
res.w=1.0;
return res;
}

//3
float4 PS_ProcessShift(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float4 res;
float4 coord=0.0;
coord.xy=IN.txcoord.xy;
float4 origcolor;
coord.w=0.0;
origcolor=tex2Dlod(SamplerColor, coord);
int i=0;
float4 tcol=origcolor;
float2 invscreensize=1.0/ScreenSize.x;
invscreensize.y=invscreensize.y/ScreenSize.z;
coord.xy=IN.txcoord.xy;
origcolor=tex2Dlod(SamplerColor, coord);
res.y=origcolor.y;
coord.xy=IN.txcoord.xy;
coord.y-=invscreensize*ShiftSamplingRange;
origcolor=tex2Dlod(SamplerColor, coord);
res.x=origcolor.x;
coord.xy=IN.txcoord.xy;
coord.y+=invscreensize*ShiftSamplingRange;
origcolor=tex2Dlod(SamplerColor, coord);
res.z=origcolor.z;
res.w=1.0;
return res;
}


//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//first must blur
technique PostProcess
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader= compile ps_3_0 PS_ProcessBlur();
DitherEnable=FALSE;
ZEnable=FALSE;
CullMode=NONE;
ALPHATESTENABLE=FALSE;
SEPARATEALPHABLENDENABLE=FALSE;
AlphaBlendEnable=FALSE;
StencilEnable=FALSE;
FogEnable=FALSE;
SRGBWRITEENABLE=FALSE;
}
}

//second must sharp
technique PostProcess2
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader= compile ps_3_0 PS_ProcessSharp();
DitherEnable=FALSE;
ZEnable=FALSE;
CullMode=NONE;
ALPHATESTENABLE=FALSE;
SEPARATEALPHABLENDENABLE=FALSE;
AlphaBlendEnable=FALSE;
StencilEnable=FALSE;
FogEnable=FALSE;
SRGBWRITEENABLE=FALSE;
}
}

#ifdef ECOLORSHIFT
//third must shift
technique PostProcess3
{
pass P0
{
VertexShader = compile vs_3_0 VS_PostProcess();
PixelShader= compile ps_3_0 PS_ProcessShift();
DitherEnable=FALSE;
ZEnable=FALSE;
CullMode=NONE;
ALPHATESTENABLE=FALSE;
SEPARATEALPHABLENDENABLE=FALSE;
AlphaBlendEnable=FALSE;
StencilEnable=FALSE;
FogEnable=FALSE;
SRGBWRITEENABLE=FALSE;
}
}
#endif // ECOLORSHIFT

hjy1988714 发表于 2012-9-17 18:18

谢谢楼主了

gongjaiwei22 发表于 2012-9-17 18:20

菜鸟来观摩学习啊 感谢楼主

毒子 发表于 2012-9-17 20:31

支持啊~!!

zigongzy222 发表于 2012-9-17 20:53

:):):):):):):):)

acezd 发表于 2012-9-17 20:58

感谢分享!!

njlqc 发表于 2012-9-17 21:11

这个不错,可以自己根据电脑情况调了,谢谢分享

19977991 发表于 2012-9-17 21:13

来看看撒。。。。。。。。。。。。

spark55 发表于 2012-9-17 21:27

谢谢楼主分享

spark55 发表于 2012-9-17 21:28

谢谢楼主分享

bigmap 发表于 2012-9-17 21:31

RE: 《上古卷轴5 ENB从菜鸟到高手》BoneAsh原创大型图文教程,带您开启美丽上古时代!目前已更新到<进阶篇>! [修

Zephuros 发表于 2012-9-17 21:48

收了慢慢搞

AoiKaoru 发表于 2012-9-17 23:01

瓜娃日本日本

rx121 发表于 2012-9-17 23:12

666666666666666666666666666666666666666

aWorldOfConfusi 发表于 2012-9-17 23:29

顶顶顶
:lol

xmm141 发表于 2012-9-17 23:34

感谢LZ新手入门求指教~

zdczhuque 发表于 2012-9-18 00:12

莫要藏啊

idinter 发表于 2012-9-18 00:57

好东西!!!支持!!!!!!!!!!

rui657z 发表于 2012-9-18 01:34

真的长知识了

Anesen 发表于 2012-9-18 02:02

好贴要收藏

nomiconomino 发表于 2012-9-18 03:39

支持 ~谢谢无私分享

秋重 发表于 2012-9-18 08:44

咔咔咔咔咔咔咔咔

紫露凝香 发表于 2012-9-18 08:55

楼主辛苦了,这贴子不错我收藏 并支持着。

my-fuck 发表于 2012-9-18 10:11

111111111111111111111111111111

undead9527 发表于 2012-9-18 10:14

机器不好,一直不敢尝试

sdfgab 发表于 2012-9-18 10:27

回来赚奖励……

bomoquaner 发表于 2012-9-18 10:53

DDDDDDDDDDDDDDDDDDDDD

wodesss 发表于 2012-9-18 11:11

好东西,下了看看
页: 53 54 55 56 57 58 59 60 61 62 [63] 64 65 66 67 68 69 70 71 72
查看完整版本: 【ARROW&KNEE MOD TEAM™】《上古卷轴5 ENB从菜鸟到高手》BoneAsh原创大型图文教程,带您开启美丽上古时代!目前为进阶篇!