Skip to content

Commit

Permalink
Merge pull request #319 from shehzan10/decimal0-string
Browse files Browse the repository at this point in the history
Fix 0.0 to string makes it 0 which fails the shader compilation
  • Loading branch information
lilleyse committed Sep 26, 2017
2 parents 914fb57 + 665ab16 commit 793bca2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/processModelMaterialsCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ function generateTechnique(gltf, materialId, khrMaterialsCommon, lightParameters
} else {
fragmentLightingBlock += ' vec3 l = vec3(0.0, 0.0, 1.0);\n';
}
var minimumLighting = optimizeForCesium ? 0.2 : 0.0;
var minimumLighting = optimizeForCesium ? '0.2' : '0.0'; // Use strings instead of values as 0.0 -> 0 when stringified
fragmentLightingBlock += ' diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), ' + minimumLighting + ');\n';

if (hasSpecular) {
Expand Down

0 comments on commit 793bca2

Please sign in to comment.