justingardner / mgl

A suite of mex/m files for displaying psychophysics stimuli
http://justingardner.net/mgl
Other
18 stars 22 forks source link

Support uint textures #38

Closed benjamin-heasly closed 1 year ago

benjamin-heasly commented 2 years ago

Currently in MGL with Metal, we only support RGBA float textures. These are pretty deep, 16 bytes per texture element!

We probably want to support uint textures as well, with 3 or 4 bytes per element.

I wonder if these two formats are enough -- shallow and deep. It would be nice to keep it simple, since each new pixel format we support adds cases to the socket commands as well as the Metal rendering pipeline setup -- especially when rendering from one texture as a blt source, to another texture as a rendering target.

justingardner commented 2 years ago

Mostly seems a matter of speed, I think we should revisit on another block to think about how to support very rapid, frame-accurate displays - people who would want speed, may want to go all the way to the metal, if you will, and have some way to change textures on the graphics card end to insure highly speed efficient ways of, say, creating random white-noise displays.

justingardner commented 1 year ago

Closing this - if we need faster create/blt speeds we can revisit.