aboutsummaryrefslogtreecommitdiffstats
path: root/assets/shaders/glsl100/skybox.fs
blob: 0861a7ac2c98ab35fd80fa4875304fdfe3c628b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#version 100

precision mediump float;

// Input vertex attributes (from vertex shader)
varying vec3 fragPosition;

// Input uniform values
uniform samplerCube environmentMap;

void main()
{
    // Fetch color from texture map
    vec4 texelColor = textureCube(environmentMap, fragPosition);

    vec3 color = vec3(texelColor.x, texelColor.y, texelColor.z);

    // Calculate final fragment color
    gl_FragColor = vec4(color, 1.0);
}