• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 430 core
2
3uniform sampler1D samp1D;
4uniform isampler2D isamp2D;
5uniform usampler2D usamp2D;
6uniform isampler3D isamp3D;
7uniform usampler3D usamp3D;
8uniform samplerCube sampCube;
9uniform isamplerCube isampCube;
10uniform isampler1DArray isamp1DA;
11uniform sampler2DArray samp2DA;
12uniform usampler2DArray usamp2DA;
13uniform isamplerCubeArray isampCubeA;
14uniform usamplerCubeArray usampCubeA;
15
16uniform sampler1DShadow samp1Ds;
17uniform sampler2DShadow samp2Ds;
18uniform samplerCubeShadow sampCubes;
19uniform sampler1DArrayShadow samp1DAs;
20uniform sampler2DArrayShadow samp2DAs;
21uniform samplerCubeArrayShadow sampCubeAs;
22
23uniform samplerBuffer sampBuf;
24uniform sampler2DRect sampRect;
25
26void main()
27{
28    vec2 lod;
29    float pf;
30    vec2 pf2;
31    vec3 pf3;
32
33    lod = textureQueryLod(samp1D, pf);
34    lod += textureQueryLod(isamp2D, pf2);
35    lod += textureQueryLod(usamp3D, pf3);
36    lod += textureQueryLod(sampCube, pf3);
37    lod += textureQueryLod(isamp1DA, pf);
38    lod += textureQueryLod(usamp2DA, pf2);
39    lod += textureQueryLod(isampCubeA, pf3);
40
41    lod += textureQueryLod(samp1Ds, pf);
42    lod += textureQueryLod(samp2Ds, pf2);
43    lod += textureQueryLod(sampCubes, pf3);
44    lod += textureQueryLod(samp1DAs, pf);
45    lod += textureQueryLod(samp2DAs, pf2);
46    lod += textureQueryLod(sampCubeAs, pf3);
47
48    int levels;
49
50    levels = textureQueryLevels(samp1D);
51    levels += textureQueryLevels(usamp2D);
52    levels += textureQueryLevels(isamp3D);
53    levels += textureQueryLevels(isampCube);
54    levels += textureQueryLevels(isamp1DA);
55    levels += textureQueryLevels(samp2DA);
56    levels += textureQueryLevels(usampCubeA);
57
58    levels = textureQueryLevels(samp1Ds);
59    levels += textureQueryLevels(samp2Ds);
60    levels += textureQueryLevels(sampCubes);
61    levels += textureQueryLevels(samp1DAs);
62    levels += textureQueryLevels(samp2DAs);
63    levels += textureQueryLevels(sampCubeAs);
64}
65