mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-03 05:10:57 +00:00
30 lines
575 B
C
30 lines
575 B
C
#ifndef SHADERTYPES_H
|
|
#define SHADERTYPES_H
|
|
|
|
#ifdef __METAL_VERSION__
|
|
# define NS_ENUM(TYPE, NAME) enum NAME : TYPE NAME; enum NAME : TYPE
|
|
# define NSInteger metal::int32_t
|
|
#else
|
|
# import <Foundation/Foundation.h>
|
|
#endif
|
|
|
|
#include <simd/simd.h>
|
|
|
|
typedef NS_ENUM(NSInteger, ShaderInputIdx) {
|
|
ShaderInputIdxVertices = 0,
|
|
ShaderInputIdxUniforms = 1
|
|
};
|
|
|
|
typedef struct {
|
|
vector_float4 position;
|
|
vector_float4 normal;
|
|
vector_float2 texCoord;
|
|
} ShaderVertex;
|
|
|
|
typedef struct {
|
|
matrix_float4x4 model;
|
|
matrix_float4x4 projView;
|
|
} ShaderUniforms;
|
|
|
|
#endif//SHADERTYPES_H
|