Next
Set default cubemap
This example shows how a cube is rotated.
attribute vec3 vertex; attribute vec2 uv1; attribute vec3 normal; uniform mat4 _mvProj; uniform mat3 _norm; varying vec3 n; void main(void) { gl_Position = _mvProj * vec4(vertex, 1.0); n = normal; }
#ifdef GL_ES precision highp float; #endif uniform samplerCube skybox; varying vec3 n; void main(void) { gl_FragColor = textureCube(skybox,n); }