Post

Replies

Boosts

Views

Activity

Matrices in MTLVertexDescriptor
I'm trying to write vertex descriptor for my vertex shader which takes following struct as stage_in input. struct VertexIn { float2x2 foo; } vertex float4 vertexShader(const VertexIn in [[stage_in]]) {...} Now when defining vertex descriptor's attribute what should be the MTLVertexFormat? vertexDescriptor.attributes[0].format = ??? I went through the documentation, I didn't find any enum case for Matrices. Is it fine if say set format as float2 and give size 2 * size of float2?
0
0
887
Aug ’22