Skip to content

Archive

Archive for November, 2011
上一篇解决了透明物体的渲染问题;本文将挑战另一个实时渲染的神话,实时全局光照(GI)。 实时全动态GI 目前direct lighting在游戏中日趋成熟,比较前卫的游戏引擎已经不满足于diect lighting的效果了,逐渐开始尝试indirect lighting。早期的方法有通过离线渲染light map来实现静态场景、静态光源的GI。接着出现了PRT,可以处理静态场景、动态光源。CE3用了Light Propagation Volumes的方法,不需要预计算,可以产生动态场景、动态光源的diffuse GI。不过其速度和质量确实不敢恭维。难道就不能有全动态场景、全动态光源、diffuse和specular通吃的实时GI方法吗?有!Multiresolution splatting for indirect illumination(MRSII)前来救 ...
上文讲到了如何把信息挤入有限的G-Buffer,另一个在实际中面临的问题是如何渲染透明物体。 透明物体 游戏中透明物体是不可缺少的,对于Deferred Rendering来说,透明物体一直是痛苦的。常见的做法是在deferred rendering的场景之上用forward shading来单独渲染透明物体,但那样就意味着必须单独实现一整套forward shading的流水线。这对于维护和扩展都是很不利的,对性能也很有影响。 在KlayGE 4.0里,我用的方法被称为Deep G-Buffer。其基本过程是,把第一篇所描述的Deferred Rendering流水线复制三份,不透明的物体、透明物体的背面、透明物体的正面分别有自己独立的G-Buffer、lighting pass、shading pass和special shading pass。最 ...
上一篇讲了在KlayGE 4.0中,Deferred Rendering的流水线改进。本篇继续讲G-Buffer的变化。 G-Buffer布局 前面提到了G-Buffer改成了MRT,那么现在就来比较一下新老G-Buffer的区别。老G-Buffer的安排如下: 老G-Buffer是4个通道、每个通道都是fp16的RGBA16F格式。其中normal用Spheremap Transform的方式映射到2个通道;depth单独存一个通道;specular和shininess挤在一个通道内,整数部分为specular * 100,小数部分为shininess / 256.0f。 这样的G-Buffer需要占据64-bit,IO开销不小,而且depth精度有限。如果按照新的MRT G-Buffer扩展到2个RT,就需要再增加一个32-bit的RT。对于不支持Independent MRT的D3D9硬件来说,甚至要增加 ...
Deferred Rendering在KlayGE中已经出现比较长时间了,我也写过系列文章来阐述KlayGE中的延迟渲染。在将要推出的KlayGE 4.0中,Deferred Rendering进入了渲染系统的核心,可以作为更通用更方便的一个渲染封装来使用。 在功能上,KlayGE 4.0中的Deferred Rendering也有了长足的进步。本系列将着重于解析这些新改进。 流水线 先来看看Deferred Rendering的流水线。 在流水线方面,第一个比较大的变化是,G-Buffer改成了MRT的,用类似Deferred Shading的fat G-Buffer来避免在shading pass再次渲染一遍物体。新G-Buffer的布局将在下一篇分解。在shading pass阶段,只需要渲染一个全屏quad,在每个pixel上把材质和光照信息结合就可以了 ...
[zh] 正如id Software的传统和承诺,Doom 3的源代码以GPL3的协议发布了。其中不包含游戏数据,而且因为法律原因,原引擎中的阴影渲染技巧“卡马克反转”也已经被替换掉。 你可以从https://github.com/TTimo/doom3.gpl下载到。 [/zh] [en] As promised and as per tradition, id Software has released the Doom 3 source code under GPL3. No game data is contained, and the original engine's shadow rendering trick known as Carmack's reverse has been replaced for legal reasons. You can find it here: https://github.com/TTimo/doom3.gpl [/en]
今年Gamefest的材料放得比较慢,之前公开过一小部分,直到现在才都公开。有兴趣的可以到Microsoft downloads直接用"gamefest 2011"搜索下载。 Chuck Walbourn的blog列举了一些Windows开发者感兴趣的主题,供大家参考: Performance How Valve Makes Games Better with XPerf (Windows Performance Toolkit) (US | Valve PDF Valve Code) Scaling Your Game to N Cores: A Deep Dive on Tasking (US UK) Direct3D Modern Texture Content Pipelines (US UK Code) Symbolic Differentiation in HLSL (US UK Examples) Tiled Resources for Xbox 360 and Direct3D 11 (US UK Code) Visual C++ Agile C++ Game Dev ...
From http://android-developers.blogspot.com/2011/11/updated-ndk-for-android-40.html Today we are releasing an updated version of the Android NDK, now in revision 7. The updated NDK lets developers who are using native code get started with the new native APIs available in Android 4.0. Android NDK r7 includes a number of build system improvements and bug fixes, but most importantly it gives you access to two new sets of APIs: Low-level streaming multimedia: A new API based on Khronos OpenMAX AL 1.0.1 provides a direct, efficient path for low-level streaming multimedia. The new path is ...
几个月以前我试着实现了第一个WebGL程序,但需要单独一个网页有点麻烦。能不能把WebGL代码嵌入Wordpress的帖子中呢? 答案是YES,只要把代码都放在<pre></pre>之间就可以了。下面就是一个例子: Your browser does not support the canvas. // // // 把canvas、js、vs、ps都用pre包起来之后,你就可以在Wordpress的帖子中看到WebGL渲染的结果了!注意canvas标签里面需要一行字,比如“Your browser does not support the canvas”,否则那个canvas可能会被Wordpress的编辑工具删掉。
From NVIDIA's newsletter: The first CUDA 4.1 release candidate (RC1) is now available to GPU Computing Registered Developers. This is a great opportunity to try the new compiler, enhanced libraries, and improved development tools we’ve added to the CUDA Toolkit for this release. We’re looking forward to hearing your experiences (good and bad) so we can make CUDA 4.1 the best release yet! Please login to download your copy of CUDA Toolkit 4.1 and updated SDK code samples. If you encounter any problems, please use the Bug Report link in your registered developer account. https://nvde ...
[zh] 本文的目的不是为了完整地把Python 3.2移植到Android,只是希望编译出能用在自己程序里的链接库。 完成boost 1.47的移植之后,下一个目标就是Python 3.2。目前Python只有2.6.2非官方地移植到了Android(见P4A),他们迟迟不开始移植3.x,主要原因是他们认为3.x没用-_-。看来这件事情只能自己做了。由于Python 3.x和之前的版本有着巨大的区别,其难度完全不可预测。 准备工作 需要下载 Python 3.2.0 Crystax's NDK r6 Cygwin P4A configure 按照linux平台的老习惯,很多配置是写在.in文件中,需要用configure来生成出对应的.c或者.h。这里需要特别注意的是,需要让configure用NDK的工具链: ./configure --host=a ...