Jit.LCD & Matrix Line

2000's icon

Hello,

Sorry for the clumsiness of this question. I hope it's understandable.

Is there a straight forward way of using the position and line commands, or some kind of equivalent, of Jit.LCD with a Matrix using float32? Or some way of combining them?

Thank you

Roman Thilenius's icon

i don´t think so.

lcd is 8 bit by definition (and no longer supported since 15 years.)

mgraphics will accept colors in float, but it will only output char as well. even if you put mgraphics in float32 mode, which is legal, the actual color resolution it sends out will still be cropped to char.

a custom translation system from the lcd commands you already known by heart to shaders (jit.gl.pix?) will probably fail because of the completely different logic of these two worlds.

you best bet will be to use 8 bit to draw to lcd, then replace the color values later in the float 32 matrix world. for example by adding the difference between the float value and the original 32 bit value using jit.expr. or by drawing only black and white stuff in lcd and then colorizing the results.
as you can guess, this wil not work for circles, diagonal lines or for geometric positions using float.

make sure to read about the range of the "normalized" float values in jitter before you start.

TFL's icon

[jit.gl.sketch] has fairly similar commands and logic as [jit.lcd], although it uses 3D normalized coordinates instead of 2D pixels coordinates.

If you provide a patch we could probably help porting it.