Skip to content

Commit

Permalink
Fix for Windows. (And generally a good idea.)
Browse files Browse the repository at this point in the history
  • Loading branch information
zellski committed Dec 1, 2017
1 parent 21305ba commit a9c4fb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Raw2Gltf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,8 @@ ModelData *Raw2Gltf(
getPerceivedBrightness(specular),
oneMinus);

Vec3f fromDiffuse = diffuse.xyz() * (oneMinus / (1.0 - dielectric.x) / fmax(1.0 - pixelMet, epsilon));
Vec3f fromSpecular = specular - dielectric * (1.0 - pixelMet) * (1.0 / fmax(pixelMet, epsilon));
Vec3f fromDiffuse = diffuse.xyz() * (oneMinus / (1.0f - dielectric.x) / fmax(1.0f - pixelMet, epsilon));
Vec3f fromSpecular = specular - dielectric * (1.0f - pixelMet) * (1.0f / fmax(pixelMet, epsilon));
Vec3f baseColor = Vec3f::Lerp(fromDiffuse, fromSpecular, pixelMet * pixelMet);

return { baseColor[0], baseColor[1], baseColor[2], diffuse[3] };
Expand Down

0 comments on commit a9c4fb1

Please sign in to comment.