Using the Forward Pipeline

The forward pipeline implements multi-pass drawing of model batches.

Features

  • Separate opaque/transparent passes.
  • 8 light slots: 1 linear, 3 spot/point and 4 point lights.
  • PBR support.

Pipeline Shaders

This pipeline comes with two compatible pipeline shaders available in the core resources package.

default.hps (core/shader/default)

This shader supports the following features:

FeatureDescriptionFallback
OptionalDiffuseMapDiffuse texture on UV0uDiffuseColor uniform value
OptionalSpecularMapSpecular texture on UV0uSpecularColor uniform value
OptionalReflectionMapReflection texture on normal reflection-
OptionalNormalMapNormal texture on UV0Geometric normal
OptionalSelfMapSelf-emissive texture on UV0uSelfColor uniform value
OptionalLightMapLight modulation texture on UV1vec3(0, 0, 0)
OptionalAmbientMapAmbient occlusion texture on UV1vec3(1, 1, 1)
OptionalOpacityMapOpacity texture on UV01

This shader implements traditional Phong rendering.

pbr.hps (core/shader/pbr)

This shader supports the following features:

FeatureDescriptionFallback
OptionalBaseColorOpacityMapTexture on UV0 with color on xyz and opacity on wuBaseOpacityColor uniform value
OptionalOcclusionRoughnessMetalnessMapORM texture on UV0uOcclusionRoughnessMetalnessColor uniform value
OptionalSelfMapSelf-emissive texture on UV0uSelfColor uniform value
OptionalNormalMapNormal texture on UV0Geometric normal

This shader implements image-based lighting.

Drawing a Scene

See Drawing a Scene.