Skip to content

Commit

Permalink
Merge pull request #1 from donmccurdy/ultrafishotoy-EXT_mesh_gpu_inst…
Browse files Browse the repository at this point in the history
…ancing

Rename KHR_mesh_instancing -> EXT_mesh_gpu_instancing
  • Loading branch information
ultrafishotoy authored Mar 30, 2020
2 parents 615652a + 8d8f4a0 commit eef3c13
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# KHR\_mesh\_instancing
# EXT\_mesh\_gpu\_instancing

## Khronos 3D Formats Working Group

* John Cooke
* Don McCurdy
* Arseny Kapoulkine
* Arseny Kapoulkine

## Acknowledgments

Expand All @@ -20,16 +20,16 @@ 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 TRANSLATION, ROTATION, and SCALE attributes allows the mesh to be displayed at many different locations with different rotations and scales.
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 TRANSLATION, ROTATION, and SCALE attributes allows the mesh to be displayed at many different locations with different rotations and scales.
Custom attributes can use the underscore mechanism to achieve other effects (i.e. _ID, _TRANSFORM4x3, etc.).

## Extending Nodes with per instance attributes

Instancing is defined by adding the `KHR_mesh_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 TRANSLATION, ROTATION, and SCALE attribute buffers, all of which are optional. The attributes specify an object space transform that should be
multipled by the node's world transform in the shader to produce the final world transform for the instance. For example, the following defines some instancing attributes to a node with mesh.
Instancing is defined by adding the `EXT_mesh_gpu_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 TRANSLATION, ROTATION, and SCALE attribute buffers, all of which are optional. The attributes specify an object space transform that should be
multipled by the node's world transform in the shader to produce the final world transform for the instance. For example, the following defines some instancing attributes to a node with mesh.

```json
{
Expand All @@ -38,7 +38,7 @@ multipled by the node's world transform in the shader to produce the final world
"mesh": 0,
"name": "teapot",
"extensions": {
"KHR_mesh_instancing": {
"EXT_mesh_gpu_instancing": {
"attributes": {
"TRANSLATION": 0,
"ROTATION": 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_mesh_instancing glTF extension",
"title": "EXT_mesh_gpu_instancing glTF extension",
"type": "object",
"description": "glTF extension defines instance attributes for a node with a mesh.",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
Expand Down

0 comments on commit eef3c13

Please sign in to comment.