I'm trying to experiment with using smaller data structures to store Metal vertex data. The Particle struct is shared between Swift and Metal, but am getting the following error:
Unknown type name 'simd_half3'; did you mean 'simd_char3'
What do I need to import to get over this compilation error?
(The same struct compiles when pasted directly into the metal shaders file). Is it because there is no half type in Swift?
ShaderTypes.h - C Header file
#ifndef ShaderTypes_h
#define ShaderTypes_h
#include <simd/simd.h>
struct Particle {
simd_float3 floatTuple; // works fine
simd_char3 charTuple; // works fine
simd_half3 halfTuple; // Unknown type name 'simd_half3'; did you mean 'simd_char3'
};
#endif /* ShaderTypes_h */
All these types are defined in the same file, and using the command-click, I can jump to their definition (so the editor knows about the types), but I still get that build error.
