Purpose of implementations.

  • One draw call rendering by one mesh.
  • Supporting customization of eyeball pupil.
  • Simple refraction FX.
Refer to desired result of eyeball.

preview of result.

开发瞳孔时,我特别重视的是,能够准确地引导出美术的最终要求。
使用前两个Mesh的方法是由美术队自制的,是消费两个Draw-Call的,没有特别的折射感,所以和美术简单讨论后使用了两个Specular,但是从实际的太阳光源的位置计算出来,其中一个是根据用户的视角计算的,即镜头视角。

我为美术提供的最终目标是Horizon Zero Dawn。

在实现过程中,我们合并了两个Draw-call,最大限度地降低了精度,消除了所有的GGX运算,只使用Normalized Blinn-Phong Specular实现。

ALU在处理折射时有所增加,但删除了依赖于PBR的某些部分,使得整体ALU比正常的PBR少了一些,实现了CustomUV,从而减少了Pixel Shader Stage计算的部分。

现在,我们使用Replection Cubemap来实现油膜的光泽度,而在下一个优化版本中,将更改为Dual Parabolic Reflection,以进一步优化它。

创作原型时,使用Amplify Shader Editor来实现了它。

实现了Eye Refraction function, Mode写为Create的话之后在代码中会以函数形式来记录。

写最终代码的时候,有着更易读的优点。


An important part of my development of the pupils was to pinpoint exactly what the final requirements of the art team were.

The first two meshes were used by the art team voluntarily, but the two draw-calls were consumed and there was no refraction, so we simply discussed with the art team and then used two specular One is calculated from the position of the actual solar light source and the other is calculated from the point of view of the camera, that is, the camera point of view.

I also had to find the overall feeling of completeness, and my final goal for the art team was Horizon Zero Dawn.

In the implementation process, we merged two draw-calls into one, and we reduced the precision as much as possible, eliminated all GGX operations, and implemented only with Normalized Blinn-Phong Specular.

The ALU increased slightly when refracting, but by removing some of the PBR dependent parts, the overall ALU was reduced compared to the normal PBR, and the CustomUV implementation reduced some of the computation on the Pixel Shader Stage.Currently, the reflection cube map is used to realize the gloss of the retina. In the next optimized version, it will be changed to Dual Parabolic Reflection to optimize it further.


最好使用简单的纹理开发原型,以便艺术团队清楚地了解实现意图。
在这种程度上,我和美术讨论了如何改善眼球光照处理,并不断改善。
通常,Cube-Map reflection主要用于角色选择窗口。
在实际游戏中,通过仅选择视觉上不明显的部分来删除命令,并制作一个Shader for LOD MATERIAL。当前尽量不把Sub shader划分为多个。

It is a good idea to develop prototypes with simple textures so that the art team knows their implementation intent.

At this point, I discussed further with the art team to discuss how to improve the pupil lighting process and to continue to develop.

Normally Cube-Map reflection is only used in the character selection window.

In real gameplay, we’ll only remove parts that aren’t visually obvious and remove commands and create another shader for LOD MATERIAL.We are not dividing the currently available Sub shader into several.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s