We have changed go.get() so that it takes a third optional argument of type table.
1 Like
Remind me, what’s the third argument?
The docs don’t seem to have been updated yet:
1 Like
Not sure how we missed the documentation tbh, but as it says in the release notes, it needs to be a table, with an index (if it is an array).
This is currently only supported by material properties.
-- set the first vector4 in the array: example[0] = v
go.set(url, "example", vmath.vector4(1,1,1,1), {index=1})
-- set the last vector4 in the array: example[15] = v
go.set(url, "example", vmath.vector4(2,2,2,2), {index=16})
-- set an element of a vector4 in the array: example[0].x = 7
go.set(url, "example.x", 7, {index=1})
4 Likes
There is no way to update uniform array in a constants buffer created by render.constant_buffer()
. Would like to do this by this way:
self.constants = render.constant_buffer()
self.constants.light_colors[3] = vmath.vector4(1)
Added a feature request #6526.
3 Likes