mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 00:30:12 +08:00
derp. forgot to revert Gizmo color.
do not calculate alpha when using additive blending
This commit is contained in:
parent
b07e24f910
commit
77b5f36336
@ -286,12 +286,11 @@ public class SkeletonRenderer : MonoBehaviour {
|
||||
vertices[vertexIndex + 3].y = tempVertices[RegionAttachment.Y3];
|
||||
vertices[vertexIndex + 3].z = z;
|
||||
|
||||
color.a = (byte)(a * slot.a * regionAttachment.a);
|
||||
color.a = slot.data.additiveBlending ? (byte) 0 : (byte)(a * slot.a * regionAttachment.a);
|
||||
color.r = (byte)(r * slot.r * regionAttachment.r * color.a);
|
||||
color.g = (byte)(g * slot.g * regionAttachment.g * color.a);
|
||||
color.b = (byte)(b * slot.b * regionAttachment.b * color.a);
|
||||
if (slot.data.additiveBlending)
|
||||
color.a = 0;
|
||||
|
||||
colors[vertexIndex] = color;
|
||||
colors[vertexIndex + 1] = color;
|
||||
colors[vertexIndex + 2] = color;
|
||||
@ -589,7 +588,7 @@ public class SkeletonRenderer : MonoBehaviour {
|
||||
if (mesh == null) return;
|
||||
|
||||
Bounds meshBounds = mesh.bounds;
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.color = Color.clear;
|
||||
Gizmos.matrix = transform.localToWorldMatrix;
|
||||
Gizmos.DrawCube(meshBounds.center, meshBounds.size);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user