Optimize render graph and add GPU profiling

Amp-Thread-ID: https://ampcode.com/threads/T-01a01380-b478-77d0-84a0-102880a5c5ae
Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-08-20 11:48:06 +00:00
co-authored by heaust
parent ded70a3cb4
commit 000bfd63bf
22 changed files with 1622 additions and 203 deletions
+2 -4
View File
@@ -22,17 +22,15 @@ mesh.material = paint;
```ts
const albedo = new Texture(scene, {
source: "/textures/paint.ktx2",
size: [2048, 2048, 1],
source: "/textures/paint.png",
format: "rgba8unorm-srgb",
usage: ["sampled", "copyDst"],
});
await albedo.ready;
const textured = new PBRMaterial(scene, { baseColorTexture: albedo });
```
Creating or removing a `Texture` rebuilds the single graph loadout so the GPU resource is allocated up front. The source pointer stays on the handle for an importer or application uploader; core never owns image-loading policy.
Creating or removing a `Texture` rebuilds the single graph loadout so the GPU resource is allocated up front. The addon decodes URLs outside core, then transfers an `ImageBitmap` to the render worker; compatible loadout rebuilds reuse the allocated GPU texture instead of uploading it again.
## Custom WGSL