Simple Lit Shader

当性能比写实更重要时,使用这个着色器。这个着色器使用一个简单的近似的照明。因为这个着色器不计算物理正确性和能量守恒,它渲染迅速。

Using the Simple Lit Shader in the Editor

选择和使用这个着色器:

  1. 在你的项目中,创建或找到你想使用着色器的材质。选择材质。这时会打开一个材质检查窗口。
  2. 点击着色器,选择Universal Render Pipeline > Simple Lit

UI overview

这个着色器的检查器窗口包含以下元素:

  • Surface Options
  • Surface Inputs
  • Advanced

Surface Options

Surface选项控制URP如何在屏幕上渲染材质。

Property Description
Surface Type

Use this drop-down to apply an Opaque or Transparent surface type to the Material. This determines which render pass URP renders the material in. Opaque surface types are always fully visible, regardless of what’s behind them. URP renders opaque Materials first. Transparent surface types are affected by their background, and they can vary according to which type of transparent surface type you choose. URP renders transparent Materials in a separate pass after opaque objects. If you select Transparent, the Blending Mode drop-down appears.

使用此下拉菜单为材质应用不透明或透明的表面类型。这决定了URP的渲染路径。不透明的表面类型总是完全可见的,不管它们背后是什么。URP首先渲染不透明的材料。透明表面类型受其背景的影响,它们可以根据您选择的透明表面类型的类型而变化。URP在不透明对象之后单独渲染透明材质。如果你选择透明,混合模式下拉菜单就会出现。

Blending Mode

Use this drop-down to determine how URP calculates the color of each pixel of the transparent Material by blending the Material with the background pixels.
Alpha uses the Material’s alpha value to change how transparent an object is. 0 is fully transparent. 1 appears fully opaque, but the Material is still rendered during the Transparent render pass. This is useful for visuals that you want to be fully visible but to also fade over time, like clouds.
Premultiply applies a similar effect to the Material as Alpha, but preserves reflections and highlights, even when your surface is transparent. This means that only the reflected light is visible. For example, imagine transparent glass.
Additive adds an extra layer to the Material, on top of another surface. This is good for holograms. 
Multiply multiplies the color of the Material with the color behind the surface. This creates a darker effect, like when you look through colored glass.

使用这个下拉列表来确定URP如何通过混合材质和背景像素来计算透明材质的每个像素的颜色。

Alpha使用材质的Alpha值来改变物体的透明度。0是完全透明的。1显示完全不透明,但是在透明渲染过程中材质仍然被渲染。这对于那些你想要完全可见但又想要随着时间逐渐消失的图像,比如云,是很有用的。

Premultiply 在材质上应用了类似Alpha的效果,但是保留了反射和高光,即使你的表面是透明的。这意味着只有反射光是可见的。例如,想象一下透明的玻璃。

在材料的另一个表面上增加一个额外的层。这对全息图很有用。

Multiply 将材料的颜色与表面后面的颜色进行叠加。这会产生一种更暗的效果,就像你透过彩色玻璃看东西一样。

Render Face

Use this drop-down to determine which sides of your geometry to render.
Front Face renders the front face of your geometry and culls the back face. This is the default setting. 
Back Face renders the front face of your geometry and culls the front face. 
Both makes URP render both faces of the geometry. This is good for small, flat objects, like leaves, where you might want both sides visible.

使用这个下拉菜单来确定要渲染几何图形的哪一面。

Front Face 渲染几何图形的前面并剔除后面。这是默认设置。

Back Face 渲染几何图形的前面并剔除前面。

Both 两者都使URP渲染几何图形的两面。这对小而扁平的物体很有用,比如叶子,你可能想让它的两边都可见。

Alpha Clipping

Makes your Material act like a Cutout Shader. Use this to create a transparent effect with hard edges between the opaque and transparent areas. For example, to create blades of grass. To achieve this effect, URP does not render alpha values below the specified Threshold, which appears when you enable Alpha Clipping. You can set the Threshold by moving the slider, which accepts values from 0 to 1. All values above your threshold are fully opaque, and all values below your threshold are invisible. For example, a threshold of 0.1 means that URP doesn't render alpha values below 0.1. The default value is 0.5.

使你的材质表现得像一个剪切着色器。使用这个在不透明和透明区域之间创建一个有硬边的透明效果。例如,创建草的叶片。为了实现此效果,URP不渲染低于指定阈值的alpha值,阈值在启用alpha剪切时出现。您可以通过移动滑块来设置阈值,滑块接受从0到1的值。阈值以上的所有值都是不透明的,而阈值以下的所有值都是不可见的。例如,阈值为0.1意味着URP不渲染低于0.1的alpha值。默认值是0.5。

Surface Inputs

表面输入描述了表面本身。例如,您可以使用这些属性使您的表面看起来湿、干、粗糙或光滑。

Property Description
Base Map

Adds color to the surface, also known as the diffuse map. To assign a Texture to the Base Map setting, click the object picker next to it. This opens the Asset Browser, where you can select from the Textures in your Project. Alternatively, you can use the color picker. The color next to the setting shows the tint on top of your assigned Texture. To assign another tint, you can click this color swatch. If you select Transparent or Alpha Clipping under Surface Options, your Material uses the Texture’s alpha channel or color.

为表面添加颜色,也称为漫反射贴图。要为基础贴图设置分配纹理,请单击它旁边的对象选择器。这会打开资产浏览器,在那里你可以从你的项目的纹理中选择。或者,您可以使用颜色选择器。设置旁边的颜色显示了你分配的纹理上的色彩。要指定另一种色调,可以单击这个色板。如果你在表面选项下选择透明或Alpha剪裁,你的材质会使用纹理的Alpha通道或颜色。

Specular Map

Controls the color of your specular highlights from direct lighting, for example Directional, Point, and Spot lights. To assign a Texture to the Specular Map setting, click the object picker next to it. This opens the Asset Browser, where you can select from the textures in your Project. Alternatively, you can use the color picker. 
In Source, you can select a Texture in your Project to act as a source for the smoothness. By default, the source is the Alpha channel for this Texture. 
You can use the Smoothness slider to control the spread of highlights on the surface. 0 gives a wide, rough highlight. 1 gives a small, sharp highlight like glass. Values in between produce semi-glossy looks. For example, 0.5 produces a plastic-like glossiness.

从直接照明控制您的高光的颜色,例如方向灯,点,和聚光灯。要为高光贴图设置一个纹理,点击它旁边的对象选择器。这会打开资产浏览器,在那里你可以从你的项目的纹理中选择。或者,您可以使用颜色选择器。

在Source中,您可以在项目中选择一个纹理作为平滑度的源。默认情况下,源是这个纹理的Alpha通道。

您可以使用平滑滑块来控制表面上高光的扩展。0给出了粗浅的高光。1给出一个小的,尖锐的高光像玻璃。介于两者之间的值会产生半光滑的外观。例如,0.5可以产生类似塑料的光泽度。

Normal Map

Adds a normal map to the surface. With a normal map, you can add surface details like bumps, scratches and grooves. To add the map, click the object picker next to it. The normal map picks up ambient lighting in the environment. 
The float value next to the setting is a multiplier for the effect of the Normal Map. Low values decrease the effect of the normal map. High values create stronger effects.

向表面添加法线贴图。使用法线贴图,您可以添加表面细节,如凹凸、划痕和凹槽。要添加贴图,单击它旁边的对象选择器。法线贴图拾取环境中的光线。
该设置旁边的浮点值是法线贴图效果的乘数。低值会降低法线贴图的效果。价值越高,效果越强。

Emission

Makes the surface look like it emits lights. When enabled, the Emission Map and Emission Color settings appear.
To assign an Emission Map, click the object picture next to it. This opens the Asset Browser, where you can select from the textures in your Project.
For Emission Color, you can use the color picker to assign a tint on top of the color. This can be more than 100% white, which is useful for effects like lava, that shines brighter than white while still being another color.
If you have not assigned an Emission Map, the Emission setting only uses the tint you’ve assigned in Emission Color.
If you do not enable Emission, URP sets the emission to black and does not calculate emission.

使表面看起来像在发光。启用后,Emission Map自发光贴图和Emission Color 自发光颜色设置就会出现。

若要分配自发光贴图,请单击它旁边的对象图片。这会打开资产浏览器,在那里你可以从你的项目的纹理中选择。

对于自发光颜色,您可以使用颜色选择器在颜色的顶部分配一个色调。这可以是超过100%的白色,这对效果很有用,如熔岩,闪耀比白色更明亮,但仍然是另一种颜色。

如果您没有分配一个自发光贴图,发光设置只使用您在自发光颜色中分配的着色。

如果不启用自发光,URP将自发光设置为黑色,并且不计算自发光。

Tiling

A 2D multiplier value that scales the Texture to fit across a mesh according to the U and V axes. This is good for surfaces like floors and walls. The default value is 1, which means no scaling. Set a higher value to make the Texture repeat across your mesh. Set a lower value to stretch the Texture. Try different values until you reach your desired effect.

一个2D倍增值,根据U和V轴缩放纹理以适应网格。对地板和墙壁这样的表面很好。默认值是1,这意味着没有缩放。设置一个更高的值使纹理在你的网格上重复。设置一个较低的值来拉伸纹理。尝试不同的值,直到达到你想要的效果。

Offset

The 2D offset that positions the Texture on the mesh. To adjust the position on your mesh, move the Texture across the U or V axes.

在网格上定位纹理的2D偏移量。为了调整网格的位置,在U轴或V轴上移动纹理。

Advanced

高级设置会影响渲染的底层计算。它们对你的表面没有明显的影响。

roperty Description
Enable GPU Instancing

Makes URP render meshes with the same geometry and Material in one batch, when possible. This makes rendering faster. URP cannot render Meshes in one batch if they have different Materials or if the hardware does not support GPU instancing.

如果可能的话使URP渲染网格与相同的几何和材料在一批。这使得渲染速度更快。如果网格有不同的材质或者硬件不支持GPU实例化,URP不能在一批中渲染网格。

Priority

Use this slider to determine the chronological rendering order for a Material. URP renders Materials with higher values first. You can use this to reduce overdraw on devices by making the pipeline render Materials in front of other Materials first, so it doesn't have to render overlapping areas twice. This works similarly to the render queue in the built-in Unity render pipeline.

使用这个滑块来决定材质的渲染顺序。URP首先渲染较高值的材质。您可以使用它来减少设备上的过度渲染,方法是让管线首先在其他材质之前渲染材质,这样它就不需要渲染两次重叠的区域。这类似于内置的Unity渲染管道中的渲染队列。

URP——着色器和材质——简单光照 Simple Lit相关推荐

  1. URP——着色器和材质——复杂光照Complex Lit

    Complex Lit Shader 复杂的灯光着色器包含了灯光着色器的所有功能,并添加了高级的材质特性.一些特性在这个着色器可能是相当多的资源密集型和需要Unity Shader Model 4.5 ...

  2. URP——着色器和材质——烘焙光照 Baked Lit

    Baked Lit Shader 在通用渲染管道(URP)中,对于只需要通过光照贴图和光照探测烘烤的游戏或应用程序使用此着色器.这个着色器不使用基于物理的阴影和没有实时照明,所以所有实时相关的着色器关 ...

  3. URP——着色器和材质——灯光着色器 Lit

    Lit Shader 灯光着色器让你渲染真实世界的表面像石头,木材,玻璃,塑料,金属在照片现实的质量.您的光等级和反射看起来栩栩如生,并在各种光照条件下反应正确,例如明亮的阳光,或一个黑暗的洞穴.这个 ...

  4. unity关于纹理、着色器和材质的介绍

    图形资源可以分解为纹理.着色器和材质.纹理和着色器应用于材质,然后把材质应用于模型. 纹理(Texture):应用于3D对象的平面图像,使模型变得色彩斑斓,而不是只有形状. 创建一个复杂模型时,常用展 ...

  5. unity地面添加材质球_为Unity3D创建素材(1):图片、着色器、材质球

    图片 Unity3D支持使用大部分位图格式作为图片素材,甚至包括带图层和图层效果的.psd格式文件. 但在实际使用中,并不推荐直接使用非通用的文件格式.这是因为对于任何格式的图片素材,Unity3D在 ...

  6. unity标准着色器入门-材质参数(二)

    金属模式:金属参数 当在金属工作流(不同于镜面工作流)下工作时,表面的反射成都和光照反应由金属性级别和平滑度级别来修改. 当使用这个工作流时,镜面反射仍然被生成:但依赖于给予Metallic和Smoo ...

  7. unity标准着色器入门-材质参数(一)

    材质参数 标准着色器展示了材质参数的列表.取决于你是否已经选择在金属工作流模式或者镜面工作流模式,这些参数会有轻微地变化.大部分参数在两种模式下是一样的,材质参数系列将覆盖两种模式的所有参数. 这些参 ...

  8. Blender着色器纹理材质创作教程含源文件 Shader Forge

    本Blender视频课程是一个正在进行的关于为Cycles渲染引擎构建材质(着色器)的系列.只要有足够的时间和努力,物质性就能给CG场景注入这样的生命. 本课程是一个正在进行的关于为Cycles渲染引 ...

  9. Three.js-着色器加工材质及材质着色器详解

    在Three中,我们可以使用着色器对材质进行加工,例如在对物体材质进行设置时,我们可以通过对顶点着色器的更改,从而实现物体的运动或变化.使用着色器加工材质,主要依赖于Material材质基类中的onB ...

最新文章

  1. UVa11205 The Broken Pedometer
  2. smartfoxserver扩展里面过滤聊天的不合法字符
  3. antlr 4.7.1_新ANTLR 4.6的重要更改
  4. docker 仓库镜像 替换_Docker私有仓库 Registry中的镜像管理
  5. DBASK问答集萃第二期
  6. 熊猫python小课靠谱吗_新的投资风向标在哪里?
  7. php的curl封装类
  8. 基于WebSocket的网页聊天室
  9. 我的世界服务器物品代码,我的世界指令代码大全 2021通用指令代码汇总[多图]...
  10. 第14节 三个败家子(14)——在辉煌中走向深渊
  11. 1688-cat_get - 获得1688商品分类
  12. “搜索大战”正式打响,微软发布ChatGPT版搜索引擎和浏览器
  13. 计算机文化基础形考作业,(精华版)国家开放大学电大专科《计算机文化基础》网络课形考任务6作业及答案(2页)-原创力文档...
  14. 为什么说人生低谷期是最好的增值期?
  15. 如何彻底卸载Oracle数据库
  16. 看完让你彻底理解 WebSocket 原理
  17. Python求50以内能被7整除,但不能同时被5整除的所有整数...
  18. 【Pytorch】SGDR
  19. 专利11:专利费用与代理机构
  20. 一维与二维向量vector的使用

热门文章

  1. 数据分析模型篇—PEST分析
  2. Dirty Approach之无招胜有招
  3. 全开源办公开发平台——手机移动端APP功能简介
  4. matlab打包训练好的神经网络(BP神经网络)
  5. java开发工程师报名费多少_java开发工程师薪水有多少
  6. python的学习笔记案例1--汇率兑换4.0
  7. 杀病毒软件和防火墙区别
  8. ESP32编译自己的micropython固件以支持OV2640、SPIRAM、bluetooth等完整功能
  9. 小米手环硬件构成及原理图
  10. 2020 年了,微信公众号还有前途吗?