[orx-fx] convert to MPP
This commit is contained in:
44
orx-fx/src/commonMain/kotlin/antialias/FXAA.kt
Normal file
44
orx-fx/src/commonMain/kotlin/antialias/FXAA.kt
Normal file
@@ -0,0 +1,44 @@
|
||||
package org.openrndr.extra.fx.antialias
|
||||
|
||||
import org.openrndr.draw.Filter
|
||||
import org.openrndr.extra.fx.fx_fxaa
|
||||
import org.openrndr.extra.fx.mppFilterShader
|
||||
import org.openrndr.extra.parameters.Description
|
||||
import org.openrndr.extra.parameters.DoubleParameter
|
||||
|
||||
/**
|
||||
* FXAA approximate antialiasing filter. Only works on LDR inputs
|
||||
*/
|
||||
@Description("FXAA")
|
||||
class FXAA : Filter( mppFilterShader(fx_fxaa, "fxaa")) {
|
||||
/**
|
||||
* luma threshold, default value is 0.5
|
||||
*/
|
||||
@DoubleParameter("luma threshold", 0.0, 1.0)
|
||||
var lumaThreshold: Double by parameters
|
||||
|
||||
/**
|
||||
* max search span, default value is 8.0
|
||||
*/
|
||||
@DoubleParameter("max search span", 1.0, 16.0)
|
||||
var maxSpan: Double by parameters
|
||||
|
||||
/**
|
||||
* direction reduce multiplier, default value is 0.0
|
||||
*/
|
||||
@DoubleParameter("direction reduce multiplier", 0.0, 1.0)
|
||||
var directionReduceMultiplier: Double by parameters
|
||||
|
||||
/**
|
||||
* direction reduce minimum, default value is 0.0
|
||||
*/
|
||||
@DoubleParameter("direction reduce minium", 0.0, 1.0)
|
||||
var directionReduceMinimum: Double by parameters
|
||||
|
||||
init {
|
||||
lumaThreshold = 0.5
|
||||
maxSpan = 8.0
|
||||
directionReduceMinimum = 0.0
|
||||
directionReduceMultiplier = 0.0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user