[orx-fx, orx-jumpflood] Match changes to Filter

This commit is contained in:
Edwin Jakobs
2023-12-14 17:52:09 +01:00
parent ad9177e085
commit 3ec3f0bafb
39 changed files with 162 additions and 118 deletions

View File

@@ -11,6 +11,7 @@ import org.openrndr.extra.parameters.Description
import org.openrndr.extra.parameters.DoubleParameter
import org.openrndr.math.Vector2
import org.openrndr.resourceUrl
import org.openrndr.shape.Rectangle
private class OuterGlowFilter : Filter(filterShaderFromCode(jf_outer_glow, "outer-glow")) {
var angle: Double by parameters
@@ -57,7 +58,7 @@ class OuterGlow : Filter1to1() {
private var distance: ColorBuffer? = null
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>) {
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>, clip: Rectangle?) {
if (jumpFlooder == null) {
jumpFlooder = JumpFlooder(target[0].width, target[0].height, encodePoints = EncodeSubpixel())
}
@@ -74,6 +75,6 @@ class OuterGlow : Filter1to1() {
glowFilter.noise = noise
glowFilter.shape = shape
glowFilter.imageOpacity = imageOpacity
glowFilter.apply(arrayOf(source[0], distance!!), target[0])
glowFilter.apply(arrayOf(source[0], distance!!), target[0], clip)
}
}