I am trying to implement Sketchy Drawings . I am involved in a process that requires the use of a noise texture to obtain uncertainties that will provide an offset in the edges map.
Here is an image of my edge map for a torus:

And here is the noise texture that I got using the Perlin function, as suggested:

I saved them as textures in edgeTextureand noiseTextureaccordingly.
Now I'm stuck in a section where you need to compensate for the texture coordinates of the edge map from the uncertainty values obtained from the noise texture. This is an image from a book:

offs = turbulence(s, t);
offt = turbulence(1 - s, 1 - t);
I ignore the 2x2 matrix for now. Here is my current fragment shader attempt and result:
out vec4 vFragColor;
uniform sampler2D edgeTexture;
uniform sampler2D noiseTexture;
smooth in vec2 vTexCoords;
float turbulence(float s, float t)
{
float sum = 0;
float scale = 1;
float s1 = 1;
vec2 coords = vec2(s,t);
for (int i=0; i < 10; i++)
{
vec4 noise = texture(noiseTexture, 0.25 * s1 * coords);
sum += scale * noise.x;
scale = scale / 2;
s1 = s1 * 2;
}
return sum;
}
void main( void )
{
float off_s = turbulence(vTexCoords.s, vTexCoords.t);
float off_t = turbulence(1 - vTexCoords.s, 1 - vTexCoords.t);
vFragColor = texture(edgeTexture, vTexCoords + vec2(off_s, off_t));
}

, vTexCoords , , . , , , - . , , , , . , .