Hi, I have float array data that I want to use to create images in Metal. My plan is to apply one or more shaders to the data, then render it into a new RGB texture and continue from there. I’m using MTLPixelFormatR32Float as the source pixel format with success.
In all the kernel examples I see the sampler returns a float4, which is appropriate for an RGBA format. But my source data/format has no color. What is the equivalent for sampling single float values? I’m currently putting the source data into a 2D texture. Given the use case above, does it make sense to use a MTLBuffer instead and then render that into a new 2D MTLTexture? Thanks! Demitri _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com