shadows, textures, resource managers... shaders...
[antikythera] / sdr / skydome.p.glsl
diff --git a/sdr/skydome.p.glsl b/sdr/skydome.p.glsl
new file mode 100644 (file)
index 0000000..7682150
--- /dev/null
@@ -0,0 +1,12 @@
+uniform samplerCube envmap;
+
+varying vec3 normal;
+
+void main()
+{
+       vec3 n = normalize(normal);
+       vec3 texel = textureCube(envmap, n).xyz;
+
+       gl_FragColor.rgb = texel;
+       gl_FragColor.a = 1.0;
+}