feat(image-pipeline): add webgl preview backend poc
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#version 100
|
||||
precision mediump float;
|
||||
|
||||
varying vec2 vUv;
|
||||
uniform sampler2D uSource;
|
||||
uniform vec3 uColorShift;
|
||||
|
||||
void main() {
|
||||
vec4 color = texture2D(uSource, vUv);
|
||||
color.rgb = clamp(color.rgb + uColorShift, 0.0, 1.0);
|
||||
gl_FragColor = color;
|
||||
}
|
||||
12
lib/image-pipeline/backend/webgl/shaders/curves.frag.glsl
Normal file
12
lib/image-pipeline/backend/webgl/shaders/curves.frag.glsl
Normal file
@@ -0,0 +1,12 @@
|
||||
#version 100
|
||||
precision mediump float;
|
||||
|
||||
varying vec2 vUv;
|
||||
uniform sampler2D uSource;
|
||||
uniform float uGamma;
|
||||
|
||||
void main() {
|
||||
vec4 color = texture2D(uSource, vUv);
|
||||
color.rgb = pow(max(color.rgb, vec3(0.0)), vec3(max(uGamma, 0.001)));
|
||||
gl_FragColor = color;
|
||||
}
|
||||
Reference in New Issue
Block a user