Skip to content

Commit

Permalink
shadertools: specularColor tests (#2172)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer authored Aug 9, 2024
1 parent a88537e commit 8d64745
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test('shadertools#gouraudMaterial', t => {
t.is(uniforms.ambient, 0, 'ambient');
t.is(uniforms.diffuse, 0, 'diffuse');
t.is(uniforms.shininess, 0, 'shininess');
t.deepEqual(uniforms.specularColor, [255, 0, 0], 'specularColor');
t.deepEqual(uniforms.specularColor, [1, 0, 0], 'specularColor');

// uniforms = gouraudMaterial.getUniforms({
// material: null
Expand All @@ -39,11 +39,7 @@ test('shadertools#gouraudMaterial', t => {
t.equal(uniforms.ambient, 0.35, 'ambient');
t.equal(uniforms.diffuse, 0.6, 'diffuse');
t.equal(uniforms.shininess, 32, 'shininess');
// t.deepEqual(
// uniforms.specularColor,
// [30 / 255, 30 / 255, 30 / 255],
// 'specularColor'
// );
t.deepEqual(uniforms.specularColor, [0.15, 0.15, 0.15], 'specularColor');

t.end();
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test('shadertools#phongMaterial', t => {
t.is(uniforms.ambient, 0, 'ambient');
t.is(uniforms.diffuse, 0, 'diffuse');
t.is(uniforms.shininess, 0, 'shininess');
t.deepEqual(uniforms.specularColor, [255, 0, 0], 'specularColor');
t.deepEqual(uniforms.specularColor, [1, 0, 0], 'specularColor');

// uniforms = phongMaterial.getUniforms({
// material: null
Expand All @@ -35,11 +35,7 @@ test('shadertools#phongMaterial', t => {
t.equal(uniforms.ambient, 0.35, 'ambient');
t.equal(uniforms.diffuse, 0.6, 'diffuse');
t.equal(uniforms.shininess, 32, 'shininess');
// t.deepEqual(
// uniforms.specularColor,
// [30 / 255, 30 / 255, 30 / 255],
// 'specularColor'
// );
t.deepEqual(uniforms.specularColor, [0.15, 0.15, 0.15], 'specularColor');

t.end();
});

0 comments on commit 8d64745

Please sign in to comment.