Bugfix: fixes to specular shininess loading.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10763 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
b4dfd528ee
commit
1b17c4fd04
@ -91,15 +91,14 @@ public final class MaterialContext {
|
||||
int spec_shader = ((Number) structure.getFieldValue("spec_shader")).intValue();
|
||||
specularShader = SpecularShader.values()[spec_shader];
|
||||
specularColor = this.readSpecularColor(structure, specularShader);
|
||||
float shininess = ((Number) structure.getFieldValue("har")).floatValue();//this is (probably) the specular hardness in blender
|
||||
this.shininess = shininess > 0.0f ? shininess : MaterialHelper.DEFAULT_SHININESS;
|
||||
|
||||
float r = ((Number) structure.getFieldValue("ambr")).floatValue();
|
||||
float g = ((Number) structure.getFieldValue("ambg")).floatValue();
|
||||
float b = ((Number) structure.getFieldValue("ambb")).floatValue();
|
||||
float alpha = ((Number) structure.getFieldValue("alpha")).floatValue();
|
||||
ambientColor = new ColorRGBA(r, g, b, alpha);
|
||||
|
||||
float shininess = ((Number) structure.getFieldValue("emit")).floatValue();
|
||||
this.shininess = shininess > 0.0f ? shininess : MaterialHelper.DEFAULT_SHININESS;
|
||||
}
|
||||
|
||||
DynamicArray<Pointer> mtexsArray = (DynamicArray<Pointer>) structure.getFieldValue("mtex");
|
||||
@ -207,9 +206,9 @@ public final class MaterialContext {
|
||||
|
||||
material.setBoolean("WardIso", specularShader == SpecularShader.WARDISO);
|
||||
material.setColor("Specular", specularColor);
|
||||
material.setFloat("Shininess", shininess);
|
||||
|
||||
material.setColor("Ambient", ambientColor);
|
||||
material.setFloat("Shininess", shininess);
|
||||
}
|
||||
|
||||
// applying textures
|
||||
|
Loading…
x
Reference in New Issue
Block a user