第 2 课:Color Negative
实现:ez
实现
uniform vec2 iResolution;
uniform sampler2D iChannel0;
void main() {
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = gl_FragCoord.xy / iResolution.xy;
vec4 tex = texture(iChannel0, uv);
vec4 opt = vec4(vec3(1.0) - tex.xyz,1.0);
gl_FragColor = opt;
}
复盘笔记
- ez