-
Notifications
You must be signed in to change notification settings - Fork 1.2k
EXT_mesh_gpu_instancing #1691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXT_mesh_gpu_instancing #1691
Changes from 7 commits
76587d9
de031ed
5d2dac5
ed5f6e6
a68dcf6
82b3adb
1b4f9c3
956b01d
62cf80a
2ed4903
a833742
8b8e39a
66fa030
332af44
133d28d
3857fa7
d53d9c8
b4854e9
ea4c776
c70f30e
615652a
8d8f4a0
eef3c13
900ac06
5984aa1
dbd7b63
e0a458b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # KHR\_instancing | ||
|
|
||
| ## Khronos 3D Formats Working Group | ||
|
|
||
| * John Cooke | ||
| * TODO | ||
|
|
||
| ## Acknowledgments | ||
|
|
||
| * TODO | ||
|
|
||
| ## Status | ||
|
|
||
| Experimental | ||
|
|
||
| ## Dependencies | ||
|
|
||
| Written against the glTF 2.0 spec. | ||
|
|
||
| ## Overview | ||
|
|
||
| This extension is specfically designed to enable GPU instancing which renders many copies of a single mesh at once using a small number of draw calls. It's useful for things | ||
| like trees, grass, road signs, etc. The TRANSFORM attribute allows the mesh to be displayed at many different locations with different rotations and scales. The ID attribute | ||
| can be used to alter other parameters based on the run-time inplementation. | ||
|
|
||
| ## Extending Nodes with per instance attributes | ||
|
|
||
| Instancing is defined by adding the `KHR_instancing` extension to any glTF node that has a mesh. Instancing only applies to mesh nodes, there is no defined behavior for a node | ||
| with this extension that doesn't also have a mesh. Applying to nodes rather than meshes allows the same mesh to be used by several nodes, instanced or otherwise. The attributes | ||
| section contains accessor ids for the new TRANSFORM and ID attribute buffers. For example, the following defines some instancing attributes to a node with mesh. | ||
|
|
||
| ```json | ||
| { | ||
| "nodes": [ | ||
| { | ||
| "mesh": 0, | ||
|
||
| "name": "teapot", | ||
| "extensions": { | ||
| "KHR_instancing": { | ||
| "attributes": { | ||
| "TRANSFORM": 0, | ||
|
||
| "ID": 1 | ||
|
||
| }, | ||
| } | ||
donmccurdy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ## Appendix | ||
|
|
||
| TODO | ||
|
|
||
| ## Reference | ||
|
|
||
| TODO | ||
|
|
||
| ### Theory, Documentation and Implementations | ||
|
|
||
| TODO | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-04/schema", | ||
| "title": "KHR_instancing glTF extension", | ||
| "type": "object", | ||
| "description": "glTF extension defines instance attributes for a node with a mesh.", | ||
| "allOf": [ { "$ref": "glTFProperty.schema.json" } ], | ||
| "properties": { | ||
| "attributes": { | ||
| "type": "object", | ||
| "description": "A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data (current valid attribs are TRANSFORM, ID).", | ||
| "minProperties": 1, | ||
| "additionalProperties": { | ||
| "$ref": "glTFid.schema.json" | ||
| } | ||
| }, | ||
| "extensions": { }, | ||
| "extras": { } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.