diff --git a/examples/screenshots/misc_exporter_draco.jpg b/examples/screenshots/misc_exporter_draco.jpg index b47629bfd8d2cf..227f22232b1535 100644 Binary files a/examples/screenshots/misc_exporter_draco.jpg and b/examples/screenshots/misc_exporter_draco.jpg differ diff --git a/examples/screenshots/physics_ammo_terrain.jpg b/examples/screenshots/physics_ammo_terrain.jpg index a7c6855d494329..0655b0cd246543 100644 Binary files a/examples/screenshots/physics_ammo_terrain.jpg and b/examples/screenshots/physics_ammo_terrain.jpg differ diff --git a/examples/webgl_morphtargets.html b/examples/webgl_morphtargets.html index f015010edd11dc..3dbe2e731f986f 100644 --- a/examples/webgl_morphtargets.html +++ b/examples/webgl_morphtargets.html @@ -58,6 +58,7 @@ const material = new THREE.MeshPhongMaterial( { color: 0xff0000, + specular: 0x111111, flatShading: true } ); diff --git a/src/materials/MeshPhongMaterial.js b/src/materials/MeshPhongMaterial.js index 6dfe9e46c27c0d..7dc74609025d92 100644 --- a/src/materials/MeshPhongMaterial.js +++ b/src/materials/MeshPhongMaterial.js @@ -1,4 +1,4 @@ -import { MultiplyOperation, TangentSpaceNormalMap } from '../constants.js'; +import { LinearSRGBColorSpace, MultiplyOperation, TangentSpaceNormalMap } from '../constants.js'; import { Material } from './Material.js'; import { Vector2 } from '../math/Vector2.js'; import { Color } from '../math/Color.js'; @@ -14,7 +14,10 @@ class MeshPhongMaterial extends Material { this.type = 'MeshPhongMaterial'; this.color = new Color( 0xffffff ); // diffuse - this.specular = new Color( 0x111111 ); + + // Preserve original hexadecimal value if ColorManagement is disabled. + this.specular = new Color().setHex( 0x111111, LinearSRGBColorSpace ); + this.shininess = 30; this.map = null; diff --git a/src/renderers/shaders/ShaderLib.js b/src/renderers/shaders/ShaderLib.js index f33fd0ada6be09..2922ee0ab25be6 100644 --- a/src/renderers/shaders/ShaderLib.js +++ b/src/renderers/shaders/ShaderLib.js @@ -5,6 +5,7 @@ import { Vector3 } from '../../math/Vector3.js'; import { UniformsLib } from './UniformsLib.js'; import { Color } from '../../math/Color.js'; import { Matrix3 } from '../../math/Matrix3.js'; +import { LinearSRGBColorSpace } from '../../constants.js'; const ShaderLib = { @@ -64,7 +65,8 @@ const ShaderLib = { UniformsLib.lights, { emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }, - specular: { value: /*@__PURE__*/ new Color( 0x111111 ) }, + // Preserve original hexadecimal value if ColorManagement is disabled. + specular: { value: /*@__PURE__*/ new Color().setHex( 0x111111, LinearSRGBColorSpace ) }, shininess: { value: 30 } } ] ),