Skip to content

Commit

Permalink
Fix test failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Sep 22, 2016
1 parent 66b347e commit 02524f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Specs/Core/TerrainEncodingSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ defineSuite([
expect(encoding.getStride()).toEqual(3);
expect(buffer.length).toEqual(encoding.getStride());

expect(encoding.decodeTextureCoordinates(buffer, 0)).toEqualEpsilon(texCoords, CesiumMath.EPSILON14);
expect(encoding.decodeTextureCoordinates(buffer, 0)).toEqualEpsilon(texCoords, 1.0 / 4095.0);
});

it('encodes textureCoordinates with quantization and normals', function() {
Expand All @@ -198,7 +198,7 @@ defineSuite([
expect(encoding.getStride()).toEqual(4);
expect(buffer.length).toEqual(encoding.getStride());

expect(encoding.decodeTextureCoordinates(buffer, 0)).toEqualEpsilon(texCoords, CesiumMath.EPSILON14);
expect(encoding.decodeTextureCoordinates(buffer, 0)).toEqualEpsilon(texCoords, 1.0 / 4095.0);
});

it('encodes height with quantization and without normals', function() {
Expand All @@ -214,7 +214,7 @@ defineSuite([
expect(encoding.getStride()).toEqual(3);
expect(buffer.length).toEqual(encoding.getStride());

expect(encoding.decodeHeight(buffer, 0)).toEqualEpsilon(height, CesiumMath.EPSILON14);
expect(encoding.decodeHeight(buffer, 0)).toEqualEpsilon(height, 200.0 / 4095.0);
});

it('encodes height with quantization and normals', function() {
Expand All @@ -230,7 +230,7 @@ defineSuite([
expect(encoding.getStride()).toEqual(4);
expect(buffer.length).toEqual(encoding.getStride());

expect(encoding.decodeHeight(buffer, 0)).toEqualEpsilon(height, CesiumMath.EPSILON14);
expect(encoding.decodeHeight(buffer, 0)).toEqualEpsilon(height, 200.0 / 4095.0);
});

it('gets oct-encoded normal', function() {
Expand Down
2 changes: 1 addition & 1 deletion Specs/Renderer/BuiltinFunctionsSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ defineSuite([
it('has czm_decompressTextureCoordinates', function() {
var fs =
'void main() { ' +
' gl_FragColor = vec4(czm_decompressTextureCoordinates(8390656.0) == vec2(0.5, 0.5)); ' +
' gl_FragColor = vec4(czm_decompressTextureCoordinates(8386559.0) == vec2(0.4998779, 0.4998779)); ' +
'}';
context.verifyDrawForSpecs(fs);
});
Expand Down

0 comments on commit 02524f0

Please sign in to comment.