spacebox/demo/browser_webcam_test/shaders/flat.frag

22 lines
526 B
GLSL

#version 300 es
/* Browser Webcam Test */
/* The precision declaration is required by OpenGL ES */
precision mediump float;
/* Forwarded from the vertex shader */
in vec2 uv;
/* The texture is provided by the program when it sets the uniform value. */
uniform sampler2D base_texture;
/* Setting this to a color value will color the fragment in the output display */
out vec4 myOutputColor;
void main(void)
{
/* Get the color from the texture at the UV coordinates */
myOutputColor = texture(base_texture, uv);
}