Graphics Reference
In-Depth Information
Techniques and passes are key concepts for understanding lower-level render-
ing concepts.
A technique's role is
to declare parameters along with their types and optional default values
(technique parameters are located at the root level of a technique so that
they can be shared by all passes),
to refer to the first pass that acts as an entry point for the rendering.
A pass contains all the implementation details:
which program to bind, which in turns specifies vertex and fragment shaders,
list of attributes and uniforms both pointing to parameters,
list of GL render states to be set.
To fully set up rendering, passes allow atomically binding a program and
enabling GL states along with their associated functions. Properties such as
double-sided or transparency from higher-level properties emphasize that gen-
erating shaders from high-level material definitions cannot be dissociated from
generating states on their side.
Not all engines will want to import shaders and states, especially for lighting
shaders relying on deferred rendering. For such engines, within passes, a details
property can be generated by COLLADA2GLTF to specify every relevant aspect
to be able to regenerate the shaders and states on the fly.
Both the specification and COLLADA2GLTF currently only support a sin-
gle pass using forward rendering. However, considering further evolutions and
multiple passes, it was critical to provide an extensible way to declare passes.
2.8 Animation
glTF supports a variety of industry-standard animation techniques, including
key frames, skinning, and morphs. While it is up to the runtime engine to im-
plement the animation algorithms, glTF faithfully represents the data generated
by content-creation tools in support of these capabilities.
An animation is composed of a set of channels, samplers, and parameters. A
channel connects a sampled data stream to a property of a target object. The
sampled data stream is defined via a sampler, which takes input data, output
data, and an interpolation type. Sampler input is typically a buffer of FLOAT values
representing time, but it could be a stream of any type of scalar values. Sampler
output is a buffer of values of any valid glTF type, such as FLOAT_VEC3 . Currently,
only the LINEAR interpolation type is supported; other types of interpolation will
be possible via future extensions.
Search WWH ::




Custom Search