Back to shaders
Shader test bench
Luma
runnable transition
GLSL transition function. Stronghold supplies two demo textures and progress/time uniforms.
Code
// Author: gre
// License: MIT
uniform sampler2D luma;
vec4 transition(vec2 uv) {
return mix(
getToColor(uv),
getFromColor(uv),
step(progress, texture2D(luma, uv).r)
);
}