In my project, I need to send custom structured data buffer from CPU to shaders in every frame. In SceneKit this can be done using setValue(_:forKey:) or handleBinding(ofBufferNamed:frequency:handler:) on a SCNProgram object. However in RealityKit I only found one custom value property that can be used to send data, like:
customMaterial.custom.value = SIMD4<Float>(x: 0.25, y: 0.25, z: 0.25, w: 1.0)
I know possibly I could use the material constants like roughness or specular kind of values to store more custom data but that doesn't allow other data format other than just some 4 component vectors (And this method seems dirty and confused)
How can I send more customizable data to the shader program or is it even possible to do this in the current version of RealityKit?