(blur) ( texture horizontal? framebuffer dim -- )


Vocabulary
gpu.effects.blur

Inputs
texturean object
horizontal?an object
framebufferan object
diman object


Outputs
None

Definition


:: (blur) ( texture horizontal? framebuffer dim -- )
{ 0 0 } dim <rect> <viewport-state> set-gpu-state
texture horizontal? 1.0 dim horizontal?
[ first ] [ second ] if / blur-uniforms boa framebuffer {
{ "primitive-mode" [ 2drop triangle-strip-mode ] }
{ "uniforms" [ drop ] }
{
"vertex-array"
[
2drop
blur-program <program-instance>
<window-vertex-array> &dispose
]
}
{ "indexes" [ 2drop T{ index-range { count 4 } } ] }
{ "framebuffer" [ nip ] }
} 2<render-set> render ;