glTF KHR_materials_specular fixes
parent
213d73ebc6
commit
a72289b327
|
@ -720,7 +720,7 @@ const vec4 defaultBaseColor = { 1, 1, 1, 1 };
|
|||
const vec3 defaultEmissiveFactor = { 0, 0, 0 };
|
||||
const vec4 defaultDiffuseFactor = { 1, 1, 1, 1 };
|
||||
const vec3 defaultSpecularFactor = { 1, 1, 1 };
|
||||
const vec3 defaultSpecularColorFactor = { 0, 0, 0 };
|
||||
const vec3 defaultSpecularColorFactor = { 1, 1, 1 };
|
||||
const vec3 defaultSheenFactor = { 0, 0, 0 };
|
||||
const vec3 defaultAttenuationColor = { 1, 1, 1 };
|
||||
|
||||
|
|
|
@ -1392,7 +1392,7 @@ inline void PbrSpecularGlossiness::SetDefaults() {
|
|||
inline void MaterialSpecular::SetDefaults() {
|
||||
//KHR_materials_specular properties
|
||||
SetVector(specularColorFactor, defaultSpecularColorFactor);
|
||||
specularFactor = 0.f;
|
||||
specularFactor = 1.f;
|
||||
}
|
||||
|
||||
inline void MaterialSheen::SetDefaults() {
|
||||
|
|
|
@ -730,8 +730,8 @@ bool glTF2Exporter::GetMatSpecular(const aiMaterial &mat, glTF2::MaterialSpecula
|
|||
} else if (colorFactorIsZero) {
|
||||
specular.specularColorFactor[0] = specular.specularColorFactor[1] = specular.specularColorFactor[2] = 1.0f;
|
||||
}
|
||||
GetMatTex(mat, specular.specularColorTexture, aiTextureType_SPECULAR);
|
||||
GetMatTex(mat, specular.specularTexture, aiTextureType_SPECULAR);
|
||||
GetMatTex(mat, specular.specularTexture, aiTextureType_SPECULAR, 0);
|
||||
GetMatTex(mat, specular.specularColorTexture, aiTextureType_SPECULAR, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue