[orx-integral-image, orx-poisson-fill, orx-dnk3] Match changes in Filter

This commit is contained in:
Edwin Jakobs
2023-12-14 18:10:01 +01:00
parent 3ec3f0bafb
commit d2cd12a0b0
4 changed files with 13 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ import org.openrndr.extra.fx.blend.Subtract
import org.openrndr.filter.color.delinearize
import org.openrndr.filter.color.linearize
import org.openrndr.resourceUrl
import org.openrndr.shape.Rectangle
internal class BlendBoundary : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/blend-boundary.frag")))
class AlphaToBitmap : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/alpha-to-bitmap.frag")))
@@ -71,7 +72,8 @@ class PoissonBlend: Filter2to1() {
val alphaToBitmap = AlphaToBitmap()
var mask: ColorBuffer? = null
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>) {
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>, clip: Rectangle?) {
require(clip == null)
if (target.isNotEmpty()) {
mask?.let {

View File

@@ -2,6 +2,7 @@ package org.openrndr.poissonfill
import org.openrndr.draw.*
import org.openrndr.resourceUrl
import org.openrndr.shape.Rectangle
internal class FillBoundary : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/fill-boundary.frag")))
internal class FillCombine : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/fill-combine.frag")))
@@ -41,7 +42,8 @@ class PoissonFiller(val width: Int, val height: Int, type: ColorType = ColorType
*/
class PoissonFill : Filter1to1() {
private var filler: PoissonFiller? = null
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>) {
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>, clip: Rectangle?) {
require(clip == null)
if (target.isNotEmpty()) {
filler?.let {
if (it.width != target[0].effectiveWidth || it.height != target[0].effectiveHeight) {