Commit Graph

101 Commits

Author SHA1 Message Date
cptbtptpbcptdtptp
8c5a070037 chore: release v0.0.0-experimental-2.0-game.16 2026-05-28 20:24:58 +08:00
cptbtptpbcptdtptp
07abbc4be6 chore: release v0.0.0-experimental-2.0-game.15 2026-05-26 19:42:46 +08:00
cptbtptpbcptdtptp
f8d49791a6 chore: release v0.0.0-experimental-2.0-game.14 2026-05-22 18:27:05 +08:00
cptbtptpbcptdtptp
e659773e43 chore: release v0.0.0-experimental-2.0-game.13 2026-05-20 15:10:54 +08:00
cptbtptpbcptdtptp
ab190accb6 chore: release v0.0.0-experimental-2.0-game.12 2026-05-15 18:43:34 +08:00
cptbtptpbcptdtptp
3b8193cbc0 chore: release v0.0.0-experimental-2.0-game.11 2026-05-14 16:58:33 +08:00
cptbtptpbcptdtptp
cf8c320846 chore: release v0.0.0-experimental-2.0-game.10 2026-05-14 16:30:25 +08:00
cptbtptpbcptdtptp
d09c43f7f6 chore: release v0.0.0-experimental-2.0-game.9 2026-05-03 17:03:03 +08:00
cptbtptpbcptdtptp
aa2442dc3c feat: support text outline 2026-04-30 22:07:25 +08:00
cptbtptpbcptdtptp
d33332c0e9 chore: release v0.0.0-experimental-2.0-game.8 2026-04-29 20:12:53 +08:00
cptbtptpbcptdtptp
b87180b723 chore: release v0.0.0-experimental-2.0-game.7 2026-04-28 22:23:10 +08:00
cptbtptpbcptdtptp
08682c12fd feat: support mask 2026-04-28 15:06:26 +08:00
cptbtptpbcptdtptp
5f00d11c62 chore: release v0.0.0-experimental-2.0-game.6 2026-04-24 18:06:35 +08:00
cptbtptpbcptdtptp
80b8eef7a4 chore: release v0.0.0-experimental-2.0-game.5 2026-04-23 21:10:27 +08:00
cptbtptpbcptdtptp
2d3b2d4526 chore: release v0.0.0-experimental-2.0-game.4 2026-04-23 21:08:05 +08:00
shensi.zxd
dd02420acc feat(core): GPU Instancing 自动合批(cherry-pick from galacean/engine#2957)
从 PR https://github.com/galacean/engine/pull/2957 (feat/gpu-instancing)
cherry-pick 69 个 commit 到 fix/shaderlab 分支,压缩为单次提交。

## 核心改动

### 新增文件
- `InstanceBuffer.ts` — UBO-based 实例数据管理,将多个 renderer 的
  worldMatrix/shaderData 打包到一个 UBO 中
- `VertexMergeBatcher.ts` — 替代旧 BatchUtils,统一 2D/3D 合批入口
- `ShaderBlockProperty.ts` — UBO block 属性描述
- `ShaderProgramMap.ts` — 替代旧 ShaderProgramPool,支持 instancing layout 缓存
- `ConstantBufferBindingPoint.ts` — UBO binding point 枚举

### 修改文件
- `MeshRenderer._canBatch/_batch` — 同 mesh+material+macros 自动合批判定
- `SkinnedMeshRenderer` — 标记不可 GPU instance
- `RenderQueue` — 按 material/primitive 排序(替代按距离排序),
  渲染时检测 instanced batch 并通过 InstanceBuffer 一次 draw
- `RenderElement` — 扁平化(移除 SubRenderElement),支持 instancedRenderers 列表
- `ShaderFactory` — UBO 布局计算、instancing GLSL 注入(RENDERER_GPU_INSTANCE macro)
- `ShaderPass` — 编译时检测 GPU instance macro,注入 UBO 声明
- `ShaderProgram` — 存储 instanceLayout
- `Renderer` — 移除 batched 相关字段

### 删除文件
- `BatchUtils.ts` → 替换为 `VertexMergeBatcher.ts`
- `SubRenderElement.ts` → 合并到 `RenderElement.ts`
- `ShaderProgramPool.ts` → 替换为 `ShaderProgramMap.ts`

## cherry-pick 冲突解决记录

fix/shaderlab 分支和 PR 基线 (dev/2.0) 的差异主要在以下文件:

1. **ShaderPass.ts** — fix/shaderlab 使用 `Shader._shaderLab._parseMacros`
   处理 ShaderLab 宏,而 PR 使用 `ShaderMacroProcessor.evaluate`(fix/shaderlab
   上不存在)。解决方式:保留 fix/shaderlab 的宏处理,加入 PR 的 instancing
   UBO 注入逻辑。
2. **Transform.glsl** — fix/shaderlab 已有 `camera_VPMat` 声明,PR 也添加了。
   解决方式:合并两边声明。
3. **UIRenderer.ts** — PR 将 `BatchUtils` 重命名为 `VertexMergeBatcher`,
   `batchFor2D` 重命名为 `batch`。fix/shaderlab 的 UI 包未同步。
   解决方式:手动更新 UI 包的 import 和调用。
4. **GLSLIfdefResolver.ts** — PR 早期 commit 新增此文件,后续 commit 删除。
   cherry-pick 后 ShaderPass.ts 残留了 import。解决方式:删除无用 import。

## 验证结果

CarParking 游戏 DrawCall 从 905 降至 ~80(同 mesh+material 的座椅、轮子等
自动合批)。
2026-04-23 17:26:31 +08:00
cptbtptpbcptdtptp
27fbf5f5f6 chore: release v0.0.0-experimental-2.0-game.3 2026-04-22 21:56:02 +08:00
cptbtptpbcptdtptp
ae8c7db08d chore: release v0.0.0-experimental-2.0-game.1 2026-04-21 17:40:01 +08:00
cptbtptpbcptdtptp
e5228d76d6 chore: release v0.0.0-experimental-2.0-game 2026-04-21 14:58:33 +08:00
cptbtptpbcptdtptp
ca5252a9a8 feat: supported filled 2026-04-07 16:21:59 +08:00
cptbtptpbcptdtptp
2f88c2fab6 chore: release v2.0.0-alpha.24 2026-03-23 17:55:13 +08:00
GuoLei1990
1ff3635412 chore: release v2.0.0-alpha.23 2026-03-20 21:20:51 +08:00
GuoLei1990
026b8fbd10 chore: release v2.0.0-alpha.22 2026-03-20 21:08:35 +08:00
GuoLei1990
ba694802aa chore: release v2.0.0-alpha.21 2026-03-20 21:05:45 +08:00
GuoLei1990
ec924d5783 chore: release v2.0.0-alpha.20 2026-03-20 20:57:58 +08:00
cptbtptpbcptdtptp
4213f7a0f5 chore: release v2.0.0-alpha.19 2026-03-20 16:02:26 +08:00
cptbtptpbcptdtptp
9d308ee8cc chore: release v2.0.0-alpha.18 2026-03-19 17:46:36 +08:00
cptbtptpbcptdtptp
d61eb7627b chore: release v2.0.0-alpha.17 2026-03-19 10:35:18 +08:00
cptbtptpbcptdtptp
e590f0ecbd chore: release v2.0.0-alpha.16 2026-03-18 18:02:59 +08:00
cptbtptpbcptdtptp
26f35abacd chore: release v2.0.0-alpha.15 2026-03-17 19:21:25 +08:00
cptbtptpbcptdtptp
fbc79fe85e chore: release v2.0.0-alpha.14 2026-03-16 12:14:57 +08:00
ChenMo
ce413ebbba feat: add RenderTarget asset loader and colorTextures getter (#2923)
* feat: add RenderTarget asset loader and expose colorTextures getter
2026-03-16 12:08:22 +08:00
GuoLei1990
5073881d6c chore: release v2.0.0-alpha.13 2026-03-14 00:38:50 +08:00
GuoLei1990
5a578424be refactor: update AmbientLight asset URLs to new format 2026-03-13 01:22:54 +08:00
GuoLei1990
0674811b6a chore: release v2.0.0-alpha.12 2026-03-13 00:01:21 +08:00
GuoLei1990
9bd6253456 chore: release v2.0.0-alpha.11 2026-03-12 23:28:53 +08:00
ChenMo
2a242ef61a refactor: rename Env to AmbientLight, .env to .ambLight (#2919)
* refactor: rename Env/EnvLoader to AmbientLight/AmbientLightLoader
2026-03-12 23:28:04 +08:00
GuoLei1990
a36d6526de chore: release v2.0.0-alpha.10 2026-03-12 21:09:58 +08:00
cptbtptpbcptdtptp
744deee2d3 chore: release v2.0.0-alpha.9 2026-03-11 20:21:28 +08:00
GuoLei1990
3c8617940b chore: release v2.0.0-alpha.8 2026-03-11 00:42:34 +08:00
cptbtptpbcptdtptp
76aacb50df chore: release v2.0.0-alpha.7 2026-03-10 21:02:44 +08:00
hhhhkrx
3c1103c9c6 migrate ambient env from RGBM to half-float (#2916)
* feat: migrate ambient env from RGBM to half-float
2026-03-10 20:54:40 +08:00
GuoLei1990
6dbef4aa9b chore: release v2.0.0-alpha.6 2026-03-10 11:21:20 +08:00
cptbtptpbcptdtptp
e237cdcdb4 chore: release v2.0.0-alpha.5 2026-03-03 18:40:53 +08:00
GuoLei1990
5619f77b3d chore: release v2.0.0-alpha.4 2026-03-02 23:21:15 +08:00
GuoLei1990
8882bca90f chore: release v2.0.0-alpha.3 2026-03-02 22:47:31 +08:00
cptbtptpbcptdtptp
d68166b43e chore: release v2.0.0-alpha.2 2026-01-28 20:47:09 +08:00
cptbtptpbcptdtptp
6a8058be2e chore: release v2.0.0-alpha.1 2026-01-27 20:29:40 +08:00
cptbtptpbcptdtptp
78b06f9808 chore: release v2.0.0-alpha.0 2026-01-27 15:14:46 +08:00
GuoLei1990
39dcd8a49d chore: release v1.6.13 2025-12-29 13:25:18 +08:00