bradley/Blotter

liquidDistort up and down instead of horizontally

heaversm opened this issue · 1 comments

Hi - is there a way to distort the text up and down instead of side to side with the liquidDistortMaterial?

Here's a reference of what I'd like to do

I'm looking at the script - not too familiar with shader language, but I see:

"void mainImage( out vec4 mainImage, in vec2 fragCoord )",
        "{",
        "    // Setup ========================================================================",

        "    vec2 uv = fragCoord.xy / uResolution.xy;",
        "    float z = uSeed + uGlobalTime * uSpeed;",

        "    uv += snoise(vec3(uv, z)) * uVolatility;",

        "    mainImage = textTexture(uv);",

        "}"

so I imagine somewhere in that vec2 is the x and y coordinate?

Didn't see anything in the options:

uSpeed : { type : "1f", value : 1.0 },
          uVolatility : { type : "1f", value : 0.15 },
          uSeed : { type : "1f", value : 0.1 }

The liquid distort material doesnt really have any kind of "direction" built into it. It's essentially random noise.

Based on the example you gave, I think you may have better luck with the RollingDistortMaterial. Play with the values here to see what I mean.