Bump OPENRNDR to 0.3.37
This commit is contained in:
3
orx-poisson-fill/build.gradle
Normal file
3
orx-poisson-fill/build.gradle
Normal file
@@ -0,0 +1,3 @@
|
||||
dependencies {
|
||||
compile project(":orx-fx")
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package org.openrndr.poissonfill
|
||||
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.filter.blend.passthrough
|
||||
import org.openrndr.extra.fx.blend.Passthrough
|
||||
import org.openrndr.math.IntVector2
|
||||
import org.openrndr.resourceUrl
|
||||
import kotlin.math.ceil
|
||||
@@ -39,6 +39,7 @@ internal class Convolution(filterUrl: String = "/shaders/gl3/poisson/filter.frag
|
||||
}
|
||||
}
|
||||
|
||||
private val passthrough by lazy { Passthrough() }
|
||||
internal class ConvolutionPyramid(width: Int, height: Int,
|
||||
private val padding: Int = 0, cutOff: Int = 10000,
|
||||
private val downscale: Downscale = Downscale(),
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package org.openrndr.poissonfill
|
||||
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.filter.blend.subtract
|
||||
import org.openrndr.extra.fx.blend.Passthrough
|
||||
import org.openrndr.extra.fx.blend.Subtract
|
||||
import org.openrndr.resourceUrl
|
||||
|
||||
internal class BlendBoundary : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/poisson/blend-boundary.frag")))
|
||||
@@ -19,6 +20,9 @@ internal class Clamp : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/pois
|
||||
var maxValue: Double by parameters
|
||||
}
|
||||
|
||||
private val passthrough by lazy { Passthrough() }
|
||||
private val subtract by lazy { Subtract() }
|
||||
|
||||
class PoissonBlender(width: Int, height: Int, type: ColorType = ColorType.FLOAT32) {
|
||||
private val pyramid = ConvolutionPyramid(width, height, 0, type = type)
|
||||
private val preprocess = colorBuffer(width, height, type = type)
|
||||
|
||||
Reference in New Issue
Block a user