Archive for 2011 年 9 月

一段话的SSAO,在IrrLicht论坛上看到的

30 9 月, 2011

"uniform sampler2D tex0;"\

"uniform sampler2D tex2;"\

"uniform vec2 screenSz;"\
"uniform float camFar;"\
"float rand(vec2 co){"\
"        return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * vec2(43758.5453,43458.5734));"\
"}\n"\
"#define smplsz 7.05\n"\
"#define jitter 8.95\n"\
"#define range 10.0\n"\
"#define gi_scale 6.85\n"\
"#define ao_scale 1.55\n"\
"#define gi_mul_ao 0.45\n"\
"void main() {"\
"   vec2 UV = gl_TexCoord[0].xy;"\
"   vec2 sample3 = texture2D(tex2,UV).xy;"\
"   if (sample3.x==1.0)"\
"       discard;"\
"   float mult = camFar/range;"\
"   vec4 col = texture2D(tex0,UV);"\
"   col.w = col.w*2.0-1.0;"\
"   vec3 n = vec3(col.w,sample3.y,sqrt(max((1.0-sample3.y*sample3.y-col.w*col.w),0.0)));"\
"   vec3 p = (vec3(UV*2.0-1.0,1.0)*sample3.x*mult);"\
"   vec2 fres = UV*screenSz*vec2(5.0/128.0);"\
"   vec2 jitterSz = jitter/screenSz;"\
"   float ao = 0.0;"\
"   vec3 gi = vec3(0.0,0.0,0.0);"\
"   vec2 inc = vec2(smplsz)/screenSz;"\
"   vec2 UVoff;"\
"   float Adiv = 4.0/(screenSz.x*screenSz.y);"\
"   for(float i=1.0; i<4.0; ++i) {"\
"       float samples = i*3.0;"\
"       for(float j=0.0; j<samples; ++j) {"\
"           float angle = j*6.283185308/samples;"\
"           UVoff = clamp(UV+vec2(sin(angle),cos(angle))*i*inc+rand(fres+UVoff)*jitterSz,0.000386,0.999614);"\
"           vec2 sample4 = texture2D(tex2, UVoff).rg;"\
"           float sampleDepth = mult*sample4.r;"\
"           vec3 ddiff = vec3(UVoff*2.0*sampleDepth-vec2(sampleDepth),sampleDepth)-p;"\
"           float rd = dot(ddiff,ddiff)*3.141592654;"\
"           ddiff = normalize(ddiff);"\
"           vec4 colSmp = texture2D(tex0,UVoff);"\
"           colSmp.w = colSmp.w*2.0-1.0;"\
"           vec3 nmlE = vec3(colSmp.w,sample4.y,sqrt(max((1.0-sample4.y*sample4.y-colSmp.w*colSmp.w),0.0)));"\
"           float A = sampleDepth*sampleDepth*Adiv;"\
"           float cosE = max(dot(nmlE,-ddiff),0.0);"\
"           float cosR = dot( n,ddiff );"\
"           ao += cosE*max(cosR*4.0,0.0)/sqrt(A/rd + 1.0);"\
"           gi += colSmp.rgb*max(cosR,0.0)*cosE*(A/rd+1.0);"\
"       }"\
"   }"\
"   ao *= ao_scale/30.0;"\
"   gi *= gi_scale/30.0;"\
"   gl_FragColor = vec4((col.rgb+gi*gi_mul_ao)*vec3(max(-pow(ao,0.936),-1.0))+col.rgb+gi,1.0);"\
"}"

《金山毒霸》使用《楼兰》CG做为主题皮肤之一

29 9 月, 2011

暴雪《暗黑破坏神》也终于走上“单人在线RPG”之路

19 9 月, 2011

2年前,我发表了名为“《轩辕剑》终于肯做“单人在线”了”的文章,终没有几个玩家相信单人在线不可破解。现今证明,此法无比成功,盗版全部消失,销量相对为前作数倍之多。而终于,做为国际大作的暴雪也终于将自己的RPG做成了“单人在线RPG”

 

《暗黑3》一款备受瞩目的游戏,无论是玩家亦或是各个国内外破解组织都对其抱有很大的兴趣,今天突然从国外某开源项目中获得一些消息,分享给大家。

“通过对近期对暗黑3的破解,我们发现:

《暗黑3》应该是一个彻彻底底的网游,使用的网络框架跟《魔兽世界》几乎一样,甚至怀疑就是一种东西,跟《星际争霸2》有较大区别。如果不在服务端建立数据库,就可能没有npc,不能保存人物,同时触发事件报错等问题。”

鄂ICP备09027626号