Guru Session #11: GLSL Shaders (Wed Apr 29th, 6pm CEST/5pm GMT/12pm EDT/9am PDT)
-
@mark thankyou will delete that folder and try again.....EDIT....it worked a dream.....massive thumbs up!
-
@light-fx-uk said:
massive thumbs up!
Thank you for letting me know. I will make the instructions clearer.
Best Wishes,
Mark -
@juriaan,
sorry for the super late reply;
here's my code for one of the tries
uniform float noise_level;
// ISADORA_FLOAT_PARAM (noise_level, noil, 0.0, 1.0, 0.5, "dit is de text die helpt");
uniform float dark_factor;
// ISADORA_FLOAT_PARAM (dark_factor, dkfa, 0.0, 1.0, 0.5, "dit is wat het doet"); // #define NOISE_LEVEL 0.25
// #define DARKEN_FACTOR 0.125 #define DENOMINATOR vec2(213, 5.53)
#define NEG_X vec2(-1.0, 1.0)
#define NEG_Y vec2(1.0, -1.0) #define GLITCH_OFFSET_1 vec2(32.05, 236.0)
#define GLITCH_OFFSET_2 vec2(-62.05, -36.0) float rand(vec2 co)
{
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
} void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
vec2 uv = fragCoord.xy / iResolution.xy;
// Scanline desync
if (mod(iTime, 2.0) > 1.9)
uv.x += cos(iTime * 10.0 + uv.y * 1000.0) * 0.01;
// Pixelate glitch 1
if (mod(iTime, 4.0) > 3.0)
uv = floor(uv * 32.0) / 32.0; // Pixelate glitch 2
if (mod(iTime, 5.0) > 3.75)
uv += 1.0 / 64.0 * (2.0 * vec2(
rand(floor(uv * 32.0) + GLITCH_OFFSET_1),
rand(floor(uv.y * 32.0) + GLITCH_OFFSET_2)) - 1.0); fragColor = texture(iChannel0, uv);
fragColor.rgb
+= noise_level
* vec3(rand(iTime + fragCoord / DENOMINATOR * NEG_X),
rand(iTime - fragCoord / DENOMINATOR * NEG_Y),
rand(iTime + fragCoord / DENOMINATOR))
- dark_factor;
} -
Remove the space between ISADORA_FLOAT_PARAM and (
So the second one ;) The first one is your example
// ISADORA_FLOAT_PARAM (noise_level, noil, 0.0, 1.0, 0.5, "This is the text that helps");
// ISADORA_FLOAT_PARAM(noise_level, noil, 0.0, 1.0, 0.5, "This is the text that helps");