Handbook
Glossary
blur-uniforms
Vocabulary
gpu
.
effects
.
blur
Definition
USING:
gpu.render
gpu.textures
kernel
math
;
IN:
gpu.effects.blur
TUPLE:
blur-uniforms
<
uniform-tuple
{
texture
texture
initial:
T{
texture
}
}
{
horizontal
boolean
initial:
f
}
{
blurSize
float
initial:
0.0
}
;
Methods
USING:
accessors
combinators
gpu.effects.blur
gpu.render.private
kernel
;
M:
blur-uniforms
(bind-uniform-textures)
nip
{
[
texture>>
0
(bind-texture-unit)
]
}
cleave
;
USING:
accessors
alien.c-types
combinators
gpu.effects.blur
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
blur-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"texture"
uniform-index
]
[
texture>>
]
bi*
drop
0
glUniform1i
]
[
[
"horizontal"
uniform-index
]
[
horizontal>>
]
bi*
>c-bool
glUniform1i
]
[
[
"blurSize"
uniform-index
]
[
blurSize>>
]
bi*
glUniform1f
]
}
2cleave
;