File: textureQueryLOD.frag

package info (click to toggle)
glslang 16.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,084 kB
  • sloc: cpp: 90,714; yacc: 4,243; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (39 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (10)
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
35
36
37
38
39
#version 150

#ifdef GL_ARB_texture_query_lod
#extension GL_ARB_texture_query_lod : enable
#endif
#ifdef GL_ARB_gpu_shader5
#extension GL_ARB_gpu_shader5 : enable
#endif

#ifdef GL_ES
precision highp float;
#endif

in vec2 vUV; // vert->frag
out vec4 color; // frag->fb
#define UV vUV

#define bias 1.5
#define TEX 128.0
#define offset ivec2(1,1)
uniform highp sampler2DShadow sampler;
uniform int funct;

void main (void)
{
    switch (funct)
    {
    case 0:
        ivec2 iv2 = textureSize(sampler, 0);
#ifdef GL_ARB_texture_query_lod
        vec2 fv2 = textureQueryLOD(sampler, vec2(0.0, 0.0));
#endif
		color = vec4(iv2,fv2);
        break;
    default:
        color = vec4(1.0, 1.0, 1.0, 1.0);
        break;
    }
}