I'm struggling to come up with a way to trigger an effect in a shader graph material in Reality Composer Pro. It is a sweeping highlight effect that uses the Time node, but I'd like to be able to programmatically trigger it. Can't seem to work my head around it. I'm considering using an ECS System to manually update the timestep. Anyone done something like this? #visionpro #realitycomposerpro
@tritchey Can you load the material from the RCP scene and set it on your entity programmatically?
@nesevis Yeah - that is what I'm doing actually - the scene I'm adding it to is loaded over the network, so it isn't in the RealityContent package - just the materials. The timer node doesn't appear to start at 0 when the material is loaded - The description of the node says “the current time in seconds” but I'm not sure what it is referenced from.
@tritchey I haven’t tested it myself, but there is a library that lets you write shader nodes in Swift that might work for you: https://github.com/praeclarum/ShaderGraphCoder
GitHub - praeclarum/ShaderGraphCoder: Write RealityKit shaders using Swift

Write RealityKit shaders using Swift. Contribute to praeclarum/ShaderGraphCoder development by creating an account on GitHub.

GitHub