Added ContourPoints and Threshold filters

This commit is contained in:
Edwin Jakobs
2018-10-05 20:57:04 +02:00
parent 862f5aa07d
commit 540113c9ac
3 changed files with 41 additions and 0 deletions

View File

@@ -12,10 +12,14 @@ class JumpFlood : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/jumpflood
}
class PixelDistance : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/pixel-distance.frag")))
class ContourPoints : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/contour-points.frag")))
class Threshold : Filter(filterShaderFromUrl(resourceUrl("/shaders/gl3/threshold.frag")))
val encodePoints by lazy { EncodePoints() }
val jumpFlood by lazy { JumpFlood() }
val pixelDistance by lazy { PixelDistance() }
val contourPoints by lazy { ContourPoints() }
val threshold by lazy { Threshold() }
/** [points] is square and power of 2 */
fun jumpFlood(points: ColorBuffer, coordinates: List<ColorBuffer>) {