Materials

A core feature of Gorilla3D is a set of standard materials for easy and quick usage in your project.

Since version 0.8+, the most materials are inherited from the node based TGorillaDefaultMaterialSource for comfortable shader code reusage.

Tutorial

Default-Material

The TGorillaDefaultMaterialSource (TGorillaDefaultMaterial) is the approach to centralize basic shader operations like vertex transformation, multiple light computation, shadow casting, normal mapping and much more.

The simple reason for that is, not to reinvent the basic functionality each time for new materials. Many materials need multiple lights, shadows and so one. Those operations also getting very complex in combination and its hard to keep them still efficient.

Because of that, the default material uses a node based memory structure to build shader source code. On rendering the source code will automatically be compiled and registered in GPU.

Read more about the default material: TGorillaDefaultMaterialSource

Materials

Material Behaviours

Since v1.1 (Rev. 2724) we developed a new way of building and managing materials. Our so called Material-Behaviours are a way to encapsulate shader functionality into building blocks. These building blocks can then be reused across multiple TGorillaDefaultMaterialSource components.

This makes it easy to keep your shaders organized and maintainable.

Apply a single material behaviour to multiple material sources, but the place to edit parameters of your behaviour stay centralized. This makes it very easy to manage complex shading behaviour.

Read more about Material Behaviour

Next step: Primitives