# NoiseProceduralTexture render function errors

**URL:** <https://forum.babylonjs.com/t/noiseproceduraltexture-render-function-errors/44029>\
**Category:** Questions\
**Created:** [September 11, 2023, 9:30pm UTC](https://forum.babylonjs.com/t/noiseproceduraltexture-render-function-errors/44029 "2023-09-11T21:30:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ajp/32/9504_2.png) [@ajp](https://forum.babylonjs.com/u/ajp)\
**Post date:** [September 11, 2023, 9:30pm UTC](https://forum.babylonjs.com/t/noiseproceduraltexture-render-function-errors/44029/1 "2023-09-11T21:30:28Z")

</div>

The following code errors on line 100 with `this._drawWrapper.effect is null`: [Babylon.js Playground](https://www.babylonjs-playground.com/#ZH0IX6)

Could someone tell me how do I cause the `NoiseProceduralTexture` to render so that it can be sampled please? (Its data is then hopefully transformed into another data object suitable for use with the BABYLON.MeshBuilder.CreateGround’s `updateVerticesData` function). Thank you.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 11, 2023, 10:35pm UTC](https://forum.babylonjs.com/t/noiseproceduraltexture-render-function-errors/44029/3 "2023-09-11T22:35:50Z")

</div>

You need to wait for the texture to be ready before rendering (means the effect has been compiled) [https://www.babylonjs-playground.com/#ZH0IX6#2](https://www.babylonjs-playground.com/#ZH0IX6#2)

Also readpixels will read the full buffer not a single pixel so you will need to rework this part.

---

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ajp/32/9504_2.png) [@ajp](https://forum.babylonjs.com/u/ajp)\
**Post date:** [September 12, 2023, 11:13am UTC](https://forum.babylonjs.com/t/noiseproceduraltexture-render-function-errors/44029/4 "2023-09-12T11:13:10Z")

</div>

Thank you @sebavan !

For anyone following on from this I got the mesh modification working, as well as updating the normals, and setting a directional light so the terrain variations can be seen more easily: [https://www.babylonjs-playground.com/#ZH0IX6#3](https://www.babylonjs-playground.com/#ZH0IX6#3)
