首页 技术 正文
技术 2022年11月14日
0 收藏 318 点赞 4,904 浏览 2336 个字

 

Choosing a Color Space 选择色彩空间

In addition to selecting a rendering path, it’s important to choose a ‘Color Space’ before lighting your project. Color Space determines the maths used by Unity when mixing colors in lighting calculations or reading values from textures. This can have a drastic effect on the realism of your game, but in many cases the decision over which Color Space to use will likely be forced by the hardware limitations of your target platform.

除了选择渲染路径之外,在项目构建光照之前选择“色彩空间”也很重要。色彩空间决定了Unity在照明计算中混合颜色或从纹理读取值时使用的数学运算。这可能会对游戏的真实性产生严重影响,但在许多情况下,决定使用哪种色彩空间可能会受到目标平台硬件限制的限制

Linear Color Space 线性色彩空间

The preferred Color Space for realistic rendering is Linear. This can be selected using the ‘Color Space’ property from (Edit>Project Settings>Player).

实际渲染的首选色彩空间是线性。这可以使用(编辑>项目设置>播放器)中的“色彩空间”属性进行选择。

A significant advantage of using Linear space is that the colors supplied to shaders within your scene will brighten linearly as light intensities increase. With the alternative, ‘Gamma’ Color Space, brightness will quickly begin to turn to white as values go up, which is detrimental to image quality.

使用线性空间的一个显着优点是,随着光强度的增加,提供给场景中着色器的颜色将呈线性增亮。使用替代方法’Gamma’色彩空间,随着数值的增加,亮度将快速变为白色,这对图像质量不利。

Unity Lighting – Choosing a Color Space 选择色彩空间(四)Image comparing objects lit using Linear and Gamma Color Space. Notice how colors quickly turn to white as light intensities increase using the Gamma Color Space.

上图比较使用线性和伽玛色彩空间照亮的对象。请注意,使用Gamma颜色空间增加光强度时颜色会快速变为白色。

Another main benefit of Linear is that shaders can also sample textures without Gamma (midtone) compensation. This helps to ensure that color values remain consistent throughout their journey through the render pipeline. The result is increased accuracy in color calculations with improved overall realism in the eventual screen output.

Linear的另一个主要优势是着色器也可以在没有Gamma(中间色调)补偿的情况下对纹理进行采样。这有助于确保颜色值在贯穿渲染管道的整个旅程中保持一致。其结果是提高了颜色计算的准确性,并改善了最终屏幕输出的整体真实性。

Gamma Color Space Gamma色彩空间

Unfortunately Linear Color Space is not supported by some mobile hardware and even certain games consoles. In these instances, Gamma must be used instead. Linear is currently supported on PC, newer mobile hardware and current generation consoles.

不幸的是,一些移动硬件甚至某些游戏控制台不支持线性色彩空间。在这些情况下,必须使用Gamma。 Linear目前支持PC,更新的移动硬件和当代游戏控制台。

It’s important to confirm that your target platform supports your selected Color Space before proceeding.

在继续之前,确认您的目标平台支持您选择的色彩空间很重要。

For more information on Color Space please see the documentation here.有关Color Space的更多信息,请参阅此处的文档。

来源: https://unity3d.com/cn/learn/tutorials/topics/graphics/choosing-color-space?playlist=17102

<wiz_tmp_tag id=”wiz-table-range-border” contenteditable=”false” style=”display: none;”>

 

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,031
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,520
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,368
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,148
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,781
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,860