Hello, developers,
I'm implementing slice rendering of 3d volume.
And then, I have a simple question...
I use a simple vertex buffer type both in swift code and in metal code. Firstly, I defined uv to float2 but it's not working. It has weird texture coordinates when I use float2...
public struct VertexIn: sizeable {
var position = float3()
var normal = float3()
var uv = float3()
}
struct VertexIn {
float3 position [[ attribute(0) ]];
float3 normal [[ attribute(1) ]];
float3 uv [[ attribute(2) ]];
};
like this
float2.
float3.
It has just difference at the uv type. And I have same issue at passing uniform to shader. When I pass uniform that includes float or short types it doesn't work. So I change type to float3... So I inquire that metal data type is so difference compared with swift type??? Or what types are same and supported from metal.