blob: 1e295d688a3f3a9b65423ba1de132038075ba3aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
[require]
GLSL >= 1.30
GL_ARB_texture_query_levels
[vertex shader passthrough]
[fragment shader]
#extension GL_ARB_texture_query_levels: require
uniform sampler2D s;
// The only thing the spec says about textures without a minification filter is:
// "If the texture is complete, a non-zero value must be returned."
void main() {
if (textureQueryLevels(s) != 0)
gl_FragColor = vec4(0,1,0,0);
else
gl_FragColor = vec4(1,0,0,0);
}
[test]
ortho
clear color 0.4 0.4 0.4 0
clear
texture miptree 0
uniform int s 0
texparameter 2D min nearest
texparameter 2D mag nearest
draw rect -1 -1 2 2
relative probe rgba (0.5, 0.5) (0, 1, 0, 0)
|