Skip to content

Commit

Permalink
fix: clash with specular color texture
Browse files Browse the repository at this point in the history
see: see mgsx-dev#113
  • Loading branch information
dar-dev committed Aug 8, 2023
1 parent 8104cd8 commit fdb7570
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ public Material loadMaterial(GLTFMaterial glMaterial)
material.set(getTexureMap(PBRTextureAttribute.Diffuse, ext.diffuseTexture));
}
if(ext.specularGlossinessTexture != null){
material.set(getTexureMap(PBRTextureAttribute.Specular, ext.specularGlossinessTexture));
// ClassX: clash with specular color texture, see https://github.com/mgsx-dev/gdx-gltf/issues/113
// by commenting this line we load the specularGlossiness without crashing (i.e. SpecGlossVsMetalRough.glb)
//material.set(getTexureMap(PBRTextureAttribute.Specular, ext.specularGlossinessTexture));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ protected Shader createShader(Renderable renderable) {
prefix += "#define specularFactorTextureFlag\n";
hasSpecular = true;
}
if(renderable.material.has(PBRTextureAttribute.SpecularColorTexture)){
if(renderable.material.has(PBRTextureAttribute.Specular)){
prefix += "#define specularColorTextureFlag\n";
hasSpecular = true;
}
Expand Down

0 comments on commit fdb7570

Please sign in to comment.