is more reactive
This commit is contained in:
parent
eb9b0be732
commit
ac702663e8
|
@ -57,26 +57,6 @@ vec3 ditherBayerLut(vec3 ref) {
|
|||
}
|
||||
#include "../../lib/lygia/sample/dither.glsl"
|
||||
|
||||
//custom helpers -- TODO check if lygia can do this?
|
||||
// https://gist.github.com/983/e170a24ae8eba2cd174f
|
||||
vec3 rgb2hsv(vec3 c)
|
||||
{
|
||||
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
||||
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
|
||||
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
|
||||
|
||||
float d = q.x - min(q.w, q.y);
|
||||
float e = 1.0e-10;
|
||||
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
|
||||
}
|
||||
|
||||
vec3 hsv2rgb(vec3 c)
|
||||
{
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
}
|
||||
|
||||
|
||||
void main() {
|
||||
// common setup
|
||||
|
@ -93,23 +73,19 @@ void main() {
|
|||
float fx_dither_amount = .0;
|
||||
color = lerp(color, fx_dither, fx_dither_amount);
|
||||
|
||||
// effect: chromatic aberration
|
||||
//vec4 fx_chroma = chromaAB(u_tex0, uv);
|
||||
//float fx_chroma_amount = osc_sin*0.9;
|
||||
//color = lerp(color, fx_chroma, fx_chroma_amount);
|
||||
|
||||
// effect: exposure
|
||||
float exposure_val = map(osc_beat_val, 0.0, 1.0, 0.0, 1.6);
|
||||
exposure_val = saturate(exposure_val + osc_fft1*1.5);
|
||||
exposure_val = saturate(exposure_val + osc_fft1*1.8);
|
||||
color = exposure(color,exposure_val);
|
||||
|
||||
|
||||
float par_noise = pnoise(vec3(st * 5., u_time/6.0+osc_beat_val), vec3(1.2, 3.4, 5.6)) * 0.5 + 0.5;
|
||||
// make some noise
|
||||
float par_noise = pnoise(vec3(st * 5., u_time/6.0+osc_beat_val*0.5+osc_fft2*0.5), vec3(1.2, 3.4, 5.6)) * 0.5 + 0.5;
|
||||
float par_noise2 = pnoise(vec3(st * 5., (u_time+1000.0)/5.0+osc_beat_val), vec3(1.2, 3.4, 5.6)) * 0.5 + 0.5;
|
||||
|
||||
if(par_noise < 0.75*osc_slider3) {
|
||||
vec3 col_invert = vec3(1.0)-color.rbg;
|
||||
color = fx_dither;
|
||||
color.rgb = lerp(fx_dither.rgb,col_invert,sin((u_time/60.0)+osc_fft2)*.5+.5);
|
||||
color.rgb = lerp(fx_dither.rgb,col_invert,sin((u_time/60.0)+0.0)*.5+.5);
|
||||
if(par_noise2 < 0.5) {
|
||||
color.rgb = lerp(fx_dither.rgb,col_invert,1.0-sin((u_time/60.0)+osc_fft2)*.5+.5);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue