Using ascii shader for a video

Hey, guys
I’m really new to TD, but I’m using it for an art project right now. I’ve downloaded a shader from Shadertoy and I’ve used a patch from the forum. Everything is going on really fine, but I really want to change the symbols used, I just can’t find the right way to change the shader code.
The idea is to use only “0” and “1”. Here is the link of the shader:
shadertoy.com/view/lssGDj

And I guess I have to change only these:

float n = 65536.0; // .
if (gray > 0.2) n = 65600.0; // :
if (gray > 0.3) n = 332772.0; // *
if (gray > 0.4) n = 15255086.0; // o
if (gray > 0.5) n = 23385164.0; // &
if (gray > 0.6) n = 15252014.0; // 8
if (gray > 0.7) n = 13199452.0; // @
if (gray > 0.8) n = 11512810.0; // #

Thank you in advance : )))

Hey,

the numbers are not really transcoded ascii characters, rather the function up top:

float character(float n, vec2 p) // some compilers have the word "char" reserved
{
	p = floor(p*vec2(4.0, -4.0) + 2.5);
	if (clamp(p.x, 0.0, 4.0) == p.x && clamp(p.y, 0.0, 4.0) == p.y)
	{
		if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;
	}	
	return 0.0;
}

tries to describe the characters as best as it can.

A proper solution in TouchDesigner could be to use the characters you like to use to be read into a 2D Texture array and then referenced in a shader.
The tox here does this, have a look - I’ll have to add a description to it…
github.com/wuestenarchitekten/c … umbers.tox

Best
Markus

Thank you! This is a pretty interesting .tox, I’ll keep it for some experiments
I found the solution, actually the code creator gave me some kind of a hint, so with a little research now I can make it. He told me that the values are bitmaps.

Hello, i know this is an old post, but im new to Touchdesigner and i’d like to experiment with Ascii portraits. I was wondering how can i make the video footage more clear? (for example, thresholding the pixels that are far away). Also, is it possible to add color to individual ascii characters?