愤怒的狼3d小鸡模拟器器不能玩

这个位置可以看到ppsspp的特殊处理文件位置来看看这些特效用来测试的未加特效图片
传说系列一生爱---英杰传说
最后的战士
是关于饱和度,亮度,对比度,色调的调节,ppsspp中的默认参数为饱和度加强1.2倍,对比度增强1.25倍,在unity中我们可以设为外部变量自己调节
关键代码:
float4 frag(v2f i) :COLOR
float size = 1 / _S
float3 c10 = tex2D(_MainTex, i.uv_MainTex + float2(0, -1)*size).
float3 c01 = tex2D(_MainTex, i.uv_MainTex + float2(-1, 0)*size).
float3 c11 = tex2D(_MainTex, i.uv_MainTex).
float3 c21 = tex2D(_MainTex, i.uv_MainTex + float2(1, 0)*size).
float3 c12 = tex2D(_MainTex, i.uv_MainTex + float2(0, 1)*size).
float3 dt = float3(1.0, 1.0, 1.0);
float k1 = dot(abs(c01 - c21), dt);
float k2 = dot(abs(c10 - c12), dt);
float3 color = (k1*(c10 + c12) + k2*(c01 + c21) + 0.001*c11) / (2.0*(k1 + k2) + 0.001);
float x = sqrt(dot(color, color));
color.r = pow(color.r + 0.001, _A);
color.g = pow(color.g + 0.001, _A);
color.b = pow(color.b + 0.001, _A);
//饱和度,亮度,对比度,色调映射
return float4(contrast4(x)*normalize(color*_C_ch)*_B,1);
ppsspp中实测
unity中实测
辉光效果ppsspp中的辉光在unity种效果并不好,模糊处理不够,亮度过量,采样方式为grid采样之前写过
关键代码:
float4 frag(v2f i) :COLOR
float size = 1 / _S
float2 uv = i.uv_MainT
float3 color = tex2D(_MainTex, i.uv_MainTex);
float4 sum = 0;
for (int i = -3; i & 3; i++)
sum += tex2D(_MainTex, uv + float2(-1, i)*size) * _A
sum += tex2D(_MainTex, uv + float2(0, i)*size) * _A
sum += tex2D(_MainTex, uv + float2(1, i)*size) * _A
if (color.r & 0.3 && color.g & 0.3 && color.b & 0.3)
bloom = sum.rgb*sum.rgb*0.012 +
if (color.r & 0.5 && color.g & 0.5 && color.b & 0.5)
bloom = sum.xyz*sum.xyz*0.009 +
bloom = sum.xyz*sum.xyz*0.0075 +
bloom = mix(color, bloom, _Power);
return float4(bloom, 1);
ppsspp中实测
unity中实测
卡通效果的post processing颜色总共分为四层,把颜色灰度每层段数值再加上减到最少的小数部分,产生一些过渡效果再用得出的灰度乘上原色值,保留了原来的颜色只是明暗分为四层,层之间有过度通过边缘检测描边,着色道理与像似,但不完全相同,
关键代码:
float4 frag(v2f i) :COLOR
float size = 1 / _S
float3 c00 = tex2D(_MainTex, i.uv_MainTex + float2(-1, -1)*size).
float3 c10 = tex2D(_MainTex, i.uv_MainTex + float2(0, -1)*size).
float3 c20 = tex2D(_MainTex, i.uv_MainTex + float2(1, -1)*size).
float3 c01 = tex2D(_MainTex, i.uv_MainTex + float2(-1, 0)*size).
float3 c11 = tex2D(_MainTex, i.uv_MainTex).
float3 c21 = tex2D(_MainTex, i.uv_MainTex + float2(1, 0)*size).
float3 c02 = tex2D(_MainTex, i.uv_MainTex + float2(-1, 1)*size).
float3 c12 = tex2D(_MainTex, i.uv_MainTex + float2(0, 1)*size).
float3 c22 = tex2D(_MainTex, i.uv_MainTex + float2(1, 1)*size).
float3 dt = float3(1.0, 1.0, 1.0);
float d1 = dot(abs(c00 - c22), dt);
float d2 = dot(abs(c20 - c02), dt);
float hl = dot(abs(c01 - c21), dt);
float vl = dot(abs(c10 - c12), dt);
float d = _Bb*(d1 + d2 + hl + vl) / (dot(c11, dt) + 0.15);
float lc = 4.0*length(c11);
float f = frac(lc);
lc = 0.25*(floor(lc) + f*f) + 0.05;
//颜色总共分为四层,把颜色灰度每层段数值再加上减到最少的小数部分,产生一些过渡效果
c11 = 4.0*normalize(c11);
float3 frct = frac(c11);
c11 = floor(c11) + 0.05*dt + frct*
return float4(0.25*lc*(1.1 - d*sqrt(d))*c11,1);
//再用得出的灰度乘上原色值,保留了原来的颜色只是明暗分为四层,层之间有过度
//通过边缘检测描边,着色道理与之前的一篇文章像似,但不完全相同,
ppsspp中实测
unity中实测
CRT是模拟以前大脑袋电脑的阴极射线管(Cathode Ray Tube)的显示器的特殊效果,频闪之类的特效,用过大脑袋的都懂。
关键代码:
float4 frag(v2f i) :COLOR
// scanlines
float vPos = float((i.uv_MainTex.y + _Time.z * 0.5) * 272.0);
float j = 2;
float line_intensity = modf(float(vPos), j);
// color shift
float off = line_intensity *0.00001;
float2 shift = float2(off, 0);
// shift R and G channels to simulate NTSC color bleed
float2 colorShift = float2(0.001, 0);
float r = tex2D(_MainTex, i.uv_MainTex + colorShift + shift).x;
float g = tex2D(_MainTex, i.uv_MainTex - colorShift + shift).y;
float b = tex2D(_MainTex, i.uv_MainTex).z;
float4 c = float4(r, g * 0.99, b, 1) * clamp(line_intensity, 0.85, 1);
float rollbar = sin((i.uv_MainTex.y + _Time.z) * 30);
return c + (rollbar * 0.02);
ppsspp中实测
unity中实测
ppsspp的fxaa抗锯齿效果在unity上异常的好,耗费很少,四个采样点来进行边缘检测(边缘检测的很粗糙),边缘处两个点之间模糊
关键代码:
float4 frag(v2f i) :COLOR
float u_texelDelta = 1 / _S
float FXAA_SPAN_MAX = 8.0;
float FXAA_REDUCE_MUL = 1.0 / 8.0;
float FXAA_REDUCE_MIN = (1.0 / 128.0);
float3 rgbNW = tex2D(_MainTex, i.uv_MainTex + (float2(-1.0, -1.0) * u_texelDelta)).
float3 rgbNE = tex2D(_MainTex, i.uv_MainTex + (float2(+1.0, -1.0) * u_texelDelta)).
float3 rgbSW = tex2D(_MainTex, i.uv_MainTex + (float2(-1.0, +1.0) * u_texelDelta)).
float3 rgbSE = tex2D(_MainTex, i.uv_MainTex + (float2(+1.0, +1.0) * u_texelDelta)).
float3 rgbM = tex2D(_MainTex, i.uv_MainTex).
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)));
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);
dir = min(float2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
max(float2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), dir * rcpDirMin)) * u_texelD
float3 rgbA = (1.0 / 2.0) * (
tex2D(_MainTex, i.uv_MainTex + dir * (1.0 / 3.0 - 0.5)).xyz +
tex2D(_MainTex, i.uv_MainTex + dir * (2.0 / 3.0 - 0.5)).xyz);
float3 rgbB = rgbA * (1.0 / 2.0) + (1.0 / 4.0) * (
tex2D(_MainTex, i.uv_MainTex + dir * (0.0 / 3.0 - 0.5)).xyz +
tex2D(_MainTex, i.uv_MainTex + dir * (3.0 / 3.0 - 0.5)).xyz);
float lumaB = dot(rgbB, luma);
if ((lumaB & lumaMin) || (lumaB & lumaMax)){
return float4( rgbA,1);
return float4(rgbB, 1);
//整体上是一个边缘检测,在边缘处进行采样模糊
ppsspp中实测
unity中实测
灰度白光的亮度用Y表示,它和红绿蓝三色光的关系:Y = 0.299R+0.587G+0.114B&&& NTSC美制电视制式亮度公式Y = 0.222R+0.707G+0.071B&&& PAL(相位逐行交变)电视制式ppsspp使用的是NTSC美制,Unity中的Luminance函数使用的是PAL制式
关键代码:
float4 frag(v2f i) :COLOR
float3 rgb = tex2D(_MainTex, i.uv_MainTex).
float luma = dot(rgb, float3(0.299, 0.587, 0.114));
ppsspp中实测
unity中实测
inversecolors
关键代码:
float4 frag(v2f i) :COLOR
float3 rgb = tex2D(_MainTex, i.uv_MainTex).
float luma = dot(rgb, float3(0.299, 0.587, 0.114));
// luma = Luminance(rgb);
float3 gray = float3(luma, luma, luma) - 0.5;
rgb -= float3(0.5, 0.5, 0.5);
return float4(mix(rgb, gray, 2.0) + 0.5, 1);
ppsspp中实测
unity中实测
使颜色变得自然把颜色从RGB转到YIQ色彩空间在进行变换
关键代码:
float4 frag(v2f i) :COLOR
float3 val00 = float3(1.2, 1.2, 1.2);
float3x3 RGBtoYIQ = float3x3(0.299, 0.596, 0.212,
0.587, -0.275, -0.523,
0.114, -0.321, 0.311);
float3x3 YIQtoRGB = float3x3(1.0, 1.0, 1.0,
0., -0., -1.6619523,
0., -0..1817149);
float4 c = tex2D(_MainTex, i.uv_MainTex);
float3 c1 =mul( RGBtoYIQ,c.rgb);
c1 = float3(pow(c1.x, val00.x), c1.yz*val00.yz);
//转换到YIQ色彩空间再加强GB颜色1.2倍
return float4(mul(YIQtoRGB,c1), 1);
ppsspp中实测
unity中实测
屏幕上的线的效果
关键代码:
float4 frag(v2f i) :COLOR
float pos0 = ((i.uv_MainTex.y + 1.0) * 170.0*_Amount);
float pos1 = cos((frac(pos0) - 0.5)*3.1415926*_Inten)*1.5;
float4 rgb = tex2D(_MainTex, i.uv_MainTex);
// slight contrast curve
float4 color = rgb*0.5 + 0.5*rgb*rgb*1.2;
// color tint
color *= float4(0.9, 1.0, 0.7, 0.0);
// vignette
color *= 1.1 - 0.6 * (dot(i.uv_MainTex - 0.5, i.uv_MainTex - 0.5) * 2.0);
return mix(float4(0, 0, 0, 0), color, pos1);
ppsspp中实测
unity中实测
锐化取上下两个采样点,采样点之间的颜色差越大(边缘,色差大等处),sharp越明显
关键代码:
float4 frag(v2f i) :COLOR
float4 c = tex2D(_MainTex, i.uv_MainTex);
c -= tex2D(_MainTex, i.uv_MainTex + _Size)*7.0*_I
c += tex2D(_MainTex, i.uv_MainTex - _Size)*7.0*_I
//采样点之间的颜色差越大(边缘,色差大等处),sharp越明显
ppsspp中实测
unity中实测
关键代码:
float4 frag(v2f i) :COLOR
float vignette = 1.1 - 0.6 * (dot(i.uv_MainTex - 0.5, i.uv_MainTex - 0.5) * 2.0);
float3 rgb = tex2D(_MainTex, i.uv_MainTex).
return float4(vignette * rgb, 1);
ppsspp中实测
unity中实测
ppsspp中实测
upscale_spline36
缩放滤镜基于样条线的缩放(Spline based resizers)分别有spline16 spline36 spline64这三个缩放滤镜基于样条插值算法。样条差值算法在放大时尽可能的锐化图像,减少失真该算法原作者为Panorama tools的开发者详细算法的介绍请看forum.doom9.org/showthread.php?t=147117
ppsspp中实测
用一张不同的图做测试,在比例2X的情况下全屏拉伸,图像会变模糊,使用缩放滤镜进行放大,效果就像4X一样清楚
全部代码已上传至
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& --------by&wolf96
阅读(...) 评论()当前【全部】
全部安卓手机安卓平板安卓电视iPhoneiPad其他
当前位置:>>>愤怒的狮子3D模拟器
愤怒的狮子3D模拟器类型:
热门排行榜
3607+人在玩4099+人在玩1945+人在玩60万+人在玩6万+人在玩7万+人在玩
愤怒的狮子3D模拟器app相关推荐
发现该应用有下载安装使用错误或恶意扣费携带病毒,请
版权所有 京ICP备号-5
京公网安备 50 备求终极野狼模拟器的汉化版╰(*´︶`*)╯谢谢大神!_百度知道安卓模拟器为什么不能玩mc_百度知道

我要回帖

更多关于 海马玩模拟器 的文章

 

随机推荐