[fpc-pascal] Float packing

2017-11-05 Thread Ryan Joseph
I’m trying to pass a value between 1-1000 to an GLSL shader program which only supports floats with a precision of 1 decimal place so the plan is to pack the value into a vec4 (RGBA components between 0-1) which I could decode in the shader program. For example if I want to encode the value 50

Re: [fpc-pascal] Float packing

2017-11-05 Thread Ryan Joseph
> On Nov 6, 2017, at 10:43 AM, Ryan Joseph wrote: > > I have a number which I need to encode as an RGB value each component being 4 > bytes (12 bytes total) I don’t know why I typed this, each component is 1 byte obviously so each digit can be up to 255 for a total value of 255,255,255? Not

Re: [fpc-pascal] FPC install on windows with limited rights

2017-11-05 Thread Flávio Etrusco
Hi, 2017-11-02 17:54 GMT-02:00 Graeme Geldenhuys : > On 2017-11-02 07:17, Michael Van Canneyt wrote: >> >> The installer is made with inno setup. There are several inno extract >> tools >> available, e.g.: >> http://constexpr.org/innoextract/ > > > Thank you Michael, that worked perfectly. Strange

Re: [fpc-pascal] Float packing

2017-11-05 Thread Ryan Joseph
I actually got the problem wrong and still haven’t figured it out so here’s another go. I have a number which I need to encode as an RGB value each component being 4 bytes (12 bytes total) so I need to extract each digit as a byte (and then each byte back to a digit). It’s basic low level compu