[orx-poisson-fill] Use appropriate FilterNto1 interfaces

This commit is contained in:
Edwin Jakobs
2022-12-28 14:07:39 +01:00
parent 19593ca6cd
commit d13c5a18e6
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ internal class PassthroughNoAlpha : Filter(filterShaderFromUrl(resourceUrl("/sha
/** /**
* Laplacian filter * Laplacian filter
*/ */
class Laplacian : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/laplacian.frag"))) class Laplacian : Filter1to1(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/laplacian.frag")))
class LaplacianIntegrator(width: Int, height: Int, downscaling: Int = 1, type: ColorType = ColorType.FLOAT32) { class LaplacianIntegrator(width: Int, height: Int, downscaling: Int = 1, type: ColorType = ColorType.FLOAT32) {
private val pyramid = ConvolutionPyramid(2 + width / downscaling, 2 + height / downscaling, type = type) private val pyramid = ConvolutionPyramid(2 + width / downscaling, 2 + height / downscaling, type = type)

View File

@@ -39,7 +39,7 @@ class PoissonFiller(val width: Int, val height: Int, type: ColorType = ColorType
/** /**
* Poison filling as a filter * Poison filling as a filter
*/ */
class PoissonFill : Filter() { class PoissonFill : Filter1to1() {
private var filler: PoissonFiller? = null private var filler: PoissonFiller? = null
override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>) { override fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>) {
if (target.isNotEmpty()) { if (target.isNotEmpty()) {