# How to update material in effectwrapper?

**URL:** <https://forum.babylonjs.com/t/how-to-update-material-in-effectwrapper/42268>\
**Category:** Questions\
**Tags:** material\
**Created:** [July 9, 2023, 3:14pm UTC](https://forum.babylonjs.com/t/how-to-update-material-in-effectwrapper/42268 "2023-07-09T15:14:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wsAndy](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wsandy/32/16904_2.png) [@wsAndy](https://forum.babylonjs.com/u/wsAndy)\
**Post date:** [July 9, 2023, 3:14pm UTC](https://forum.babylonjs.com/t/how-to-update-material-in-effectwrapper/42268/1 "2023-07-09T15:14:19Z")

</div>

hello!

Here is the playground: [Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#J3FUED#32)  
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?

Thanks!

---

<div class="post-metadata">

**Author:** ![wsAndy](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wsandy/32/16904_2.png) [@wsAndy](https://forum.babylonjs.com/u/wsAndy)\
**Post date:** [July 9, 2023, 3:15pm UTC](https://forum.babylonjs.com/t/how-to-update-material-in-effectwrapper/42268/2 "2023-07-09T15:15:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [July 10, 2023, 9:42am UTC](https://forum.babylonjs.com/t/how-to-update-material-in-effectwrapper/42268/3 "2023-07-10T09:42:09Z")

</div>

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:

> **[Babylon.js Playground](https://playground.babylonjs.com/#J3FUED%2339)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes
