demotool/test/fx-fxaa.srd

54 lines
1.1 KiB
Text
Raw Normal View History

################################################################################
# FXAA
(fn fxaa-init ()
(program prg-fxaa "fxaa.f.glsl")
(pipeline pl-fxaa prg-fullscreen prg-fxaa)
(sampler smp-fxaa
(sampling linear)
(wrapping clamp-border))
(input fxaa-subpixel .5)
(input fxaa-et .166)
(input fxaa-et-min .0833)
(ui-overrides
(section "Post-processing"
(section "FXAA"
(float "Sub-pixel quality" fxaa-subpixel
(min 0) (max 1) (slider))
(float "Edge threshold" fxaa-et
(min .063) (max .333) (slider))
(float "Edge threshold min." fxaa-et-min
(min .0312) (max .0833) (decimals 4)
(slider))
)
)
)
)
(fn fxaa-render (in-image)
(profiling "FXAA"
(uniforms-i prg-fxaa 0 0)
(uniforms prg-fxaa 1
$vp-x $vp-y $vp-width $vp-height)
(main-output)
(viewport 0 0 $width $height)
(clear 0 0 0 0)
(use-pipeline pl-fxaa)
(use-texture 0 in-image smp-fxaa)
(uniforms prg-fxaa 2
(get-input fxaa-subpixel)
(get-input fxaa-et)
(get-input fxaa-et-min))
(viewport $vp-x $vp-y $vp-width $vp-height)
(fullscreen)
)
)
# vim: syntax=demo-srd