[orx-fx] Use the appropriate FilterNto1 interfaces
* Fix webgl 2 compatibility * Add LumaLaplacian, ACESTonemap, ReinhardTonemap, DirectionalHashBlur
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
package org.openrndr.extra.fx.distort
|
||||
|
||||
import org.openrndr.draw.ColorBuffer
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.draw.MagnifyingFilter
|
||||
import org.openrndr.draw.MinifyingFilter
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extra.fx.fx_block_repeat
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.BooleanParameter
|
||||
@@ -11,7 +8,7 @@ import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.parameters.DoubleParameter
|
||||
|
||||
@Description("Block repeat")
|
||||
class BlockRepeat : Filter(mppFilterShader(fx_block_repeat, "block-repeat")) {
|
||||
class BlockRepeat : Filter1to1(mppFilterShader(fx_block_repeat, "block-repeat")) {
|
||||
@DoubleParameter("block width", 0.0, 1.0, order = 0)
|
||||
var blockWidth: Double by parameters
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extra.parameters.DoubleParameter
|
||||
import org.openrndr.math.Vector3
|
||||
|
||||
@Description("Displace blend")
|
||||
class DisplaceBlend : Filter(mppFilterShader(fx_displace_blend, "displace-blend")) {
|
||||
class DisplaceBlend : Filter2to1(mppFilterShader(fx_displace_blend, "displace-blend")) {
|
||||
var seed: Vector3 by parameters
|
||||
|
||||
@DoubleParameter("offset", -1.0, 1.0)
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.parameters.DoubleParameter
|
||||
|
||||
@Description("Fisheye")
|
||||
class Fisheye : Filter(mppFilterShader(fx_fisheye, "fisheye")) {
|
||||
class Fisheye : Filter1to1(mppFilterShader(fx_fisheye, "fisheye")) {
|
||||
@DoubleParameter("strength", -1.0, 1.0, order = 0)
|
||||
var strength: Double by parameters
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package org.openrndr.extra.fx.distort
|
||||
|
||||
import org.openrndr.draw.ColorBuffer
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.draw.createEquivalent
|
||||
import org.openrndr.draw.isEquivalentTo
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extra.fx.fx_fluid_distort
|
||||
import org.openrndr.extra.fx.fx_uvmap
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
@@ -20,7 +17,7 @@ private class FluidDistortFilter : Filter(mppFilterShader(fx_fluid_distort, "flu
|
||||
}
|
||||
}
|
||||
|
||||
class FluidDistort : Filter() {
|
||||
class FluidDistort : Filter1to1() {
|
||||
var blend: Double = 1.0
|
||||
|
||||
var outputUV = false
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package org.openrndr.extra.fx.distort
|
||||
|
||||
import org.openrndr.draw.ColorBuffer
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.draw.MagnifyingFilter
|
||||
import org.openrndr.draw.MinifyingFilter
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extra.fx.fx_lenses
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.BooleanParameter
|
||||
@@ -12,7 +9,7 @@ import org.openrndr.extra.parameters.DoubleParameter
|
||||
import org.openrndr.extra.parameters.IntParameter
|
||||
|
||||
@Description("Lenses")
|
||||
class Lenses : Filter(mppFilterShader(fx_lenses, "block-repeat")) {
|
||||
class Lenses : Filter1to1(mppFilterShader(fx_lenses, "block-repeat")) {
|
||||
@IntParameter("rows", 1, 64, order = 0)
|
||||
var rows: Int by parameters
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.transforms.transform
|
||||
|
||||
@Description("Perspective plane")
|
||||
class PerspectivePlane : Filter(mppFilterShader(fx_perspective_plane, "perspective-plane")) {
|
||||
class PerspectivePlane : Filter1to1(mppFilterShader(fx_perspective_plane, "perspective-plane")) {
|
||||
// @DoubleParameter("camera x", -1.0, 1.0, order = 0)
|
||||
var cameraX: Double = 0.0
|
||||
// @DoubleParameter("camera y", -1.0, 1.0, order = 1)
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.math.Vector2
|
||||
import org.openrndr.math.Vector3
|
||||
|
||||
@Description("Perturb")
|
||||
class Perturb : Filter(mppFilterShader(fx_perturb, "perturb")) {
|
||||
class Perturb : Filter1to1(mppFilterShader(fx_perturb, "perturb")) {
|
||||
var seed: Vector3 by parameters
|
||||
/**
|
||||
* base noise scale, default is Vector3(1.0, 1.0, 1.0)
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package org.openrndr.extra.fx.distort
|
||||
|
||||
import org.openrndr.draw.ColorBuffer
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.draw.MagnifyingFilter
|
||||
import org.openrndr.draw.MinifyingFilter
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extra.fx.fx_polar_to_rectangular
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.BooleanParameter
|
||||
@@ -12,7 +9,7 @@ import org.openrndr.extra.parameters.Vector2Parameter
|
||||
import org.openrndr.math.Vector2
|
||||
|
||||
@Description("Polar to rectangular")
|
||||
class PolarToRectangular : Filter(mppFilterShader(fx_polar_to_rectangular, "polar-to-rectangular")) {
|
||||
class PolarToRectangular : Filter1to1(mppFilterShader(fx_polar_to_rectangular, "polar-to-rectangular")) {
|
||||
@BooleanParameter("log polar")
|
||||
var logPolar:Boolean by parameters
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package org.openrndr.extra.fx.distort
|
||||
|
||||
import org.openrndr.draw.ColorBuffer
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.draw.MagnifyingFilter
|
||||
import org.openrndr.draw.MinifyingFilter
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extra.fx.fx_rectangular_to_polar
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.BooleanParameter
|
||||
@@ -13,7 +10,7 @@ import org.openrndr.math.Vector2
|
||||
import kotlin.math.log
|
||||
|
||||
@Description("Rectangular to polar")
|
||||
class RectangularToPolar : Filter(mppFilterShader(fx_rectangular_to_polar, "rectangular-to-polar")) {
|
||||
class RectangularToPolar : Filter1to1(mppFilterShader(fx_rectangular_to_polar, "rectangular-to-polar")) {
|
||||
|
||||
@BooleanParameter("log polar")
|
||||
var logPolar:Boolean by parameters
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extra.parameters.DoubleParameter
|
||||
import org.openrndr.extra.parameters.IntParameter
|
||||
|
||||
@Description("Stack repeat")
|
||||
class StackRepeat : Filter(mppFilterShader(fx_stack_repeat, "stack-repeat")) {
|
||||
class StackRepeat : Filter1to1(mppFilterShader(fx_stack_repeat, "stack-repeat")) {
|
||||
@DoubleParameter("zoom", -1.0, 1.0, order = 0)
|
||||
var zoom: Double by parameters
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.parameters.DoubleParameter
|
||||
|
||||
@Description("Stretch waves")
|
||||
class StretchWaves : Filter(mppFilterShader(fx_stretch_waves, "stretch-waves")) {
|
||||
class StretchWaves : Filter1to1(mppFilterShader(fx_stretch_waves, "stretch-waves")) {
|
||||
@DoubleParameter("distortion", -0.0,1.0, 1)
|
||||
var distortion: Double by parameters
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.openrndr.extra.fx.distort
|
||||
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.draw.Filter1to1
|
||||
import org.openrndr.extra.fx.fx_tape_noise
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.BooleanParameter
|
||||
@@ -10,7 +11,7 @@ import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.parameters.DoubleParameter
|
||||
|
||||
@Description("Tape noise")
|
||||
class TapeNoise : Filter(mppFilterShader(fx_tape_noise, "tape-noise")) {
|
||||
class TapeNoise : Filter1to1(mppFilterShader(fx_tape_noise, "tape-noise")) {
|
||||
var time: Double by parameters
|
||||
|
||||
@DoubleParameter("gain", 0.0, 1.0)
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openrndr.extra.parameters.DoubleParameter
|
||||
import org.openrndr.extra.parameters.IntParameter
|
||||
|
||||
@Description("Tiles")
|
||||
class Tiles : Filter(mppFilterShader(fx_tiles, "tiles")) {
|
||||
class Tiles : Filter1to1(mppFilterShader(fx_tiles, "tiles")) {
|
||||
@DoubleParameter("rotation", -180.0, 180.0, order = 2)
|
||||
var rotation: Double by parameters
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.openrndr.extra.fx.distort
|
||||
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.draw.Filter1to1
|
||||
import org.openrndr.extra.fx.fx_video_glitch
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.BooleanParameter
|
||||
@@ -8,7 +9,7 @@ import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.parameters.DoubleParameter
|
||||
|
||||
@Description("Video glitch")
|
||||
class VideoGlitch : Filter(mppFilterShader(fx_video_glitch, "video-glitch")) {
|
||||
class VideoGlitch : Filter1to1(mppFilterShader(fx_video_glitch, "video-glitch")) {
|
||||
var time: Double by parameters
|
||||
|
||||
@DoubleParameter("amplitude", 0.0, 10.0)
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.openrndr.extra.parameters.DoubleParameter
|
||||
import org.openrndr.extra.parameters.IntParameter
|
||||
|
||||
@Description("Horizontal wave")
|
||||
class HorizontalWave : Filter(mppFilterShader(fx_horizontal_wave, "horizontal-wave")) {
|
||||
class HorizontalWave : Filter1to1(mppFilterShader(fx_horizontal_wave, "horizontal-wave")) {
|
||||
@DoubleParameter("frequency", 0.0, 64.0, order = 1)
|
||||
var frequency: Double by parameters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user