Cross Reference: ckeyDst.c
xref
: /
vbox
/
src
/
VBox
/
Frontends
/
VirtualBox
/
shaders
/
ckeyDst.c
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
ckeyDst.c revision 6035a3d1ce01a78c316578f23393c0b7edca0548
#
extension
GL_ARB_texture_rectangle
:
enable
uniform
sampler2DRect
uDstTex
;
uniform
vec4
uDstClr
;
vec2
ckeyDst
(
void
)
{
vec4
dstClr
=
texture2DRect
(
uDstTex
,
vec2
(
gl_TexCoord
[0]));
vec3
difClr
=
dstClr
.
rgb
-
uDstClr
.
rgb
;
if
(
any
(
greaterThan
(
difClr
,
vec3
(
0.01
,
0.01
,
0.01
)))
||
any
(
lessThan
(
difClr
,
vec3
(-
0.01
, -
0.01
, -
0.01
))))
discard
;
// /* gl_FragColor = texture2DRect(uSrcTex, vec2(gl_TexCoord[1])); */
return
vec2
(
gl_TexCoord
[
1
]);
}