meta4d-me / CatDogEngine

A cross-platform game engine/editor written in modern C++ (WIP)
GNU General Public License v2.0
160 stars 17 forks source link

Skip the specified uber option combination. #338

Closed roeas closed 1 year ago

roeas commented 1 year ago

image image At least 16 uber shader variant reduced, and this number will increase as the total number of uber increases. usage:

    shaderSchema.AddUberOption(Uber::ALBEDO_MAP);
    shaderSchema.AddUberOption(Uber::NORMAL_MAP);
    shaderSchema.AddUberOption(Uber::ORM_MAP);
    shaderSchema.AddUberOption(Uber::EMISSIVE_MAP);
    shaderSchema.AddUberOption(Uber::IBL);
    shaderSchema.AddUberOption(Uber::ATM);
    shaderSchema.SetConflictOptions(Uber::ATM, Uber::IBL);
    shaderSchema.Build();