feat(instances): Order each mesh's instances by a key
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react-native, typescript
调研方向
Start with the kind API where visible and pose are defined, then trace the compute pass cull and its sorter to see how mesh instance lists are recorded. Inspect how cameras.current is exposed to description functions and identify the point where culling requires cull: true. The change is complete when an order hook returns a per-instance number, visible rows are sorted ascending within each mesh, and existing behavior remains unchanged for kinds without the hook; the depth-only and cross-mesh sorting questions still need resolution.
由索引模型根据 Issue 内容生成。
描述
A renderer draws each mesh's instances in row order. With blend: 'translucent' in a description without passes.accumulation and passes.revealage, a far instance can cover a near one of the same mesh. A program can order its own drawings before record, but not the instances inside one mesh's draw.
Add an order hook to the kind, beside visible and pose: a 'use gpu' function that returns a number per instance. Culling renderers list each mesh's visible rows by that number, ascending, in every description, sorting with sorter in the compute pass cull already records into. The hook reads the description's camera through cameras.current, so back to front is one line:
order: (instance) => {
'use gpu';
return -std.distance(cameras.current.$.position, instance.position);
},
The same hook covers front to back for opaque overdraw, or a fixed layer per world-space UI panel. The kit names no sort modes. It requires cull: true, as from and to do, and kinds without it keep today's lists and allocate nothing new. Meshes keep drawing in the order they gained instances, so the order holds within a mesh, not across meshes or drawings.
Open: whether depth-only descriptions such as shadows skip the sort, and whether one u32 key with the mesh in its high bits sorts every mesh's stretch of the list in one pass.
- 主要语言
- TypeScript
- 星标
- 69
- 派生
- 7
- 平均合并
- 1 小时 48 分钟
- 30 天内合并 PR
- 15
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
software-mansion/typegpu-kit 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 55/100
software-mansion/typegpu-kit#27 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 57/100
software-mansion/typegpu-kit#26 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
software-mansion/typegpu-kit#25 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
software-mansion/typegpu-kit#15 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 50/100
software-mansion/typegpu-kit#14 ·
维护者通常 1 天内回复
查看 software-mansion/typegpu-kit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
check:failed streams:edit
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
[Bug]: Critical path skips a child span that ends exactly when the next one starts可能已有人在做 @Piyush4801 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
jaegertracing/jaeger-ui#4865 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 90/100
anthropics/claude-code#112972 ·