I’m trying to more accurately understand how to extend Nodes and how the update loop within nodes works, particularly the differences and usage of the updateBefore(), update(), and updateAfter() callbacks. I have a remedial understanding of the utility of updateBefore() in post-processing passes, where it seems to mainly be useful for updating values that are used in setup before each render call ( for example, updating this.textureNode before a call to quadMesh.render() such that the textureNode value used in the blur pass is different each time). However, I feel like my lack of a broader understanding of when to use each is impeding my understanding of the code. Perhaps this question is too broad and unfocused to invoke an answer, but if any general clarity could be provided on how to use each, it would be much appreciated.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
onBeforeCompile does not update MeshStandardMaterial when material updated | 7 | 3382 | February 28, 2020 | |
Mesh.onBeforeRender (edit: no issue, ignore) | 8 | 3106 | November 11, 2019 | |
[Solved] Material texture update after apply? | 1 | 713 | January 19, 2018 | |
Update objects after add to scene | 6 | 7133 | April 6, 2018 | |
Chainable onBeforeCompile + Uniforms per Mesh | 18 | 6030 | June 30, 2021 |