mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-06 18:56:54 +08:00
Fixed premultiplied alpha.
This commit is contained in:
parent
99bafd2971
commit
c202fc5d85
@ -46,7 +46,7 @@ public class SkeletonRendererDebug {
|
|||||||
Attachment attachment = slot.attachment;
|
Attachment attachment = slot.attachment;
|
||||||
if (attachment instanceof RegionAttachment) {
|
if (attachment instanceof RegionAttachment) {
|
||||||
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
||||||
regionAttachment.updateVertices(slot);
|
regionAttachment.updateVertices(slot, false);
|
||||||
float[] vertices = regionAttachment.getVertices();
|
float[] vertices = regionAttachment.getVertices();
|
||||||
renderer.line(vertices[X1], vertices[Y1], vertices[X2], vertices[Y2]);
|
renderer.line(vertices[X1], vertices[Y1], vertices[X2], vertices[Y2]);
|
||||||
renderer.line(vertices[X2], vertices[Y2], vertices[X3], vertices[Y3]);
|
renderer.line(vertices[X2], vertices[Y2], vertices[X3], vertices[Y3]);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ public class RegionSequenceAttachment extends RegionAttachment {
|
|||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateVertices (Slot slot) {
|
public void updateVertices (Slot slot, boolean premultipliedAlpha) {
|
||||||
if (regions == null) throw new IllegalStateException("Regions have not been set: " + this);
|
if (regions == null) throw new IllegalStateException("Regions have not been set: " + this);
|
||||||
|
|
||||||
int frameIndex = (int)(slot.getAttachmentTime() / frameTime);
|
int frameIndex = (int)(slot.getAttachmentTime() / frameTime);
|
||||||
@ -68,7 +68,7 @@ public class RegionSequenceAttachment extends RegionAttachment {
|
|||||||
}
|
}
|
||||||
setRegion(regions[frameIndex]);
|
setRegion(regions[frameIndex]);
|
||||||
|
|
||||||
super.updateVertices(slot);
|
super.updateVertices(slot, premultipliedAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextureRegion[] getRegions () {
|
public TextureRegion[] getRegions () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user