Open
Description
It would be nice to have an array uniforms. Useful for dynamic shadows when obstacles are many.
Seems it's can be done by calling gl.Uniform1fv with second param equals to desired array size in shader.go.
Something like this:
case Float:
value := value.(float32)
gl.Uniform1fv(s.uniformLoc[uniform], 1, &value)
case FloatArr:
value := value.([]float32)
length := int32(len(value))
gl.Uniform1fv(s.uniformLoc[uniform], length, &value[0])
Metadata
Metadata
Assignees
Labels
No labels