mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fix PMA for SkeletonRenderSeparator.
This commit is contained in:
parent
1fafe6bd40
commit
fbd8e32c06
@ -28,6 +28,7 @@ namespace Spine.Unity.MeshGeneration {
|
|||||||
MeshAndMaterials GenerateMesh (ExposedList<SubmeshInstruction> instructions, int startSubmesh, int endSubmesh);
|
MeshAndMaterials GenerateMesh (ExposedList<SubmeshInstruction> instructions, int startSubmesh, int endSubmesh);
|
||||||
|
|
||||||
float ZSpacing { get; set; }
|
float ZSpacing { get; set; }
|
||||||
|
bool PremultiplyVertexColors { get; set; }
|
||||||
bool AddNormals { get; set; }
|
bool AddNormals { get; set; }
|
||||||
bool AddTangents { get; set; }
|
bool AddTangents { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,6 +137,7 @@ namespace Spine.Unity.Modules {
|
|||||||
var currentRenderer = partsRenderers[rendererIndex];
|
var currentRenderer = partsRenderers[rendererIndex];
|
||||||
bool addNormals = skeletonRenderer.calculateNormals;
|
bool addNormals = skeletonRenderer.calculateNormals;
|
||||||
bool addTangents = skeletonRenderer.calculateTangents;
|
bool addTangents = skeletonRenderer.calculateTangents;
|
||||||
|
bool pmaVertexColors = skeletonRenderer.pmaVertexColors;
|
||||||
|
|
||||||
for (int si = 0, start = 0; si <= lastSubmeshInstruction; si++) {
|
for (int si = 0, start = 0; si <= lastSubmeshInstruction; si++) {
|
||||||
if (submeshInstructionsItems[si].forceSeparate || si == lastSubmeshInstruction) {
|
if (submeshInstructionsItems[si].forceSeparate || si == lastSubmeshInstruction) {
|
||||||
@ -144,6 +145,7 @@ namespace Spine.Unity.Modules {
|
|||||||
var meshGenerator = currentRenderer.MeshGenerator;
|
var meshGenerator = currentRenderer.MeshGenerator;
|
||||||
meshGenerator.AddNormals = addNormals;
|
meshGenerator.AddNormals = addNormals;
|
||||||
meshGenerator.AddTangents = addTangents;
|
meshGenerator.AddTangents = addTangents;
|
||||||
|
meshGenerator.PremultiplyVertexColors = pmaVertexColors;
|
||||||
if (copyPropertyBlock)
|
if (copyPropertyBlock)
|
||||||
currentRenderer.SetPropertyBlock(copiedBlock);
|
currentRenderer.SetPropertyBlock(copiedBlock);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user