Next
This test shows how to use viewports and how to use layers.
Output
Show data
[
Refresh
] [
UVSphere
]
attribute vec3 vertex; attribute vec2 uv1; uniform mat4 _mvProj; varying vec3 vColor; void main(void) { gl_Position = _mvProj * vec4(vertex, 1.0); vColor = vec3(uv1.x,uv1.y,0.0); }
#ifdef GL_ES precision highp float; #endif varying vec3 vColor; void main(void) { gl_FragColor = vec4(vColor.x, vColor.y, vColor.z, 1.0); }
attribute vec3 vertex; attribute vec2 uv1; uniform mat4 _mvProj; varying vec2 uv; void main(void) { gl_Position = _mvProj * vec4(vertex, 1.0); uv = uv1; }
#ifdef GL_ES precision highp float; #endif varying vec2 uv; uniform sampler2D tex; void main(void) { gl_FragColor = texture2D(tex,uv); }