Script - FXAA ported
A pair of missing instructions: clear and main-output
This commit is contained in:
parent
424dca64e9
commit
1ee448a4c0
1 changed files with 38 additions and 0 deletions
38
demo.srd
38
demo.srd
|
@ -20,6 +20,10 @@
|
|||
(call dof-init)
|
||||
(call bloom-init)
|
||||
(call combine-init)
|
||||
(call fxaa-init)
|
||||
|
||||
(viewport 0 0 $width $height)
|
||||
(clear 0 0 0 0)
|
||||
)
|
||||
|
||||
(frame
|
||||
|
@ -28,6 +32,7 @@
|
|||
(call dof-render tx-scene-output tx-scene-depth)
|
||||
(call bloom-render tx-scene-output)
|
||||
(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-g)
|
||||
(get-input cg-gamma-b))
|
||||
(viewport 0 0 $vp-width $vp-height)
|
||||
(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
|
||||
|
|
Loading…
Reference in a new issue