Forum

Deconstruct integer/float data to display with glyph shader

hi all,

dear shader gods, I have a problem I am unable to solve. maybe one of you has an idea if this is doable at all on gpu:

I have geo-localized data points. Data comes baked in 32bit channel RGBA. At each point, my shader draws geometry. I also want to visualize the value (attached to that point) in form of numbers - using a glyph shader like the beta dx9 Ascii effect. I got everything working so far, except:

I always display an integer or float using 5 glyphs. let’s say “32.2”.
my 5 glyph-domains should know to display “(empty)” “3” “2” “.” “2”

I thought, maybe something can be done on the byte of bit level to achieve this.

Not sure what you up to there’s is text shaders: Browse (2) - Shadertoy BETA

You can check this example, sounds like exactly what you are after…

1 Like

YEES! thank you. exactly what i was looking for

Wasn’t it what the ASCII shader in beta was doing?

edit : I mean this idea of having a glyph map and display those - not the whole shader itself

I also had a look at that one. dx9 ascii has a horizontal glyph sheet ordered by “brightness” of the glyphes and maps sheet uv.x to input brightness.