Remove normal depth
Scaling normal depth (y axis) makes disappear the specular of fragments... So I think it can be removed, it is not a very useful/important attribute.
This commit is contained in:
parent
0ff26f527f
commit
f2d61d4043
4 changed files with 1 additions and 7 deletions
|
@ -756,7 +756,6 @@ Material LoadDefaultMaterial(void)
|
||||||
material.colSpecular = WHITE; // Specular color
|
material.colSpecular = WHITE; // Specular color
|
||||||
|
|
||||||
material.glossiness = 100.0f; // Glossiness level
|
material.glossiness = 100.0f; // Glossiness level
|
||||||
material.normalDepth = 1.0f; // Normal map depth
|
|
||||||
|
|
||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,7 +419,6 @@ typedef struct Material {
|
||||||
Color colSpecular; // Specular color
|
Color colSpecular; // Specular color
|
||||||
|
|
||||||
float glossiness; // Glossiness level (Ranges from 0 to 1000)
|
float glossiness; // Glossiness level (Ranges from 0 to 1000)
|
||||||
float normalDepth; // Normal map depth
|
|
||||||
} Material;
|
} Material;
|
||||||
|
|
||||||
// Model type
|
// Model type
|
||||||
|
|
|
@ -1816,9 +1816,6 @@ void rlglDrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||||
glActiveTexture(GL_TEXTURE1);
|
glActiveTexture(GL_TEXTURE1);
|
||||||
glBindTexture(GL_TEXTURE_2D, material.texNormal.id);
|
glBindTexture(GL_TEXTURE_2D, material.texNormal.id);
|
||||||
glUniform1i(material.shader.mapTexture1Loc, 1); // Normal texture fits in active texture unit 1
|
glUniform1i(material.shader.mapTexture1Loc, 1); // Normal texture fits in active texture unit 1
|
||||||
|
|
||||||
// TODO: Upload to shader normalDepth
|
|
||||||
//glUniform1f(???, material.normalDepth);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((material.texSpecular.id != 0) && (material.shader.mapTexture2Loc != -1))
|
if ((material.texSpecular.id != 0) && (material.shader.mapTexture2Loc != -1))
|
||||||
|
@ -2565,7 +2562,7 @@ static Shader LoadDefaultShader(void)
|
||||||
// Load standard shader
|
// Load standard shader
|
||||||
// NOTE: This shader supports:
|
// NOTE: This shader supports:
|
||||||
// - Up to 3 different maps: diffuse, normal, specular
|
// - Up to 3 different maps: diffuse, normal, specular
|
||||||
// - Material properties: colAmbient, colDiffuse, colSpecular, glossiness, normalDepth
|
// - Material properties: colAmbient, colDiffuse, colSpecular, glossiness
|
||||||
// - Up to 8 lights: Point, Directional or Spot
|
// - Up to 8 lights: Point, Directional or Spot
|
||||||
static Shader LoadStandardShader(void)
|
static Shader LoadStandardShader(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -207,7 +207,6 @@ typedef enum { OPENGL_11 = 1, OPENGL_33, OPENGL_ES_20 } GlVersion;
|
||||||
Color colSpecular; // Specular color
|
Color colSpecular; // Specular color
|
||||||
|
|
||||||
float glossiness; // Glossiness level (Ranges from 0 to 1000)
|
float glossiness; // Glossiness level (Ranges from 0 to 1000)
|
||||||
float normalDepth; // Normal map depth
|
|
||||||
} Material;
|
} Material;
|
||||||
|
|
||||||
// Light type
|
// Light type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue