]> git.tdb.fi Git - libs/gl.git/blob - builtin_data/_sky_distant.glsl
Change default binding ranges to match lowest OpenGL standard
[libs/gl.git] / builtin_data / _sky_distant.glsl
1 import flat_effect;
2 import _sky;
3
4 #pragma MSP stage(fragment)
5 layout(location=0) out vec3 frag_color;
6 void main()
7 {
8         float azimuth = texcoord.x*2.0*PI;
9         float z = texcoord.y*2.0-1.0;
10         float r = sqrt(1.0-z*z);
11         vec3 look_dir = vec3(cos(azimuth)*r, sin(azimuth)*r, z);
12         frag_color = raymarch_path(view_height, look_dir).luminance;
13 }