text: // Copyright(c) 2019 - 2020, #Momo
  // All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or without
  // modification, are permitted provided that the following conditions are met :
  // 
  // 1. Redistributions of source code must retain the above copyright notice, this
  // list of conditions and the following disclaimer.
  // 
  // 2. Redistributions in binary form must reproduce the above copyright notice,
  // this list of conditions and the following disclaimer in the documentation
  // and /or other materials provided with the distribution.
  // 
  // 3. Neither the name of the copyright holder nor the names of its
  // contributors may be used to endorse or promote products derived from
  // this software without specific prior written permission.
  // 
  // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  // DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  // DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  // OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
  #include "Material.h"
  #include "Core/Runtime/Reflection.h"
  #include "AssetManager.h"
  
  MXENGINE_FORCE_REFLECTION_IMPLEMENTATION(Material);
  
  namespace MxEngine
  {
      MXENGINE_REFLECT_TYPE
      {
          rttr::registration::enumeration<AlphaModeGroup>("AlphaMode")
          (
              rttr::value("OPAQUE"     , AlphaModeGroup::OPAQUE     ),
              rttr::value("MASKED"     , AlphaModeGroup::MASKED     ),
              rttr::value("TRANSPARENT", AlphaModeGroup::TRANSPARENT)
          );
  
          rttr::registration::class_<Material>("Material")
              .constructor<>()
              .property("name", &Material::Name)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("albedo map", &Material::AlbedoMap)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("emissive map", &Material::EmissiveMap)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("normal map", &Material::NormalMap)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("height map", &Material::HeightMap)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("ambient occlusion map", &Material::AmbientOcclusionMap)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("metallic map", &Material::MetallicMap)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("roughness map", &Material::RoughnessMap)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("base color", &Material::BaseColor)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE),
                  rttr::metadata(EditorInfo::INTERPRET_AS, InterpretAsInfo::COLOR)
              )
              .property("transparency", &Material::Transparency)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE),
                  rttr::metadata(EditorInfo::EDIT_RANGE, Range {0.0f, 1.0f}),
                  rttr::metadata(EditorInfo::EDIT_PRECISION, 0.01f)
              )
              .property("alpha mode", &Material::AlphaMode)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE)
              )
              .property("emission", &Material::Emission)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE),
                  rttr::metadata(EditorInfo::EDIT_RANGE, Range { 0.0f, 100000.0f }),
                  rttr::metadata(EditorInfo::EDIT_PRECISION, 0.1f)
              )
              .property("displacement", &Material::Displacement)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE),
                  rttr::metadata(EditorInfo::EDIT_RANGE, Range { 0.0f, 10.0f }),
                  rttr::metadata(EditorInfo::EDIT_PRECISION, 0.01f)
              )
              .property("roughness factor", &Material::RoughnessFactor)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE),
                  rttr::metadata(EditorInfo::EDIT_RANGE, Range { 0.0f, 1.0f }),
                  rttr::metadata(EditorInfo::EDIT_PRECISION, 0.01f)
              )
              .property("metallic factor", &Material::MetallicFactor)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE),
                  rttr::metadata(EditorInfo::EDIT_RANGE, Range { 0.0f, 1.0f }),
                  rttr::metadata(EditorInfo::EDIT_PRECISION, 0.01f)
              )
              .property("uv multipliers", &Material::UVMultipliers)
              (
                  rttr::metadata(MetaInfo::FLAGS, MetaInfo::SERIALIZABLE | MetaInfo::EDITABLE),
                  rttr::metadata(EditorInfo::EDIT_PRECISION, 0.01f)
              );
      }
  }