25 lines
487 B
GLSL
25 lines
487 B
GLSL
#version 300 es
|
|
precision highp float;
|
|
|
|
// Inputs
|
|
in vec2 texture_coordinates;
|
|
uniform float time;
|
|
uniform sampler2D uSampler1;
|
|
uniform sampler2D uSampler2;
|
|
|
|
// Output
|
|
out vec4 color;
|
|
|
|
const float PI = 3.1415;
|
|
|
|
void main() {
|
|
|
|
if ((texture_coordinates.x + texture_coordinates.y) > 1.) {
|
|
color = texture(uSampler1, texture_coordinates);
|
|
}
|
|
else {
|
|
color = texture(uSampler2, texture_coordinates);
|
|
}
|
|
|
|
// color = vec4( texture_coordinates, (sin( time * PI) + 1.)/2. , 1.);
|
|
}
|