Handbook
Glossary
sobel-uniforms
Vocabulary
gpu
.
demos
.
bunny
Definition
USING:
gpu.render
gpu.textures
sequences
;
IN:
gpu.demos.bunny
TUPLE:
sobel-uniforms
<
uniform-tuple
{
texcoord-scale
sequence
initial:
f
}
{
color-texture
texture
initial:
T{
texture
}
}
{
normal-texture
texture
initial:
T{
texture
}
}
{
depth-texture
texture
initial:
T{
texture
}
}
{
line-color
sequence
initial:
f
}
;
Methods
USING:
accessors
combinators
gpu.demos.bunny
gpu.render.private
kernel
;
M:
sobel-uniforms
(bind-uniform-textures)
nip
{
[
color-texture>>
0
(bind-texture-unit)
]
[
normal-texture>>
1
(bind-texture-unit)
]
[
depth-texture>>
2
(bind-texture-unit)
]
}
cleave
;
USING:
accessors
combinators
gpu.demos.bunny
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
sobel-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"texcoord_scale"
uniform-index
]
[
texcoord-scale>>
]
bi*
bind-uniform-vec2
]
[
[
"color_texture"
uniform-index
]
[
color-texture>>
]
bi*
drop
0
glUniform1i
]
[
[
"normal_texture"
uniform-index
]
[
normal-texture>>
]
bi*
drop
1
glUniform1i
]
[
[
"depth_texture"
uniform-index
]
[
depth-texture>>
]
bi*
drop
2
glUniform1i
]
[
[
"line_color"
uniform-index
]
[
line-color>>
]
bi*
bind-uniform-vec4
]
}
2cleave
;