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 496cad9dc2e9f79fccf15e5e0a9abeb4bf8be136
float
vboxSplitBGRA
(
vec4
color
,
float
coord
)
{
int
pix
=
int
(
coord
);
float
part
=
coord
-
float
(
pix
);
if
(
part
<
0.25
)
return
color
.b;
if
(
part
<
0.5
)
return
color
.g;
if
(
part
<
0.75
)
return
color
.r;
return
color
.a;
}