Fix dilate when using multiple atlases

This commit is contained in:
luboslenco
2021-01-18 13:04:28 +01:00
parent b6f33c7052
commit 25934bf4e1
3 changed files with 6 additions and 1 deletions
+2
View File
@@ -17,6 +17,7 @@ import arm.data.LayerSlot;
import arm.node.MakeMaterial;
import arm.render.RenderPathPaint;
import arm.util.MeshUtil;
import arm.util.UVUtil;
import arm.Enums;
import arm.ProjectFormat;
@@ -613,6 +614,7 @@ class Layers {
Context.paintObject.skip_context = "paint";
Context.mergedObject.visible = true;
}
UVUtil.dilatemapCached = false;
}
public static function newLayer(clear = true): LayerSlot {
+1
View File
@@ -64,6 +64,7 @@ class ImportMesh {
});
// No mask by default
for (p in Project.paintObjects) p.visible = true;
if (Context.mergedObject == null) MeshUtil.mergeMesh();
Context.paintObject.skip_context = "paint";
Context.mergedObject.visible = true;
+3 -1
View File
@@ -126,7 +126,9 @@ class UVUtil {
// dilateTexUnpack = pipeDilate.getConstantLocation("texUnpack");
}
var geom = Context.mergedObject != null ? Context.mergedObject.data.geom : Context.paintObject.data.geom;
var mask = Context.objectMaskUsed() ? Context.layer.objectMask : 0;
if (Context.layerFilterUsed()) mask = Context.layerFilter;
var geom = mask == 0 && Context.mergedObject != null ? Context.mergedObject.data.geom : Context.paintObject.data.geom;
var g4 = dilatemap.g4;
g4.begin();
g4.clear(0x00000000);