Content and Context 内容和上下文 Standard Shader系列2

本文深入解析Unity中的Content(内容)和Context(上下文)在光照中的应用,涵盖天空盒、全局光照、反射探头、标准着色器及材质编辑器等内容,帮助理解对象如何受场景光照影响并呈现最终效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 be casting a shado

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值