升级指南:Effect 从 v3.5.x 升级到 v3.6.0

Chunks 迁移

3.6.0将之前版本 chunks 文件夹中的零散文件分门别类的存放到子文件夹中,书写 chunk 的 #include 时请参考下面的表格:

1、公共函数库

原文件新路径
commoncommon/common-define
texture-lodcommon/texture/texture-lod
packingcommon/data/packing
unpackcommon/data/unpack
acescommon/color/aces
gammacommon/color/gamma
octahedron-transformcommon/math/octahedron-transform
transformcommon/math/transform
rect-area-lightcommon/lighting/rect-area-light

2、Uniform 定义

原文件新路径
cc-globalbuiltin/uniforms/cc-global
cc-localbuiltin/uniforms/cc-local
cc-forward-lightbuiltin/uniforms/cc-forward-light
cc-environmentbuiltin/uniforms/cc-environment
cc-diffusemapbuiltin/uniforms/cc-diffusemap
cc-shadowbuiltin/uniforms/cc-shadow
cc-world-boundbuiltin/uniforms/cc-world-bound

3、通用 Shader 主函数(仅限 legacy shader)

原文件新路径
outline-vslegacy/main-functions/outline-vs
outline-fslegacy/main-functions/outline-fs
general-vslegacy/main-functions/general-vs

4、引擎功能模块及其他(仅限 legacy shader)

原文件新路径
cc-fog-baselegacy/fog-base
cc-shadow-map-baselegacy/shadow-map-base
morphlegacy/morph
cc-skinninglegacy/skinning
cc-local-batchlegacy/local-batch
lightinglegacy/lighting
lightingmap-fslegacy/lightingmap-fs
cc-shadow-map-vslegacy/shadow-map-vs
cc-shadow-map-fslegacy/shadow-map-fs
cc-fog-vslegacy/fog-vs
cc-fog-fslegacy/fog-fs
lightingmap-vslegacy/lightingmap-vs
decodelegacy/decode
decode-baselegacy/decode-base
decode-standardlegacy/decode-standard
inputlegacy/input
input-standardlegacy/input-standard
outputlegacy/output
output-standardlegacy/output-standard
shading-standardlegacy/shading-standard
shading-standard-baselegacy/shading-standard-base
shading-standard-additivelegacy/shading-standard-additive
shading-cluster-additivelegacy/shading-cluster-additive
shading-toonlegacy/shading-toon
standard-surface-entrylegacy/standard-surface-entry

5、仅供内部使用

原文件新路径
alpha-testbuiltin/internal/alpha-test
cc-sprite-commonbuiltin/internal/sprite-common
cc-sprite-texturebuiltin/internal/sprite-texture
embedded-alphabuiltin/internal/embedded-alpha
particle-commonbuiltin/internal/particle-common