How to update material in effectwrapper?


Here is the playground: Babylon.js Playground (
I want to update the time attribute in material. However, renderImage.effect.material always return null. Is there any way to update the material in effectwrapper?


By the way, I want to update the background image by shader. I don’t know if effectwrapper is a good choice or not.

There’s a few problems:

  • there’s no material property to Effect
  • you must pass the names of the uniforms you are going to use through uniformNames property in the EffectWrapper constructor
  • you must call EffectRenderer.render each frame

Here’s a fixed PG: