//-------------------------------------- //Shared helpers //-------------------------------------- private IndirectionTexture setupNormalTextures(MaterialDescription description, Pass pass) { normalTexture.createTextureUnit(pass); IndirectionTexture indirectionTexture; String fileName = description.localizePath(description.NormalMapName + normalTextureFormatExtension); IntSize2 textureSize = getTextureSize(fileName); if (virtualTextureManager.createOrRetrieveIndirectionTexture(description.TextureSet, textureSize, description.KeepHighestMipLoaded, out indirectionTexture)) //Slow key { if (description.KeepHighestMipLoaded) { indirectionTexture.KeepHighestMip = true; } indirectionTexture.addOriginalTexture("NormalMap", fileName, textureSize); } setupIndirectionTexture(pass, indirectionTexture); return(indirectionTexture); }