Fix ShapeSDF in case no distortion map is given
This commit is contained in:
@@ -39,7 +39,6 @@ fun main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
extend {
|
extend {
|
||||||
|
|
||||||
drawer.background(ColorRGBa.PINK)
|
drawer.background(ColorRGBa.PINK)
|
||||||
|
|
||||||
fd.apply(emptyArray(), uvmap)
|
fd.apply(emptyArray(), uvmap)
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ class ShapeSDF : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/shape-sdf.
|
|||||||
parameters["fromBuffer"] = fromBuffer
|
parameters["fromBuffer"] = fromBuffer
|
||||||
parameters["toBuffer"] = toBuffer
|
parameters["toBuffer"] = toBuffer
|
||||||
parameters["segmentCount"] = segmentCount
|
parameters["segmentCount"] = segmentCount
|
||||||
super.apply(source, target)
|
// -- bit of an hack
|
||||||
|
val effectiveSource = if (source.isNotEmpty()) source else target
|
||||||
|
super.apply(effectiveSource, target)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user