|
|
@ -336,8 +336,7 @@ public class MaterialLoader implements AssetLoader { |
|
|
|
mat.setName(matName); |
|
|
|
mat.setName(matName); |
|
|
|
if (blend){ |
|
|
|
if (blend){ |
|
|
|
RenderState rs = mat.getAdditionalRenderState(); |
|
|
|
RenderState rs = mat.getAdditionalRenderState(); |
|
|
|
rs.setAlphaTest(true); |
|
|
|
mat.setFloat("AlphaDiscardThreshold", 0.01f); |
|
|
|
rs.setAlphaFallOff(0.01f); |
|
|
|
|
|
|
|
rs.setBlendMode(RenderState.BlendMode.Alpha); |
|
|
|
rs.setBlendMode(RenderState.BlendMode.Alpha); |
|
|
|
|
|
|
|
|
|
|
|
if (twoSide){ |
|
|
|
if (twoSide){ |
|
|
@ -422,13 +421,18 @@ public class MaterialLoader implements AssetLoader { |
|
|
|
|
|
|
|
|
|
|
|
noLight = false; |
|
|
|
noLight = false; |
|
|
|
Arrays.fill(textures, null); |
|
|
|
Arrays.fill(textures, null); |
|
|
|
|
|
|
|
ambient = null; |
|
|
|
diffuse = null; |
|
|
|
diffuse = null; |
|
|
|
specular = null; |
|
|
|
specular = null; |
|
|
|
|
|
|
|
emissive = null; |
|
|
|
shinines = 0f; |
|
|
|
shinines = 0f; |
|
|
|
vcolor = false; |
|
|
|
vcolor = false; |
|
|
|
blend = false; |
|
|
|
blend = false; |
|
|
|
texUnit = 0; |
|
|
|
texUnit = 0; |
|
|
|
separateTexCoord = false; |
|
|
|
separateTexCoord = false; |
|
|
|
|
|
|
|
twoSide = false; |
|
|
|
|
|
|
|
matName = null; |
|
|
|
|
|
|
|
texName = null; |
|
|
|
return mat; |
|
|
|
return mat; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -464,7 +468,7 @@ public class MaterialLoader implements AssetLoader { |
|
|
|
} |
|
|
|
} |
|
|
|
readMaterial(statement); |
|
|
|
readMaterial(statement); |
|
|
|
Material mat = compileMaterial(); |
|
|
|
Material mat = compileMaterial(); |
|
|
|
list.put(matName, mat); |
|
|
|
list.put(mat.getName(), mat); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|