You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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])
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: