Script - FXAA ported

A pair of missing instructions: clear and main-output
This commit is contained in:
Emmanuel BENOîT 2017-11-10 21:46:15 +01:00
parent 424dca64e9
commit 1ee448a4c0

View file

@ -20,6 +20,10 @@
(call dof-init) (call dof-init)
(call bloom-init) (call bloom-init)
(call combine-init) (call combine-init)
(call fxaa-init)
(viewport 0 0 $width $height)
(clear 0 0 0 0)
) )
(frame (frame
@ -28,6 +32,7 @@
(call dof-render tx-scene-output tx-scene-depth) (call dof-render tx-scene-output tx-scene-depth)
(call bloom-render tx-scene-output) (call bloom-render tx-scene-output)
(call combine-render tx-dof-pass2 tx-bloom1) (call combine-render tx-dof-pass2 tx-bloom1)
(call fxaa-render tx-combined)
) )
) )
@ -394,10 +399,43 @@
(get-input cg-gamma-r) (get-input cg-gamma-r)
(get-input cg-gamma-g) (get-input cg-gamma-g)
(get-input cg-gamma-b)) (get-input cg-gamma-b))
(viewport 0 0 $vp-width $vp-height)
(fullscreen) (fullscreen)
) )
) )
################################################################################
# FXAA
(fn fxaa-init ()
(program prg-fxaa "fxaa.f.glsl")
(pipeline pl-fxaa prg-fullscreen prg-fxaa)
(uniforms-i prg-fxaa 0 0)
(uniforms-i prg-fxaa 1 $vp-width $vp-height)
(sampler smp-fxaa
(sampling linear)
(wrapping clamp-border))
(input fxaa-subpixel .5)
(input fxaa-et .166)
(input fxaa-et-min .0833)
)
(fn fxaa-render (in-image)
(profiling "FXAA"
(main-output)
(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 # vim: syntax=demo-srd