mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-11 05:48:14 +00:00
Improved MTL loading shininess value
This commit is contained in:
@@ -2068,7 +2068,11 @@ static Material LoadMTL(const char *fileName)
|
|||||||
{
|
{
|
||||||
if (buffer[1] == 's') // Ns int Shininess (specular exponent). Ranges from 0 to 1000.
|
if (buffer[1] == 's') // Ns int Shininess (specular exponent). Ranges from 0 to 1000.
|
||||||
{
|
{
|
||||||
sscanf(buffer, "Ns %f", &material.glossiness);
|
int shininess = 0;
|
||||||
|
sscanf(buffer, "Ns %i", &shininess);
|
||||||
|
|
||||||
|
// Normalize shininess value to material glossiness attribute
|
||||||
|
material.glossiness = (float)shininess/1000;
|
||||||
}
|
}
|
||||||
else if (buffer[1] == 'i') // Ni int Refraction index.
|
else if (buffer[1] == 'i') // Ni int Refraction index.
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user