shiny  0.4
a shader and material management library for OGRE
Material LOD

How it works

When Ogre requests a technique for a specific LOD index, the Factory selects the appropriate LOD configuration which then temporarily overrides the global settings in the shaders. We can use this to disable shader features one by one at a lower LOD, resulting in simpler and faster techniques for distant objects.

How to use it

lod_configuration 1
{
specular_mapping false
}
lod_configuration 2
{
specular_mapping false
normal_mapping false
}
lod_configuration 3
{
terrain_composite_map true
specular_mapping false
normal_mapping false
}
Note
You can also add LOD configurations by calling sh::Factory::registerLodConfiguration.
Do not use an index of 0. LOD 0 refers to the highest LOD, and you will never want to disable features at the highest LOD level.
material sample_material
{
lod_values 100 300 1000
... your passes, texture units etc ...
}