instancing

This commit is contained in:
2024-08-09 21:16:07 +10:00
parent 89780d87d4
commit 5f69da369d
3 changed files with 36 additions and 21 deletions

View File

@ -12,7 +12,8 @@
typedef NS_ENUM(NSInteger, ShaderInputIdx) {
ShaderInputIdxVertices = 0,
ShaderInputIdxUniforms = 1
ShaderInputIdxInstance = 1,
ShaderInputIdxUniforms = 2
};
typedef struct {
@ -23,6 +24,10 @@ typedef struct {
typedef struct {
matrix_float4x4 model;
vector_float4 color;
} ShaderInstance;
typedef struct {
matrix_float4x4 projView;
} ShaderUniforms;