1#version 150 2 3#ifdef GL_ARB_texture_query_lod 4#extension GL_ARB_texture_query_lod : enable 5#endif 6#ifdef GL_ARB_gpu_shader5 7#extension GL_ARB_gpu_shader5 : enable 8#endif 9 10#ifdef GL_ES 11precision highp float; 12#endif 13 14in vec2 vUV; // vert->frag 15out vec4 color; // frag->fb 16#define UV vUV 17 18#define bias 1.5 19#define TEX 128.0 20#define offset ivec2(1,1) 21uniform highp sampler2DShadow sampler; 22uniform int funct; 23 24void main (void) 25{ 26 switch (funct) 27 { 28 case 0: 29 ivec2 iv2 = textureSize(sampler, 0); 30#ifdef GL_ARB_texture_query_lod 31 vec2 fv2 = textureQueryLOD(sampler, vec2(0.0, 0.0)); 32#endif 33 color = vec4(iv2,fv2); 34 break; 35 default: 36 color = vec4(1.0, 1.0, 1.0, 1.0); 37 break; 38 } 39} 40