@warrenm Hey! - mind a quick q ? I am encoding depth 16 images (half float) as 2 8 bit unsigned chars (high/low for encoding), & want use in a metal shader. Is this doable? Can I make a half float from 2 8 bit values?
Sorry if obvious / dumb but hey thats where Im @ :D
-
-
Oh interesting. Had no idea you could reinterpret cast in a shader. Shit. Ha. Thanks!
-
MSL is C++™

-
I suppose I thought it was a subset like CILK > GLSL but fool me once :P
-
It’s a “static” subset of C++14 (no RTTI, dynamic_cast, virtual, etc.), but it’s got a surprising amount of the rest (no lambdas, though
).
End of conversation
New conversation -
-
-
Metal also has the as_type<T>(..) function for reinterpreting bits without having to go through pointers and potential undefined behaviour: auto rg = uchar2(low, high); half depth = as_type<half>(rg);
-
Much tidier. I had forgotten about that, thanks!
- End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.