Content and Context 内容和上下文
本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://docs.unity3d.com/Manual/StandardShaderContextAndContent.html
When thinking about lighting in Unity, it is handy to divide the concepts into what we call the content the item being lit and rendered, and the context, which is the lighting that exists in the scene which affects the object being lit.
当我们在Unity中考虑光照的时候,很容易将概念划分为被照明和渲染的内容,以及上下文:即存在于场景中的影响被照明对象的灯光。
The Context 上下文
When lighting an object it is important to understand which sources of light are affecting the object. There are usually direct light sources in your scene: Game Object lights that you may have placed around your scene. There are also indirect light sources such as reflections and bounced light. These all have an effect on the object’s material to give the final result that the camera sees across the surface of the object.
当照明一个物体时,重要的是要了解哪些光源在影响这个物体。在你的场景中通常有直接光源:可能在场景周围放置的光源游戏对象。也有间接光源,如反射和反弹光照。所有这些都会对物体的材质产生影响,从而使摄像机能看到物体表面的最终效果。
This is not a hard and fast separation, often what might be considered “content” could also be the part of the lighting context for another object.
这并不是可以快速分离的,通常被认为是“内容”的也可能是另一个对象的光照上下文。
A good example of this would be a building situated in a desert landscape. The building would take light information from the skybox, and perhaps bounced light from the surrounding ground.
一个很好的例子是坐落在沙漠景观中的建筑。建筑将从空中接收光照信息,可能还会从周围的地面反弹光照。
However there may be a character standing near an exterior wall of the building. For this character, the building is part of the lighting context - it may