# How to update the uniforms of MeshBasicMaterial

**URL:** <https://discourse.threejs.org/t/how-to-update-the-uniforms-of-meshbasicmaterial/49488>\
**Category:** Questions\
**Tags:** materials\
**Created:** [March 23, 2023, 8:02am UTC](https://discourse.threejs.org/t/how-to-update-the-uniforms-of-meshbasicmaterial/49488 "2023-03-23T08:02:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsu](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@dsu](https://discourse.threejs.org/u/dsu)\
**Post date:** [March 23, 2023, 8:02am UTC](https://discourse.threejs.org/t/how-to-update-the-uniforms-of-meshbasicmaterial/49488/1 "2023-03-23T08:02:13Z")

</div>

I made a few modifications to ShaderChunk to fit my specific requirements, introducing a few uniforms to implement my features.  
I needed externally accessible uniforms that could be dynamically updated. But now that ShaderMaterial was available, there was nothing I could have done with a MeshBasicMaterial. Was there any way I could have uniforms made out of anything but shaderMaterial?  
I don’t want to use onBeforeCompile because it needs to recompile the shader and will make my results jitter

---

<div class="post-metadata">

**Author:** ![Oxyn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/oxyn/32/12902_2.png) [@Oxyn](https://discourse.threejs.org/u/Oxyn)\
**Post date:** [March 23, 2023, 8:35am UTC](https://discourse.threejs.org/t/how-to-update-the-uniforms-of-meshbasicmaterial/49488/2 "2023-03-23T08:35:59Z")

</div>

compile your own version of three.js with the modified native shaders and additional uniforms?  
But I think the jittering come from browser performance issue. So whathever you do, it may still be there anyway.
