Bloom 辉光 后期处理系列2

Bloom 辉光

本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://github.com/Unity-Technologies/PostProcessing/wiki/Bloom

Bloom is an effect used to reproduce an imaging artifact of real-world cameras. The effect produces fringes of light extending from the borders of bright areas in an image, contributing to the illusion of an extremely bright light overwhelming the camera or eye capturing the scene.
Bloom是一种用于再现仿造真实世界中摄像机的成像的效果。这种效果会从图像中明亮区域的边缘延伸出光线的条纹,造成一种极其明亮的光线导致相机或眼睛捕捉场景的错觉。

Lens Dirt applies a fullscreen layer of smudges or dust to diffract the Bloom effect. This is commonly used in modern first person shooters.
镜头污浊 应用全屏污迹或灰尘衍射辉光效果。这在现代第一人称射击游戏中很常见。
Bloom 辉光 后期处理系列2_第1张图片
Bloom 辉光 后期处理系列2_第2张图片

Properties

Bloom settings:

Property Function
Intensity Strength of the Bloom filter.
强度 辉光过滤的强度 float intensity = RuntimeUtilities.Exp2(settings.intensity.value / 10f) - 1f; color *= intensity;
Threshold Filters out pixels under this level of brightness. This value is expressed in gamma-space.
阈值 滤除此亮度下的像素。这个值用gamma空间表示。
Soft Knee Makes transition between under/over-threshold gradual (0 = hard threshold, 1 = soft threshold).
软拐点 使低于/超过阈值之间的逐渐过渡程度(0 =硬阈值,1 =软阈值)。 float knee = Threshold * softKnee; var threshold = new Vector4(Threshold, Threshold - knee, knee * 2f, 0.25f / knee);
Clamp Clamps pixels to control the bloom amount. This value is expressed in gamma-space.
夹取 夹取像素值以控制辉光影响数量。这个值用gamma空间表示。color = min(Clamp, color);
Diffusion Changes extent of veiling effects in a screen resolution-independent fashion.
扩散 以独立于屏幕分辨率的方式更改辉光效果影响的范围。float logs = Mathf.Log(screen, 2f) + Mathf.Min(Diffusion, 10f) - 10f;
Anamorphic Ratio Emulates the effect of an anamorphic lens by scaling the bloom vertically (in range [-1,0]) or horizontally (in range [0,1]).
变形的比率 通过垂直缩放bloom(范围[-1,0])或水平缩放bloom(范围[0,1])来模拟变形透镜的效果。float rw = ratio < 0 ? -ratio : 0f; int tw = Mathf.FloorToInt(context.screenWidth / (2f - rw));
Color Tint of the Bloom filter.
Fast Mode Boost performances by lowering the effect quality.
快速模式 通过降低效果质量来提高性能。DownsampleBox13Tap ->DownsampleBox4Tap

Dirtiness settings:

Property Function
Texture Dirtiness texture to add smudges or dust to the lens.
贴图 脏纹理给镜头增加污迹或灰尘。
Intensity Amount of lens dirtiness.

Details

With properly exposed HDR scenes, Threshold should be set to ~1 so that only pixels with values above 1 leak into surrounding objects. You’ll probably want to drop this value when working in LDR or the effect won’t be visible.
对于适当曝光的HDR场景,阈值应该设置为1,这样只有值大于1的像素才会泄漏到周围的对象中。在使用LDR时,您可能希望下降该值,否则效果将不可见。

Performances

Lowering the Diffusion parameter will make the effect faster. The further away Anamorphic Ratio is from 0, the slower it will be. On mobile and low-end platforms it is recommended to enable Fast Mode as it gives a significant boost in performances.
降低扩散参数会使效果更快。变形比离0越远,速度越慢。在移动和低端平台上,建议启用快速模式,因为它可以显著提高性能。

Finally, smaller lens dirt textures will result is faster lookup and blending across volumes.
最后,较小的镜头污垢纹理将导致更快的查找和混合。

Requirements
Shader model 3

你可能感兴趣的:(Post,Process,Post,Process,Stack,PPS,后期处理,Unity,Graphics,官方文档,翻译)