Add Light and Material objects to ShaderTypes.h

This commit is contained in:
Eryn Wells 2018-11-21 08:58:31 -07:00
parent 261a768ae5
commit d72992c26f

View file

@ -62,6 +62,28 @@ typedef NS_ENUM(NSInteger, GeneratorTextureIndex) {
GeneratorTextureIndexOut = 1,
};
typedef struct {
bool enabled;
#ifdef __METAL_VERSION__
simd::float4 position;
simd::float3 color;
#else
simd_float4 position;
simd_float3 color;
#endif
} Light;
struct Material {
#ifdef __METAL_VERSION__
simd::float3 diffuseColor;
simd::float3 specularColor;
#else
simd_float3 diffuseColor;
simd_float3 specularColor;
#endif
float specularExponent;
};
typedef struct {
matrix_float4x4 projectionMatrix;
matrix_float4x4 modelViewMatrix;