summaryrefslogtreecommitdiff
path: root/data/shaders/skybox-frag.glsl
blob: b3888287a1cee3ada044cab6e76558a7e944b635 (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
// -*- mode: c -*-

#ifdef GLSL120
varying vec3 fragDir;
#else
in vec3 fragDir;
#endif

#ifdef GLSL330
out vec4 fragColor;
#endif

#ifndef GLSL330
#define fragColor gl_FragColor
#endif

uniform samplerCube cubeMap;

#ifndef GLSL330
// Compatibility shim for older GLSL versions.
vec3 texture(samplerCube tex, vec3 coord) {
  return textureCube(tex, coord);
}
#endif

void main() {
  fragColor = texture(cubeMap, fragDir);
}