2D GLSL filters: uniform vec3s

Anybody know if it’s possible to pass a custom vector-property into a GLSL filter? It’s possible with floats, integers, etc., but the only way you can add a custom vector property to an object is via python, and it doesn’t seem like the GLSL code picks those up. Thanks!

Most vectors you use are just composed of 3 floats. You can use the setUniform3f method to pass them to your shader.

For example, once you have your shader, here’s how you might pass an object’s world position:


posVec = obj.worldPosition
shader.setUniform3f('objPosition', *posVec)

Haha, thanks guys, much appreciated!