How do I add 4 more detail textures to terra?
right now to set the main detail, I do this:
Code: Select all
datablock->setTexture(Ogre::TerraTextureTypes::TERRA_DETAIL_WEIGHT, mSplat.getTexture());
and then to set the details, I do this:
Code: Select all
auto createDetail = [&](const std::string& name, std::size_t i) {
loadTexture(name, static_cast<Ogre::TerraTextureTypes>(Ogre::TerraTextureTypes::TERRA_DETAIL0 + i), datablock);
loadTexture(name, static_cast<Ogre::TerraTextureTypes>(Ogre::TerraTextureTypes::TERRA_DETAIL_METALNESS0 + i), datablock);
loadTexture(name, static_cast<Ogre::TerraTextureTypes>(Ogre::TerraTextureTypes::TERRA_DETAIL_ROUGHNESS0 + i), datablock);
//load normal map too
datablock->setRoughness(i, 1);
datablock->setMetalness(i, 1);
datablock->setDetailMapOffsetScale(i, { 0,0,256,256 });
};
Do I need to make modifications to terra/shaders to support four more details?