Replaced AI_MATKEY_IOR with AI_MATKEY_REFRACTI.
parent
b01d008bc0
commit
0fb66f8437
|
@ -717,7 +717,7 @@ bool glTF2Exporter::GetMatVolume(const aiMaterial &mat, glTF2::MaterialVolume &v
|
||||||
}
|
}
|
||||||
|
|
||||||
bool glTF2Exporter::GetMatIOR(const aiMaterial &mat, glTF2::MaterialIOR &ior) {
|
bool glTF2Exporter::GetMatIOR(const aiMaterial &mat, glTF2::MaterialIOR &ior) {
|
||||||
return mat.Get(AI_MATKEY_IOR, ior.ior) == aiReturn_SUCCESS;
|
return mat.Get(AI_MATKEY_REFRACTI, ior.ior) == aiReturn_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void glTF2Exporter::ExportMaterials() {
|
void glTF2Exporter::ExportMaterials() {
|
||||||
|
|
|
@ -355,7 +355,7 @@ static aiMaterial *ImportMaterial(std::vector<int> &embeddedTexIdxs, Asset &r, M
|
||||||
if (mat.materialIOR.isPresent) {
|
if (mat.materialIOR.isPresent) {
|
||||||
MaterialIOR &ior = mat.materialIOR.value;
|
MaterialIOR &ior = mat.materialIOR.value;
|
||||||
|
|
||||||
aimat->AddProperty(&ior.ior, 1, AI_MATKEY_IOR);
|
aimat->AddProperty(&ior.ior, 1, AI_MATKEY_REFRACTI);
|
||||||
}
|
}
|
||||||
|
|
||||||
return aimat;
|
return aimat;
|
||||||
|
|
|
@ -1041,12 +1041,6 @@ extern "C" {
|
||||||
// The color that white light turns into due to absorption when reaching the attenuation distance.
|
// The color that white light turns into due to absorption when reaching the attenuation distance.
|
||||||
#define AI_MATKEY_VOLUME_ATTENUATION_COLOR "$mat.volume.attenuationColor", 0, 0
|
#define AI_MATKEY_VOLUME_ATTENUATION_COLOR "$mat.volume.attenuationColor", 0, 0
|
||||||
|
|
||||||
// IOR
|
|
||||||
// ------------
|
|
||||||
// https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_ior
|
|
||||||
// Index of Refraction.
|
|
||||||
#define AI_MATKEY_IOR "$mat.ior", 0, 0
|
|
||||||
|
|
||||||
// Emissive
|
// Emissive
|
||||||
// --------
|
// --------
|
||||||
#define AI_MATKEY_USE_EMISSIVE_MAP "$mat.useEmissiveMap", 0, 0
|
#define AI_MATKEY_USE_EMISSIVE_MAP "$mat.useEmissiveMap", 0, 0
|
||||||
|
|
Loading…
Reference in New Issue