Created
December 18, 2014 16:53
-
-
Save jose-villegas/8cbc5d03f880fc51088a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rendering Constrains | |
const int MAX_LIGHTS = 4; | |
// Shared Structures | |
struct Matrix { | |
mat4 modelViewProjection; | |
mat4 modelView; | |
mat4 model; | |
mat4 view; | |
mat4 projection; | |
mat3 normal; | |
}; | |
struct Light { | |
vec3 position; | |
vec3 direction; // For Directional | |
vec3 color; | |
float intensity; | |
float attenuation; | |
// Spot Light | |
float innerConeAngle; | |
float outerConeAngle; | |
// Control parameters | |
int lightType; | |
}; | |
struct Material { | |
vec3 ka; | |
vec3 kd; | |
vec3 ks; | |
float shininess; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment