Exemplo n.º 1
0
    void AddTextureSet(WorldAtlasMaterial atlasMaterial, List <Texture2D> arr, List <TextureSet> indices, WorldAtlasMaterialTextures.TextureSet textureSet, string channelName)
    {
        var tSet = new TextureSet()
        {
            top    = AddTextureIndex(arr, textureSet.top),
            sides  = AddTextureIndex(arr, textureSet.sides),
            bottom = AddTextureIndex(arr, textureSet.bottom)
        };

        indices.Add(tSet);
    }
Exemplo n.º 2
0
    void AddTextureSet(WorldAtlasMaterial atlasMaterial, RHOTextureTable table, RHOTextureSet textureSet)
    {
        CheckThrowTextureSet(atlasMaterial, textureSet.roughness, "Roughness");
        CheckThrowTextureSet(atlasMaterial, textureSet.ao, "AO");
        CheckThrowTextureSet(atlasMaterial, textureSet.height, "Height");

        var tSet = new TextureSet()
        {
            top    = table.AddTextureJoin(textureSet.roughness.top, textureSet.height.top, textureSet.ao.top),
            sides  = table.AddTextureJoin(textureSet.roughness.sides, textureSet.height.sides, textureSet.ao.sides),
            bottom = table.AddTextureJoin(textureSet.roughness.bottom, textureSet.height.bottom, textureSet.ao.bottom)
        };

        table.indices.Add(tSet);
    }
Exemplo n.º 3
0
 void CheckThrowTextureSet(WorldAtlasMaterial atlasMaterial, WorldAtlasMaterialTextures.TextureSet textureSet, string channelName)
 {
     if (textureSet.top == null)
     {
         ThrowAssetException(atlasMaterial, "Texture set for " + channelName + " is missing 'top' texture!");
     }
     if (textureSet.sides == null)
     {
         ThrowAssetException(atlasMaterial, "Texture set for " + channelName + " is missing 'sides' texture!");
     }
     if (textureSet.bottom == null)
     {
         ThrowAssetException(atlasMaterial, "Texture set for " + channelName + " is missing 'bottom' texture!");
     }
 }