Add Light and Material objects to ShaderTypes.h
This commit is contained in:
		
							parent
							
								
									261a768ae5
								
							
						
					
					
						commit
						d72992c26f
					
				
					 1 changed files with 22 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue