use shader uniforms for scaling cube

This commit is contained in:
2024-08-06 16:51:29 +10:00
parent 10d7f8281c
commit c30ba9a5ca
3 changed files with 21 additions and 3 deletions

View File

@ -11,7 +11,8 @@
#include <simd/simd.h>
typedef NS_ENUM(NSInteger, ShaderInputIdx) {
ShaderInputIdxVertices = 0
ShaderInputIdxVertices = 0,
ShaderInputIdxUniforms = 1
};
typedef struct {
@ -20,4 +21,9 @@ typedef struct {
vector_float2 texCoord;
} ShaderVertex;
typedef struct {
matrix_float4x4 model;
matrix_float4x4 projView;
} ShaderUniforms;
#endif//SHADERTYPES_H