2.14. Logarithmic Depth | 2. Design and Implementation | 2.16. Normal Mapping |
Previous | Up | Next |
Forward Rendering (Translucents)
Overview
Because the
deferred renderer in
the
io7m-r1 package is incapable
of rendering
translucent instances, a separate
forward renderer is provided. The
forward renderer in the package can only work
with a subset of the available
light types,
in order to prevent the
combinatorial explosion
of shaders required to support a large number of light and surface types.
Translucent instances are divided into
lit
and
unlit categories.
As stated previously, translucent instances are drawn in the order that they are
submitted to the
visible set builder.
A lit instance is submitted to the builder with the set of lights that affect it.
Only lights of type
KLightTranslucentType
can be applied to translucent instances. Rendering of translucent instances
typically occurs after the rendering of opaque instances and so rendering
works with a depth buffer that has already been populated. Depth testing is
enabled to ensure that instances overlap and are overlapped by existing opaque
instances, but translucent instances
do not have their depths written into the depth buffer, and so care should be
taken when rendering translucent instances that intersect with each other
.
Lit
Lit translucent instances can have
regular
and
specular-only
materials. Specular-only materials result in only a specular term
being calculated for a given object, which is useful for implementing
glass-like objects:
Rendering of lit instances proceeds as follows:
Previous | Up | Next |
2.14. Logarithmic Depth | 2. Design and Implementation | 2.16. Normal Mapping |