File: glsl.ext.textureShadowLod.frag

package info (click to toggle)
glslang 16.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,712 kB
  • sloc: cpp: 92,305; yacc: 4,320; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (32 lines) | stat: -rw-r--r-- 875 bytes parent folder | download | duplicates (6)
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
#version 450
#extension GL_EXT_texture_shadow_lod : enable

uniform sampler2DArrayShadow s2da;
uniform samplerCubeArrayShadow sca;
uniform samplerCubeShadow sc;

out float c;
in vec4 tc;

void pass() {
    c = texture(s2da, tc, 0.0);
    c = texture(sca, tc, 0.0, 0.0);
    c = textureOffset(s2da, tc, ivec2(0.0), 0.0);
    c = textureLod(s2da, tc, 0.0);
    c = textureLod(sc, tc, 0.0);
    c = textureLod(sca, tc, 0.0, 0.0);
    c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0));
}

#extension GL_EXT_texture_shadow_lod : disable
void fail() {
    // All these builtins should fail to compile
    c = texture(s2da, tc, 0.0); 
    c = texture(sca, tc, 0.0, 0.0);
    c = textureOffset(s2da, tc, ivec2(0.0), 0.0);
    c = textureLod(s2da, tc, 0.0);
    c = textureLod(sc, tc, 0.0);
    c = textureLod(sca, tc, 0.0, 0.0);
    c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0));
}