mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[ts][threejs] Fixed dark tint shader.
This commit is contained in:
parent
9f819b3872
commit
219348e7f4
@ -309,7 +309,7 @@ const spineOnBeforeCompile = (shader: THREE.WebGLProgramParametersWithUniforms)
|
||||
#ifdef USE_SPINE_DARK_TINT
|
||||
#ifdef USE_COLOR_ALPHA
|
||||
diffuseColor.a *= vColor.a;
|
||||
diffuseColor.rgb *= (1.0 - diffuseColor.rgb) * v_dark.rgb + diffuseColor.rgb * vColor.rgb;
|
||||
diffuseColor.rgb = (diffuseColor.a - diffuseColor.rgb) * v_dark.rgb + diffuseColor.rgb * vColor.rgb;
|
||||
#endif
|
||||
#else
|
||||
#ifdef USE_COLOR_ALPHA
|
||||
|
||||
@ -294,7 +294,7 @@ export class SkeletonMesh extends THREE.Object3D {
|
||||
|
||||
let darkColor = this.tempDarkColor;
|
||||
if (!slot.darkColor)
|
||||
darkColor.set(1, 1, 1, 0);
|
||||
darkColor.set(0, 0, 0, 1);
|
||||
else {
|
||||
darkColor.r = slot.darkColor.r * alpha;
|
||||
darkColor.g = slot.darkColor.g * alpha;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user