{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Unity 3D ShaderLab开发实战详解

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Unity 3D ShaderLab开发实战详解

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Content Description

《Unity 3D ShaderLab开发实战详解》全面讲解了Unity Shader渲染的实战技术,全书分为五篇共33章,主要内容为:Shader在3D游戏中的作用、Shader的实例化、Shader的实现语言等;Unity中Shader的形态、SubShader的重要标签、可编程Shader、Surface Shader;Shader中用到的各种空间的概念和Shader中的投影矩阵;基本的光照模型;第一个被执行的Pass,包括渲染路径和Pass的LightMode标签;VertexLit渲染路径,包括顶点照明和Unity存放光源的方式;Forward渲染路径;基于光照贴图的烘焙照明;基于LightProbes的照明;平面阴影;球体阴影;体积阴影;映射阴影;内置的阴影;Pass的通用指令开关;固定管线;Surface Shader;凹凸材质;卡通材质;镜面材质;半透明材质;体积雾;Wrap Model新解;面积光;体积光;材质替代渲染;后期效果;地形;投影;Shader的组织和复用。和你必须知道的渲染概念及基于渲染路径的优化、移动平台上的优化等实战内容,是不可多得的实战教程。
《Unity 3D ShaderLab开发实战详解》适合移动开发者、游戏开发者、程序员阅读,可作为大专院校相关专业的师生用书,也可当作培训学校的教材。
Catalogue

目 录

第1篇 初识庐山真面目——Unity 3D Shader

第1章 Shader(着色器)的概念和在3D游戏中的作用2
1.1 Shader的概念2
1.1.1 虚拟世界中的光明和色彩2
1.1.2 游戏开发人员的终点2
1.1.3 Shader(着色器)简史2
1.2 Shader的实例化3
1.3 Shader的实现语言3
1.3.1 GPU上的编程3
1.3.2 Unity中的着色器编程3

第2章 Unity中Shader(着色器)的形态4
2.1 Unity通过ShaderLab来组织Shader4
2.1.1 关键字Shader4
2.1.2 使用SubShader组织Shader的不同实现4
2.1.3 SubShader的重要标签4
2.1.4 SubShader中的Pass块5
2.1.5 Pass块的标签及其名字的意义5
2.1.6 使用FallBack保证Shader的广泛适应性6
2.2 Unity的ShaderLab所支持的Shader编程语言6
2.3 Unity中Shader的3种形态6
2.3.1 固定管线6
2.3.2 可编程Shader7
2.3.3 ShaderLab的骄傲:Surface Shader8
2.4 Shader的数据接口:属性和uniform变量8
2.4.1 在Properties块中定义属性8
2.4.2 通过图形界面操作属性9
2.4.3 通过脚本操控属性9
2.4.4 矩阵:不能在属性块定义的变量10
2.4.5 在Cg代码中使用属性10

第3章 Shader(着色器)中用到的各种空间概念11
3.1 模型空间11
3.1.1 为什么用模型空间11
3.1.2 在脚本和Shader中进出模型空间11
3.2 世界坐标空间11
3.2.1 统一表达:世界坐标空间11
3.2.2 在脚本和Shader中进出世界坐标空间12
3.3 视空间12
3.3.1 渲染的需要:视空间12
3.3.2 在脚本和Shader中进出视空间12
3.4 空间的一块:视锥体12
3.5 剪切空间13
3.5.1 投影13
3.5.2 脚本和Shader中的投影矩阵13

第4章 基本的光照模型14
4.1 光源对物体照明的分类14
4.1.1 间接照明14
4.1.2 直接照明14
4.2 照明的计算方式:光照模型14
4.2.1 漫反射和Lambert14
4.2.2 镜面高光和Phong15
4.2.3 半角向量和BlinnPhong16

第2篇 让你的应用更炫彩——Unity中的照明

第5章 第一个被执行的Pass18
5.1 不同的LightMode被选择的顺序18
5.1.1 渲染路径和Pass的LightMode标签18
5.1.2 设计可以检测渲染路径的材质18
5.1.3 设计便于检测渲染路径的场景21
5.1.4 VertexLit渲染路径下Pass的执行21
5.1.5 Forward渲染路径下Pass的执行21
5.1.6 Deferred渲染路径下Pass的执行21
5.1.7 不同渲染路径下的Pass执行规则总结22
5.2 3个渲染路径之外22
5.2.1 LightMode的其他值22
5.2.2 设计检测用的材质23
5.2.3 Always类型的Pass在3种渲染路径下的执行24
5.2.4 LightMode的默认值及其在3种渲染路径下的执行25

第6章 VertexLit渲染路径26
6.1 顶点照明26
6.1.1 什么是顶点照明26
6.1.2 存取光源的变量26
6.2 顶点照明和Unity存放光源的第一种方式27
6.2.1 用于调试输出的材质27
6.2.2 设计用于检测的场景27
6.2.3 在Vertex Pass中的检测结果28
6.2.4 无效数据28
6.3 顶点照明和Unity存放光源的第二种方式29
6.3.1 用于调试输出的材质29
6.3.2 设计用于检测的场景30
6.3.3 在Vertex Pass中的检测结果30
6.4 顶点照明和Unity存放光源的第三种方式31
6.4.1 Unity为Vertex Pass准备的光源31
6.4.2 设计用于检测的场景31
6.4.3 顶点照明中的点光源32
6.4.4 计算顶点照明的ShadeVertexLights函数32
6.4.5 顶点照明中的Pixel光源33
6.4.6 顶点照明中的平行光33
6.4.7 顶点照明中的灯光信息小结35
6.4.8 一个顶点照明的实现例子35

第7章 Forward渲染路径37
7.1 ForwardBase和ForwardAdd37
7.1.1 设计检测用的场景和材质37
7.1.2 ForwardBase和ForwardAdd的表现39
7.2 Forward渲染路径下的重要光源39
7.2.1 设计检测用的材质39
7.2.2 不存在Pixel光源时的情况40
7.2.3 存在Pixel平行光时的情况40
7.2.4 存在Pixel点光源时的情况40
7.2.5 有多种类型的Pixel光源时的情况41
7.2.6 Forward渲染路径下的Pixel光源小结41
7.3 重要光源在ForwardAdd内的执行41
7.3.1 设计用来检测Pixel光源的材质41
7.3.2 设计检测用的场景44
7.3.3 检测结果:ForwardAdd如何被执行44
7.4 ForwardBase和Unity存放光源的第一种方式45
7.4.1 设计检测用的材质45
7.4.2 第一种方式内的Vertex点光源46
7.4.3 第一种方式内的平行光46
7.4.4 第一种方式内的重要Pixel点光源46
7.4.5 只有ForwardBase时的情况总结47
7.4.6 ForwardAdd对ForwardBase内光源的影响47
7.4.7 有ForwardAdd时存放光源数据第一种方式的总结49
7.5 ForwardAdd和Unity存放光源的第一种方式49
7.5.1 设计检测用的材质49
7.5.2 设计检测用的场景50
7.5.3 ForwardAdd内的Pixel光源50
7.5.4 ForwardAdd内的平行光51
7.5.5 数组变量unity_4LightPos的使用情况分析51
7.6 Forward渲染路径和Unity存放光源的第三种方式51
7.6.1 检测ForwardBase内情况的材质51
7.6.2 检测结果:第三种方式不包含对ForwardBase有效的数据52
7.6.3 检测结果:第三种方式不包含对ForwardAdd有效的数据52
7.7 Forward渲染路径总结53
7.7.1 Forward渲染路径下材质的适应性53
7.7.2 Unity如何为Forward渲染路径设置光源53

第8章 基于光照贴图的烘焙照明54
8.1 单光照贴图和VertexLit渲染路径54
8.1.1 测试烘焙的场景54
8.1.2 烘焙场景中使用的材质55
8.1.3 烘焙的前提:静态物体55
8.1.4 如何在烘焙中使用自发光材质55
8.1.5 烘焙之后静态物体和非静态物体的实时照明57
8.1.6 应用光照贴图到VertexLit渲染路径下的材质中57
8.1.7 通过自己的材质改变实时光源对烘焙后物体的照明59
8.2 在效果和性能间进行权衡60
8.2.1 影响全局的Resolution选项60
8.2.2 影响单个物体的Scale In Lightmap选项61
8.3 单光照贴图和Forward渲染路径62
8.3.1 单光照贴图在VertexLit和Forward下面的不同表现62
8.3.2 准备可应用于烘焙的自发光材质62
8.3.3 在ForwardBase内计算光照贴图64
8.3.4 Forward渲染路径下烘焙之后的实时照明65
8.4 单光照贴图在Deferred渲染路径下的实时阴影67
8.5 双光照贴图和Deferred渲染路径67
8.5.1 全局GI、间接照明以及双光照贴图67
8.5.2 混合双光照贴图和实时照明67
8.5.3 观察混合过程69
8.5.4 双光照贴图的使用限制70
8.6 双光照贴图和Forward渲染路径71
8.7 方向光照贴图和Forward渲染路径71
8.7.1 烘焙后的凹凸问题71
8.7.2 方向光照贴图(Direction Lightmaps)和凹凸贴图72

第9章 基于LightProbes的照明74
9.1 初识LightProbes74
9.1.1 LightProbes照明的优点74
9.1.2 检测LightProbes照明的场景74
9.1.3 使用Light Probe Group进行管理76
9.1.4 烘焙场景光照信息到LightProbes中76
9.1.5 对比Light Probes照明和实时照明77
9.2 放置LightProbes的注意事项77
9.2.1 必须形成一个体积77
9.2.2 单个Light Probe必须处于采样光源的照射范围77
9.3 动态更新LightProbes78
9.3.1 跟新数据的注意事项78
9.3.2 更改不同通道的Coefficient78
9.4 照明采样的Archor Override79
9.4.1 基于线性插值的采样79
9.4.2 改变默认的插值位置79
9.5 LightProbes照明和阴影80
9.5.1 LightProbes和光照贴图的异同80
9.5.2 烘焙阴影时可能会犯的错误80
9.5.3 将静态物体的阴影烘焙到Light Probe上81
9.5.4 LightProbes照明和实时阴影的混合82
9.6 烘焙一个色彩丰富的场景82
9.7 在自己的材质中使用LightProbes83
9.7.1 为Forward渲染路径的材质计算LightProbes84
9.7.2 使用ShadeSH9函数84
9.7.3 在一个Surface Shader中进行计算85

第3篇 使应用更逼真——Shadows(阴影)

第10章 平面阴影88
10.1 平行光对平面的投影88
10.1.1 对平行光投影的考虑88
10.1.2 进出阴影接受平面的矩阵88
10.1.3 使用三角形相似计算阴影89
10.2 点光源对平面的投影90
10.3 阴影的淡出91
10.3.1 有效利用计算平面阴影过程中的数据91
10.3.2 潜在的问题91

第11章 球体阴影92
11.1 平行光对球体的投影92
11.1.1 投影球体的信息92
11.1.2 使用相似三角形计算投影92
11.2 阴影的淡入/淡出93
11.3 点光源对球体的投影94

第12章 体积阴影95
12.1 将顶点沿某一方向挤出95
12.1.1 在Vertex函数中操作95
12.1.2 判断顶点是向光还是背光95
12.2 从Volumes中找到阴影区域96
12.2.1 两次挤出96
12.2.2 计算出阴影区域97
12.2.3 渲染阴影97
12.2.4 需要注意的问题98

第13章 阴影映射99
13.1 灯光空间和相机空间99
13.1.1 观察两个空间99
13.1.2 两个视角的Z深度99
13.1.3 渲染Z深度的材质99
13.2 投射Z深度100
13.2.1 准备灯光视角的投影矩阵100
13.2.2 在材质中计算投影后的Z深度101
13.3 比较Z深度103
13.3.1 比较Z深度的材质103
13.3.2 Z精度引起的问题104
13.3.3 增加Z的精度104
13.3.4 对Z值进行偏移105

第14章 内置的阴影107
14.1 投射阴影107
14.1.1 使用ShadowCaster投射阴影107
14.1.2 ShadowCaster里都做了什么108
14.1.3 写一个自己的ShadowCaster108
14.1.4 改变ShadowCaster的行为109
14.1.5 阴影和FallBack机制110
14.2 接受阴影111
14.3 Surface Shader和阴影112
14.3.1 Surface Shader的阴影和Fallback112
14.3.2 Surface Shader里的灯光参数和阴影112
14.3.3 Surface Shader对Forward渲染路径下阴影的支持112

第4篇 Unity中的各种Shader

第15章 Pass的通用指令开关116
15.1 使用LOD在运行时决定材质116
15.1.1 材质的LOD116
15.1.2 运行时设定单个材质的LOD116
15.1.3 设定全局所有材质的LOD117
15.1.4 Unity内置的LOD层级118
15.2 渲染队列118
15.2.1 标签队列和渲染顺序118
15.2.2 渲染队列和ZTest判断120
15.2.3 Unity中内置的渲染队列120
15.3 透明的产生120
15.3.1 Alpha检测和8种比较条件120
15.3.2 动态生成AlphaTest的材质120
15.3.3 动态生成Shader的内容121
15.3.4 结合AlphaTest和Blend操作122
15.4 混合操作123
15.4.1 什么是混合(Blend)操作123
15.4.2 动态生成测试用的材质123
15.4.3 生成Shader的代码124
15.4.4 检测不同的混合操作125
15.4.5 BlendOp选项126
15.4.6 动态生成带BlendOp选项的材质126
15.4.7 生成Shader的代码127
15.4.8 检测BlendOp操作127
15.5 使用通道遮罩(ColorMask)128
15.5.1 ColorMask的作用128
15.5.2 检测ColorMask128
15.5.3 一个使用ColorMask的例子129
15.6 ZTest(深度测试)130
15.6.1 存取场景的ZTest130
15.6.2 RenderType标签和生成ZTest的关联130
15.6.3 内置RenderType的值131
15.6.4 Forward渲染路径下的ZTest131
15.6.5 Deferred渲染路径下的ZTest132
15.7 对Z深度的偏移134
15.7.1 干预正常ZTest的手段134
15.7.2 动态改变Offset的参数134
15.7.3 观察Offset在不同应用条件下的表现135
15.8 面的剔除操作135
15.9 自动贴图坐标的生成136
15.9.1 ObjectLinear和等价的Cg代码136
15.9.2 EyeLinear和等价的Cg代码137
15.9.3 SphereMap和等价的Cg代码138
15.9.4 CubeReflect和等价的Cg代码139
15.9.5 CubeNormal和等价的Cg代码139
15.10 抓屏操作140
15.10.1 如何使用GrabPass140
15.10.2 一个模拟曲面反射的例子141
15.11 Fog(雾效)142
15.11.1 Fog和Unity的3种实现142
15.11.2 材质中对Fog的控制142
15.11.3 实现自己的Fog143

第16章 固定管线146
16.1 Unity中固定管线的基本形态146
16.1.1 基本形态146
16.1.2 与照明相关的Material块147
16.1.3 处理纹理的SetTexture块147
16.1.4 基本形态的另一种写法147
16.1.5 Combine语句147
16.2 使用顶点色148
16.2.1 使用ColorMaterial148
16.2.2 使用Bind148
16.3 在固定管线中使用光照贴图149
16.4 嵌套Cg代码149

第17章 Surface Shader151
17.1 Surface Shader的适应性151
17.1.1 一个分析策略151
17.1.2 VertexLit渲染路径的检测材质151
17.1.3 Forward渲染路径的检测材质152
17.1.4 测试用的场景153
17.1.5 检测结果:不独立支持VertexLit渲染路径153
17.1.6 检测结果:对Forward渲染路径的有条件支持153
17.2 Surface Shader和Deferred渲染路径154
17.2.1 设计检测的策略和材质154
17.2.2 检测结果:Surface Shader对Deferred渲染路径的支持条件156
17.3 Forward渲染路径下的Surface Shader157
17.3.1 Cg代码完全体157
17.3.2 最简形式的等价Cg代码158
17.3.3 Cg代码对光照贴图的支持163
17.3.4 一个检测生成的ForwardBase场景164
17.3.5 自动生成的ForwardAdd165
17.3.6 参数noambient和novertexlights168
17.3.7 参数approxview和halfasview168
17.3.8 Forward渲染路径下的透明和混合模式参数169
17.3.9 加强Forward渲染路径下效果的参数171
17.4 Deferred渲染路径下的Surface Shader174
17.4.1 自动生成的PrePassBase和PrePassFinal174
17.4.2 PrePassBase都做了什么177
17.4.3 _LightBuffer里面的东西179
17.4.4 计算_LightBuffer所使用的材质180
17.4.5 PrePassFinal的工作185
17.4.6 FallBack和Surface Shader的阴影186
17.4.7 精简用的参数187
17.4.8 Vertex、finalcolor函数和addshadow选项188
17.4.9 Deferred模式下的材质透明188
17.4.10 decal参数189

第18章 凹凸材质190
18.1 切空间190
18.2 凹凸贴图190
18.2.1 计算到切空间的矩阵190
18.2.2 Unity中法线贴图的压缩格式191
18.2.3 使用切空间矩阵的另一种方法191
18.2.4 Unity对切空间计算的支持192
18.2.5 解压缩法线贴图的函数193
18.2.6 在切空间中计算高光193
18.2.7 Surface Shader和切空间194
18.3 Parallax Mapping(视差映射)194
18.3.1 Parallax Mapping及其别名194
18.3.2 一个使用灰度图来偏移UV的材质195
18.3.3 结合法线贴图196
18.3.4 用视角来决定UV偏移197
18.3.5 一个完整的实现197
18.4 Relief Mapping(地势映射)198
18.4.1 Parallax Mapping的极限和Relief Mapping的面世198
18.4.2 Relief Mapping的算法199
18.4.3 一个完整的实现200

第19章 卡通材质203
19.1 描边203
19.1.1 沿法线挤出轮廓203
19.1.2 容易产生的问题204
19.1.3 在视空间中挤出205
19.1.4 顶点位置的另一个含义206
19.1.5 调和法线和顶点方向207
19.1.6 判断顶点的指向207
19.1.7 不仅仅是轮廓208
19.1.8 通过Z偏移来描边210
19.2 卡通着色211
19.2.1 对光照进行离散化211
19.2.2 使用2D贴图重新映射光照213

第20章 镜面材质215
20.1 镜像一个相机215
20.1.1 镜子里的世界和我的计划215
20.1.2 在脚本中对位置和角度进行镜像215
20.2 使用镜像相机来渲染、投影216
20.2.1 镜面材质的工作:采样被投影的渲染结果216
20.2.2 脚本的工作:渲染镜像相机和设置投影矩阵217
20.3 镜像相机的近剪切平面和倾斜矩阵218
20.3.1 调节近剪切平面218
20.3.2 使用倾斜矩阵微调视锥体218

第21章 半透明材质219
21.1 什么是半透明材质219
21.2 用简单来表达复杂219

第22章 体积雾221
22.1 距离的表达:相对于背景的体积雾221
22.1.1 需要计算的东西221
22.1.2 使用一个Pass来完成所有的计算221
22.1.3 黑色的雾效222
22.2 厚度的表达:物体形体的体积雾223
22.2.1 必须计算的两个数据223
22.2.2 在Unity中使用一个Pass来完成所有计算223

第23章 Wrap Model新解226
23.1 一个可调节的Wrap光照模型226
23.2 另一种实现途径226
23.2.1 基于不同构想的Wrap226
23.2.2 实现这种构想227
23.2.3 进一步的变通227

第24章 面积光228
24.1 线光源228
24.1.1 点,线,面228
24.1.2 如何理解一个线光源228
24.1.3 通过脚本传递线光源的几何信息228
24.1.4 计算线光源的照明229
24.1.5 线光源的辐射方向230
24.1.6 线光源的衰减230
24.2 面积光源231
24.2.1 面积光和线光源的不同231
24.2.2 通过脚本设定面积光的几何特性231
24.2.3 计算面积光232
24.2.4 和默认照明的整合234

第25章 体积光235
25.1 体积光和体积阴影235
25.1.1 什么是体积光235
25.1.2 体积光和体积阴影的关系235
25.2 实现体积光235
25.2.1 在Shader中表现体积光235
25.2.2 脚本的帮助236

第26章 材质替代渲染238
26.1 相机(Camera)和渲染消息238
26.1.1 相机的渲染消息发送顺序238
26.1.2 物体的渲染消息发送顺序239
26.1.3 相机和物体的渲染消息先后顺序240
26.1.4 存在两个相机时的渲染消息240
26.1.5 最后能改变Cull操作结果的地方241
26.1.6 最后能设置材质数据的地方241
26.2 相机(Camera)的渲染方法242
26.2.1 Render方法242
26.2.2 RenderWithShader方法243
26.3 如何使用RenderWithShader方法245
26.3.1 标签值不同的5个Shader245
26.3.2 调用RenderWithShader方法的脚本246
26.3.3 替换用的5个材质247
26.3.4 检测RenderWithShader方法的效果248
26.3.5 使用SubShader组织替代材质249
26.3.6 如何设置替代材质的属性249
26.3.7 将结果输出到屏幕上250
26.4 SetReplacementShader和ResetReplacementShader251

第27章 后期效果252
27.1 Graphics的两个方法252
27.1.1 与相机渲染方法的不同之处252
27.1.2 Blit方法的简单示例252
27.1.3 使用BlitMultiTap方法进行多重采样254
27.2 一个简单的调色257
27.2.1 调色用的脚本257
27.2.2 调色用的材质258
27.2.3 更高效的做法259
27.3 景深261
27.3.1 用于模糊图像的材质261
27.3.2 进行纵横两次模糊操作262
27.3.3 进行混合操作的脚本263
27.3.4 进行混合操作的材质263
27.3.5 提供一个可调节参数264
27.4 轮廓检测265
27.4.1 用脚本索要场景的Z深度和法线265
27.4.2 在材质中进行边缘检测265
27.5 扭曲267
27.5.1 通过UV操作扭曲图像267
27.5.2 限定扭曲的区域268
27.5.3 使用物体来做遮罩268
27.6 运动模糊271
27.6.1 如何记录运动轨迹271
27.6.2 实现运动模糊的材质271
27.6.3 用于完成整个过程的脚本272
27.6.4 通过Alpha和帧的混合操作实现运动模糊273
27.7 噪波273
27.7.1 根据Z深度来混合噪波274
27.7.2 根据明暗程度来混合噪波274
27.8 色彩的溢出275
27.8.1 色彩溢出的算法考量276
27.8.2 实现色彩溢出的采样计算276

第28章 地形278
28.1 地表的材质278
28.1.1 地面纹理的控制贴图278
28.1.2 如何自定义地表材质279
28.1.3 如何使用更多的纹理贴图280
28.2 花草的材质280
28.2.1 非Billboard类型花草的材质281
28.2.2 Terrain引擎传入的数据282
28.2.3 Billboard类型花草的材质282
28.2.4 自定义Detail Mesh的材质283
28.3 树木的材质283
28.3.1 树木的2D Billboard材质283
28.3.2 3D形态树木的材质284
28.3.3 应用Unity计算的Occlusion286

第29章 投影288
29.1 Unity的Projector288
29.1.1 Projector中的材质被执行的顺序288
29.1.2 如何写Projector使用的材质288
29.1.3 控制投影淡进淡出的矩阵289
29.2 实现自己的投影290
29.2.1 设定投影矩阵的脚本290
29.2.2 采样投影的材质291
29.2.3 直接投影到屏幕上292
29.2.4 模拟GUITexture293
29.3 模拟粒子的广告牌效果294
29.3.1 使用材质将物体面向相机294
29.3.2 保持旋转角度295

第5篇 Shader的组织和优化

第30章 Shader的组织和复用298
30.1 cginc文件298
30.1.1 Unity的UnityCG.cginc文件298
30.1.2 定义自己的cginc文件298
30.1.3 使用自定义的cginc文件299
30.2 通过UsePass来复用300
30.2.1 定义自己要复用的Pass300
30.2.2 复用这些Pass301
30.3 定义自己的Shader关键字301
30.3.1 使用关键字改变Shader的行为301
30.3.2 定义自己的Shader关键字301
30.4 使用multi_compile编译Shader的多个版本302
30.4.1 使用multi_compile实现多次编译302
30.4.2 在脚本中选择Shader的版本302
30.5 Unity对DX11支持所带来的问题303

第31章 你必须知道的渲染概念304
31.1 逐顶点计算和逐像素计算304
31.1.1 逐顶点计算304
31.1.2 逐像素计算304
31.1.3 如何在这两个概念中取舍304
31.2 Draw Call的指标意义304
31.2.1 Draw Call的概念304
31.2.2 正确理解Draw Call对你开发应用的意义304
31.2.3 Batching的概念和Unity为优化Draw Call所做的工作305
31.2.4 优化Draw Call305
31.3 利用渲染队列的技巧305
31.3.1 渲染队列的概念305
31.3.2 设置Render Queue的技巧305

第32章 基于渲染路径的优化306
32.1 VertexLit渲染路径下的优化306
32.1.1 VertexLit渲染路径的特点306
32.1.2 合理的光照计算306
32.2 Forward渲染路径下的优化306
32.2.1 Forward渲染路径的特点306
32.2.2 合理的光照计算306
32.3 Deferred渲染路径下的优化307
32.3.1 Deferred渲染路径的特点307
32.3.2 合理的灯光布局307

第33章 移动平台上的优化308
33.1 移动平台的特点308
33.2 一些指令的运算速度概念308
33.3 几何复杂度的考量308
33.4 贴图的问题309
33.5 数据类型的使用方式309
33.6 变量的使用310
33.7 慎用后期效果310
33.8 慎用透明效果310

附录 相关资源311

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book