I've been stuck on this problem for weeks now. Read a lot of material but didn't help. Finally I decided to ask for your expertise. May be solved by someone more knowledgeable easily. Here is the issue:
I have a GLSL ES shader that sends some high precision floats to a surface. For the sake of simplicity, the floats are hardcoded like this:
// end of the frag shader: gl_FragColor = vec4(0.12156862745098039, 0.47843137254902179, 0.77647058823465565, 0.31490958202630281);
// buffer pbuffer = buffer_create(((10*10)*4), buffer_fixed, 8); buffer_get_surface(pbuffer, sur, 0, 0, 0); var pixel = buffer_peek(pbuffer, (1+1)*4, buffer_u32); var r = (pixel >> 16) & 255; var g = (pixel >> 8) & 255; var b = pixel & 255; var a = (pixel >> 24) & 255;
At the end of the day, I don't need the colors. I just need the high precision floats.
Here is the code as extension file If you wanna tinker with:
https://www.dropbox.com/s/m8i27yo7psn115h/buffer precision test.gmez?dl=0
Any tiny little information is highly appreciated.
Thanks in advance.
PS: This will be a part of an open-source project which will be published on the marketplace.
IDE: GM:S EA v1.99.549.
Last edited by a moderator: