Skip to content

Commit

Permalink
fix: Fix MToon default parameters
Browse files Browse the repository at this point in the history
Default values for `shadeColorFactor`, `parametricRimFresnelPowerFactor`, `matcapFactor`, `rimLightingMixFactor`, `outlineWidthFactor` are different from the spec

Spec: https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_materials_mtoon-1.0

See: #1403
  • Loading branch information
0b5vr committed May 16, 2024
1 parent 265cfa8 commit 25cc2ba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/three-vrm-materials-mtoon/src/MToonMaterial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export class MToonMaterial extends THREE.ShaderMaterial {
mapUvTransform: { value: new THREE.Matrix3() },
colorAlpha: { value: 1.0 },
normalMapUvTransform: { value: new THREE.Matrix3() },
shadeColorFactor: { value: new THREE.Color(0.97, 0.81, 0.86) },
shadeColorFactor: { value: new THREE.Color(0.0, 0.0, 0.0) },
shadeMultiplyTexture: { value: null },
shadeMultiplyTextureUvTransform: { value: new THREE.Matrix3() },
shadingShiftFactor: { value: 0.0 },
Expand All @@ -422,21 +422,21 @@ export class MToonMaterial extends THREE.ShaderMaterial {
shadingShiftTextureScale: { value: 1.0 },
shadingToonyFactor: { value: 0.9 },
giEqualizationFactor: { value: 0.9 },
matcapFactor: { value: new THREE.Color(0.0, 0.0, 0.0) },
matcapFactor: { value: new THREE.Color(1.0, 1.0, 1.0) },
matcapTexture: { value: null },
matcapTextureUvTransform: { value: new THREE.Matrix3() },
parametricRimColorFactor: { value: new THREE.Color(0.0, 0.0, 0.0) },
rimMultiplyTexture: { value: null },
rimMultiplyTextureUvTransform: { value: new THREE.Matrix3() },
rimLightingMixFactor: { value: 0.0 },
parametricRimFresnelPowerFactor: { value: 1.0 },
rimLightingMixFactor: { value: 1.0 },
parametricRimFresnelPowerFactor: { value: 5.0 },
parametricRimLiftFactor: { value: 0.0 },
emissive: { value: new THREE.Color(0.0, 0.0, 0.0) },
emissiveIntensity: { value: 1.0 },
emissiveMapUvTransform: { value: new THREE.Matrix3() },
outlineWidthMultiplyTexture: { value: null },
outlineWidthMultiplyTextureUvTransform: { value: new THREE.Matrix3() },
outlineWidthFactor: { value: 0.5 },
outlineWidthFactor: { value: 0.0 },
outlineColorFactor: { value: new THREE.Color(0.0, 0.0, 0.0) },
outlineLightingMixFactor: { value: 1.0 },
uvAnimationMaskTexture: { value: null },
Expand Down

0 comments on commit 25cc2ba

Please sign in to comment.