repo.or.cz
/
piglit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
cl: Don't use device_infos if num_device_infos == 0
[piglit.git]
/
tests
/
shaders
/
glsl-vs-functions.vert
blob
cdb023a9819c8ae2e1ec5b065d1064a43a739056
1
uniform vec4 args1;
2
3
/* In order to make the Mesa compiler not inline the function calls, have
4
* return statements inside of branches.
5
*/
6
float f1(float f)
7
{
8
if (f > 0.5)
9
return 1.0;
10
else
11
return 0.0;
12
}
13
14
float f2(float f)
15
{
16
if (f < 0.5)
17
return 1.0;
18
else
19
return 0.0;
20
}
21
22
void main()
23
{
24
gl_FrontColor = vec4(f1(args1.x),
25
f1(args1.y),
26
f2(args1.z),
27
f2(args1.w));
28
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
29
}
30