Cross Reference: splitBGRA.c
xref
: /
vbox
/
src
/
VBox
/
Frontends
/
VirtualBox
/
shaders
/
splitBGRA.c
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
splitBGRA.c revision 6035a3d1ce01a78c316578f23393c0b7edca0548
float
splitBGRA
(
vec4
color
,
float
coord
)
{
int
pix
=
int
(
coord
);
float
part
=
coord
-
float
(
pix
);
/* todo: do not use if */
if
(
part
<
0.25
)
return
color
.b;
if
(
part
<
0.5
)
return
color
.g;
if
(
part
<
0.75
)
return
color
.r;
return
color
.a;
}