Created
March 9, 2022 01:40
-
-
Save mattebb/2777a0db5fbcd52a104c4192a28f94ab to your computer and use it in GitHub Desktop.
Scene data glsl uniforms in Wandering Nets
This file contains 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
struct Light { | |
float intensity; | |
vec3 colour; | |
vec3 pa; | |
vec3 pb; | |
float w; | |
vec3 L; | |
vec3 nL; | |
}; | |
struct Sphere { | |
float r; | |
vec3 P; | |
}; | |
#define MAX_LIGHTS 20 | |
uniform int u_numLights; | |
uniform Lights | |
{ | |
Light lights[MAX_LIGHTS]; | |
}; | |
#define MAX_SPHERES 6 | |
uniform int u_numSpheres; | |
uniform Spheres | |
{ | |
Sphere spheres[MAX_SPHERES]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment