-
-
Save tobspr/6f817252958809ba1ff0 to your computer and use it in GitHub Desktop.
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
Python: | |
class Light: | |
pos = Vec3(0) | |
color = Vec3(1,1,0) | |
mvp = Mat4(0) | |
... | |
lightArray = ArrayParameter() | |
lightArray[0] = Light() | |
lightArray[1] = Light() | |
... | |
computeBuffer.setShaderInput("lights", lightArray) | |
Shader: | |
struct Light { | |
vec3 pos; | |
vec3 color; | |
mat4 mvp; | |
... | |
}; | |
Lights light[1024]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment