-
-
Save rdb/0493e77d52841e8a67df 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
class Light: | |
def __init__(self): | |
self.pos = ParamVector3f(0) | |
self.color = ParamVector3f(1,1,0) | |
self.mvp = ParamMatrix4f(0) | |
self.struct = StructParameter() | |
array = ArrayParameter() | |
array.append(lights[0].struct) | |
array.append(lights[1].struct) | |
node.setShaderInput("lights", array) | |
Shader: | |
struct Light { | |
vec3 pos; | |
vec3 color; | |
mat4 mvp; | |
... | |
}; | |
Lights lights[1024]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment