Chromatic Aberration 色差
本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.4版本
参考链接:https://github.com/Unity-Technologies/PostProcessing/wiki/Chromatic-Aberration
In photography, chromatic aberration is an effect resulting from a camera’s lens failing to converge all colors to the same point. It appears as “fringes” of color along boundaries that separate dark and bright parts of the image.
在摄影中,色差是由于照相机的镜头不能将所有的颜色汇聚到同一点而产生的一种效应。它以颜色的“条纹”的形式把图像分隔出暗部和亮部的边界。
The Chromatic Aberration effect is used to replicate this camera defect, it is also often used to artistic effect such as part of camera impact or intoxication effects. This implementation provides support for red/blue and green/purple fringing as well as user defined color fringing via an input texture.
色差效应是用来重现这一相机缺陷的,它也经常用于艺术效果,如部分相机的撞击或陶醉效果。该实现支持红/蓝、绿/紫边以及用户通过输入纹理定义的颜色条。
Properties
Property | Function |
---|---|
Spectral Lut | Texture used for custom fringing color (will use default when empty). |
光谱查找表 | 用于自定义颜色条纹理(将使用默认时为空)。 |
Intensity | Strength of chromatic aberrations. |
强度 | 色差强度 |
Fast Mode | Use a faster variant of the effect for improved performances. |
快速 | 使用一个更快的变体的效果,以提高性能。 |
Details
Chromatic Aberration uses a Spectral Lut input for custom fringing. Four example spectral textures are provided in the repository:
色差使用光谱查找表(可自定义颜色条)。库中提供了四个光谱纹理示例:
- Red/Blue (Default)
- Blue/Red
- Green/Purple
- Purple/Green
You can create custom spectral textures in any image editing software. Their resolution is not constrained but it is recommended that they are as small as possible (such as the 3x1 textures provided).
您可以在任何图像编辑软件中创建自定义的光谱纹理。它们的分辨率不受限制,但建议尽可能小(如提供的3x1纹理)。
You can achieve a less smooth effect by manually setting the Filter Mode of the input texture to Point (no filter).
您可以通过手动将输入纹理的过滤模式设置为Point(no filter)来获得不太平滑的效果。
Performances
Performances depend on the Intensity value (the higher it is, the slower the render will be as it will need more samples to render smooth chromatic aberrations).
性能取决于强度值(它越高,渲染就会越慢,因为它需要更多的样本来渲染平滑的色差)。
Enabling Fast Mode is also recommended whenever possible as it’s a lot faster, albeit not as smooth as the regular mode.
如果可能,也建议启用快速模式,因为它要快得多,尽管不如常规模式平滑。
Requirements
- Shader Model 3
See the Graphics Hardware Capabilities and Emulation page for further details and a list of compliant hardware.