Skip to content

Instantly share code, notes, and snippets.

@tobspr
Created July 3, 2014 17:41
Show Gist options
  • Save tobspr/74d1dc52b48946fa556a to your computer and use it in GitHub Desktop.
Save tobspr/74d1dc52b48946fa556a to your computer and use it in GitHub Desktop.
Python:
class Light:
pos = Vec3(0)
color = Vec3(1,1,0)
mvp = Mat4(0)
...
lights = [Light(), Light(), Light()]
computeBuffer.setShaderInput("lights", lights)
Shader:
struct Light {
vec3 pos;
vec3 color;
mat4 mvp;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment