-
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 3 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. The data consists of | ||
| a transform and an instance id. The transforms allow the mesh to be displayed at many different locations with different rotations and scales. The id 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 mesh node. The attributes section contains accessor ids for new TRANSFORM4x3 and ID attribute buffers. | ||
donmccurdy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| For example, the following defines some instancing attributes to a mesh node in the graph. Instancing only applies to mesh nodes. Applying to nodes rather than meshes allows the | ||
| same mesh to be attached as normal to nodes while also being instanced. | ||
|
|
||
| ```json | ||
| { | ||
| "nodes": [ | ||
| { | ||
| "mesh": 0, | ||
|
||
| "name": "teapot", | ||
| "extensions": { | ||
| "KHR_instancing": { | ||
| "attributes": { | ||
| "TRANSFORM4x3": 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 per mesh instance attributes for a node 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 TRANSFORM4x3, ID).", | ||
| "minProperties": 1, | ||
| "additionalProperties": { | ||
| "$ref": "glTFid.schema.json" | ||
| } | ||
| }, | ||
| "extensions": { }, | ||
| "extras": { } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.