Skip to content

Commit b3104c5

Browse files
EricCorleoneslackmoehrlexunyi0
authored
翻译3.0材质升级指南 (cocos#1630)
* 翻译3.0材质升级指南 * 补充索引 * 修复表格和加粗 * Apply suggestions from code review Co-authored-by: Slack-Moehrle <[email protected]> * 补充overview * 删除多余文件 * 删除多余图片 * 删除重复图片 * Apply suggestions from code review Co-authored-by: yufang.wu <[email protected]> * Apply suggestions from code review Co-authored-by: Slack-Moehrle <[email protected]> * Apply suggestions from code review Co-authored-by: yufang.wu <[email protected]> * Update en/material-system/effect-2.x-to-3.0.md Co-authored-by: Slack-Moehrle <[email protected]> Co-authored-by: yufang.wu <[email protected]>
1 parent d7aa838 commit b3104c5

17 files changed

+274
-2
lines changed

en/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [Caution!](getting-started/attention/index.md)
2525
- [Upgrade Guide](release-notes/index.md)
2626
- [Cocos Creator 3.0 Upgrade Guide](release-notes/upgrade-guide-v3.0.md)
27+
- [Cocos Creator 3.0 Material Upgrade Guide](material-system/effect-2.x-to-3.0.md)
2728

2829
## Editor Manual
2930

en/material-system/effect-2.x-to-3.0.md

+254
Large diffs are not rendered by default.
59.9 KB
Loading

en/material-system/material-v2x.png

42.9 KB
Loading

en/material-system/material-v3.png

42.3 KB
Loading

en/material-system/material10.jpg

34.6 KB
Loading

en/material-system/material2.png

14.9 KB
Loading

en/material-system/material3.png

58.3 KB
Loading

en/material-system/material4.1.jpg

295 KB
Loading

en/material-system/material4.jpg

116 KB
Loading

en/material-system/material5.jpg

119 KB
Loading

en/material-system/material8.jpg

60.6 KB
Loading

en/material-system/material9.jpg

56.1 KB
Loading

en/material-system/overview.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Material System Overview
22

3+
## Material System Upgrade Guide
4+
5+
Cocos Creator has supported the material system since v2.x. In v3.0, the design and built-in Shader API of the material system continues to be improved. When upgrading from v2.x to v3.0 and later versions, some of the content may still need to be adjusted manually by the developer, please refer to the upgrade guide below:
6+
7+
- [v2.x to v3.0 Material Upgrade Guide](./effect-2.x-to-3.0.md)
8+
9+
## Material System Class Diagram
10+
311
The material system plays an essential role in any game engine infrastructure, it controls the way everything is drawn on screen and much more.
412

513
The general structure of the system is as follows:

en/release-notes/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Upgrade Guide
22

33
- [Cocos Creator 3.0 Upgrade Guide](upgrade-guide-v3.0.md)
4+
- [Cocos Creator 3.0 Material Upgrade Guide](../material-system/effect-2.x-to-3.0.md)

zh/material-system/effect-2.x-to-3.0.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ v3.0 新增了一些新的 Pass 选项:
125125

126126
| v2.x Header & Name | v3.0 Header & Name| Type | 用途 |版本差异性 |
127127
| :------ | :------ | :----- | :------ |:------ |
128-
| `cc-local.chunk` & `cc_matWorld` | `cc-local.chunk` & `cc_matWorld` | mat4 | 模型空间转世界空间矩阵 |无差异 |
128+
| `cc-local.chunk` & `cc_matWorld` | `cc-local.chunk` & `cc_matWorld` | mat4 | 模型空间转世界空间矩阵 |无差异 |
129129
| `cc-local.chunk` & `cc_matWorldIT` |`cc-local.chunk` & `cc_matWorldIT` | mat4 | 模型空间转世界空间逆转置矩阵 |无差异 |
130130
| `cc-global.chunk` & `cc_time` | `cc-global.chunk` & `cc_time` |vec4 | x:自开始以来的全球时间,以秒为单位<br>y:当前帧的增量时间<br>z:自开始以来的总帧数 |无差异 |
131131
| `cc-global.chunk` & `cc_screenSize` | `cc-global.chunk` & `cc_screenSize` | vec4 | xy:屏幕尺寸<br>zw:屏幕尺寸倒数 |无差异 |
@@ -243,7 +243,7 @@ v2.x 与 v3.0 的阴影计算区别很大,v2.0 加入了头文件 `shadow.chun
243243

244244
| Name | Type | Info |
245245
| :------ | :----- | :----- |
246-
| `cc_matLightPlaneProj` | mat4|平面阴影的变换矩阵 |
246+
| `cc_matLightPlaneProj` | mat4| 平面阴影的变换矩阵 |
247247
| `cc_shadowColor` | vec4 | 阴影颜色 |
248248

249249
#### ShadowPCF 软阴影

zh/material-system/overview.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# 材质系统总览
22

3+
## 材质系统升级指南
4+
5+
Cocos Creator 从 v2.x 开始就支持了材质系统,在 v3.0 中我们持续改进了材质系统的设计和内置 Shader API,所以从 v2.x 升级到 v3.0 及后续版本时,部分内容可能还需要开发者手动进行调整,具体请参考下方的升级指南:
6+
7+
- [v2.x to v3.0 材质升级指南](./effect-2.x-to-3.0.md)
8+
9+
## 材质系统类图
10+
311
材质系统控制着每个模型最终的着色流程与顺序,在引擎内相关类间结构如下:
412

513
[![Assets](material.png "Click to view diagram source")](material.dot)

0 commit comments

Comments
 (0)