Home Database Mysql Tutorial [gpu pro]《正当防卫2》渲染技术

[gpu pro]《正当防卫2》渲染技术

Jun 07, 2016 pm 03:37 PM
g gpu pro technology rendering

humus写在gpu pro上面的,其中很多东西在他的网站上,以及后来的siggraph12上面提及了,文章链接 雷同的地方就不记录了,结合siggraph12上面的那个文章,可以说含金量颇高,有较多可以借鉴的亮点。 light index 多光源的处理方法不是deferred系列,而是使用l

humus写在gpu pro上面的,其中很多东西在他的网站上,以及后来的siggraph12上面提及了,文章链接

雷同的地方就不记录了,结合siggraph12上面的那个文章,可以说含金量颇高,有较多可以借鉴的亮点。


light index

多光源的处理方法不是deferred系列,而是使用light index的方式,把light信息放到一个texture里面。

细节就略过了。

shadow

使用了cascaded shadow map,有snapping避免抖动,在camera处于不同情况下会自动的调节shadow的range来最大化利用率。

这里一个细节很棒,在不同cascade之间过渡的时候,使用的是dither,而不是blend,这样就避免了sample两次的问题。

[gpu pro]《正当防卫2》渲染技术

在pc还实现了一个类似pcss的效果,是使用类似ssao的方法,在shadowmap里面进行sample搜索,根据有没有occluder来决定shadow kernel的大小。

人物的shadow

justcause2的游戏情况是常常是人物就在镜头前,这个造成正常的shadow的效果精度不足,humus他们尝试了增加一个专门的渲染人物的shadow buffer,但是发现性价比过低。最后采用的是tatarchuk的light bleed mapping technique。

这个参考文章是这个:http://developer.amd.com/wordpress/media/2012/10/D3DTutorial05_Real-Time_Skin_Rendering.pdf

05年gdc一个文章,当年应该说颇具前沿的,现在看来也挺有理论深度的,不过基本上是不适用了,图形学变化真是快速。

light bleeding就是把shadow计算做一些扩展,根据receiver和occluder的距离,不再是简单的可见不可见,而是逐渐的亮度递减:

light bleeding的函数图:

[gpu pro]《正当防卫2》渲染技术

正常shadow的函数图:

[gpu pro]《正当防卫2》渲染技术

humus做了些变化,natalya是使用的exp衰减,而justcause2里面是使用的线性衰减。

最后character部分的阴影就更加的柔和(visual artifact更少),算是不求有功但求无过的做法了。

ao

有这么几种ao:

  • 物件上材质带的ao,material里面带一个ao的通道
  • ssao
  • ao volume:在character,车辆上面常常有

floating point precision

在另外一篇博客里面有了,就不重复了,这里稍微记录下floating point的精度大小怎么去计算,这个涉及到floating point的原理,这个原理用到的几率非常之低,所以忘记了应该说挺正常的。

我们一般的floating point是23位的mantissa,所以如果我们在8192这个级别做计算,那么精度就是8192/pow(2,23)=1/1024,大约是毫米级别,但是在矩阵做了各种旋转类的操作之后,误差积累是惊人的,做法就是先做translation,避免掉大数据,然后再做rotation。

一致的api

跨平台的常用做法就是自己engine里面有一个api,处理各种平台,这个在设计的时候humus表示如果能更早的借鉴dx10的state object设计上会更精简一些。

dx10之后就是把state做了分组,blend state等等,这样的设计就是更精炼。

gamma

justcause2里面使用linear space做lighting,但是有一些硬件在dx9的srgb上面的blending有一些问题这个带来一些困扰。

然后一个问题不是那么技术,但是导致的问题却非常多,就是早期程序员使用了2作为gamma转换的值,而不是2.2,这个对于程序员来说看不出什么区别,但是对于artist这个区别就大了去了,最后改正带来一些代价。

memory优化

首先justcause使用了一个不错的给artist&designer的反馈就是,在memory耗尽的时候,就不再分配新的贴图出来,而是使用一个错误贴图来警示,然后迫使designer来做资源缩减,这个就是项目中技术含量虽然不高,但是非常有效的一个手段。

shdow map使用16bit,1024分辨率,3张。

vertex compress

做了一个进一步的texture packing,在一些允许的情况下,把texture的颜色放到vertex上面,texture里面只保留luminance,然后3张压到1张dxt1里面。



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Beelink EX graphics card expansion dock promises zero GPU performance loss Beelink EX graphics card expansion dock promises zero GPU performance loss Aug 11, 2024 pm 09:55 PM

One of the standout features of the recently launched Beelink GTi 14is that the mini PC has a hidden PCIe x8 slot underneath. At launch, the company said that this would make it easier to connect an external graphics card to the system. Beelink has n

AMD FSR 3.1 launched: frame generation feature also works on Nvidia GeForce RTX and Intel Arc GPUs AMD FSR 3.1 launched: frame generation feature also works on Nvidia GeForce RTX and Intel Arc GPUs Jun 29, 2024 am 06:57 AM

AMD delivers on its initial March ‘24 promise to launch FSR 3.1 in Q2 this year. What really sets the 3.1 release apart is the decoupling of the frame generation side from the upscaling one. This allows Nvidia and Intel GPU owners to apply the FSR 3.

Desktop resolution affects 'Black Myth: Wukong' frame rate dropped by half? RTX 4060 frame rate test errata Desktop resolution affects 'Black Myth: Wukong' frame rate dropped by half? RTX 4060 frame rate test errata Aug 16, 2024 am 09:35 AM

A few days ago, Game Science released the benchmark software for "Black Myth: Wukong". During the test, we found that when an external monitor is connected (the independent display is directly connected to the video output interface), if the desktop resolution of the monitor is larger than the in-game resolution , the game frame rate will drop very significantly, and in some cases the frame rate will even drop by half. So we restarted the test and found out the reason. This article is about my last test: "2 resolutions x 13 image qualities = 26 test results, RTX4060 in "Black Myth: Wukong" What is the frame rate in ? 》Correction and errata, I would like to apologize to everyone here first. In theory, the RTX4060 will be much higher in "Black Myth: Wukong" than my previous test results.

Three cameras with 20x zoom, Honor selects Xiaopai Smart Camera Pro innovation is coming Three cameras with 20x zoom, Honor selects Xiaopai Smart Camera Pro innovation is coming Aug 23, 2024 pm 09:44 PM

Have you installed cameras in your home? In recent years, home camera products have suddenly become a hit. I asked my friends around me, and boy, every house has one, and some even have more than one. However, with the popularity of the product, it has also brought some complaints during use. For example, you can only see one place at the same time, and if you want to see other places, you have to adjust the pan/tilt and rotate the camera back and forth. There is a certain blind spot and time difference when viewing the picture; or when you want to take a closer look at a certain location in your home, you find that the picture is blurry and you cannot see it at all. Clarity; etc... The experience is greatly compromised. Honor Select and Xiaopai Technology jointly launched the Honor Select Xiaopai Smart Camera Pro featuring "three lenses and dual images". Provides new solutions to industry and user pain points

Samsung S25 Ultra details exposed: same width as iPhone 16 Pro Max, but with a larger screen Samsung S25 Ultra details exposed: same width as iPhone 16 Pro Max, but with a larger screen Aug 23, 2024 pm 09:33 PM

According to news on August 22, as the release of Samsung’s new generation flagship mobile phone S25 Ultra approaches, more and more details are beginning to emerge. The well-known blogger @ibinguniverse revealed more specifications of the S25 Ultra on Weibo today. The most eye-catching one is that its body width is the same as the Apple iPhone 16 Pro Max, both 77.6mm. 1. Thanks to Samsung’s further optimization of the frame design, the screen size of the S25 Ultra has been increased to 6.86 inches while maintaining the same width as the iPhone 16 Pro Max, providing users with a more immersive visual experience. The blogger further pointed out in the comment area that the black edges of the S25 Ultra are better than those of the iPhone 16 Pro Max&

New AI algorithm unveiled: power reduced to 1/50 of conventional configuration, memory usage reduced to 1/10 New AI algorithm unveiled: power reduced to 1/50 of conventional configuration, memory usage reduced to 1/10 Jun 27, 2024 pm 03:54 PM

According to news from this site on June 27, a research team from the University of California, Santa Cruz has developed a new method that can run a large language model with a scale of 1 billion parameters using only 13W of power (equivalent to the power of a modern LED light bulb). . For comparison, a data center-level GPU used for large language model tasks requires about 700W. Under the AI ​​wave, the main research directions of many companies and institutions are application and reasoning, and indicators such as efficiency are rarely considered. To alleviate this situation, the researcher eliminated the intensive technique of matrix multiplication and proposed a "ternion" solution, which has only three values ​​​​of negative one, zero, or positive one. The team also created custom hardware using a highly customized circuit called a field-programmable gate array (FPGA), allowing them to maximize the use of

How to choose a thousand-yuan machine? The battery life is very good, vivo Y37 Pro is equipped with 6000mAh How to choose a thousand-yuan machine? The battery life is very good, vivo Y37 Pro is equipped with 6000mAh Aug 27, 2024 pm 03:31 PM

In today's thousand-yuan phone market, battery life and appearance have become the focus of many consumers. After all, for most people, a mobile phone must not only meet the basic needs of daily use, but also have long-lasting power to cope with long-term use. At the same time, having a pleasing appearance design can add points to the use experience. few. The vivo Y37Pro is such a thousand-yuan phone that performs well in terms of battery life and appearance. Appearance vivoY37Pro has a simple and stylish appearance. Back panel: Special process treatment, not easy to leave fingerprints. Middle frame: full of metal texture. Color: apricot sea, dark night, city in the sky. Layout of the rear camera module: the upper left corner of the back panel. SIM card slot: left side of the fuselage. Volume buttons and power button: right side of the fuselage. interface

Newly discovered AMD patent reveals unique GPU architecture with three dies Newly discovered AMD patent reveals unique GPU architecture with three dies Jun 16, 2024 am 09:01 AM

AnewlydiscoveredpatentfiledbyAMDonDecember2022suggeststhatthecompanyislookingtoadoptamulti-chipletdesignforitsupcomingmainstreamRDNAGPUarchitectures.Thisisn'tthefirsttimewe'veseensuchadesignforthecompany'sproducts,

See all articles