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
fix the spelling in whole piglit
[piglit.git]
/
tests
/
spec
/
glsl-1.10
/
execution
/
glsl-override-builtin-2.shader_test
blob
97a4bbdac3fd7bd04c7be1aab8db4c109e536fd3
1
[require]
2
GLSL >= 1.10
3
4
/* built-in function could be overridden, but should not impact
5
another shader.
6
*/
7
8
[vertex shader]
9
void main()
10
{
11
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
12
}
13
14
[fragment shader]
15
float myfunc(float);
16
17
float abs(float f)
18
{
19
return f-1.0;
20
}
21
22
void main()
23
{
24
gl_FragColor = vec4(abs(1.0), myfunc(1.0), 0.0, 1.0);
25
}
26
27
[fragment shader]
28
float myfunc(float f)
29
{
30
return abs(f);
31
}
32
33
[test]
34
draw rect -1 -1 2 2
35
probe all rgba 0.0 1.0 0.0 1.0