# Update vertex fragment from a texture

**URL:** <https://discourse.processing.org/t/update-vertex-fragment-from-a-texture/26190>\
**Category:** Coding Questions\
**Created:** [December 13, 2020, 1:04pm UTC](https://discourse.processing.org/t/update-vertex-fragment-from-a-texture/26190 "2020-12-13T13:04:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![regularsam](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@regularsam](https://discourse.processing.org/u/regularsam)\
**Post date:** [December 13, 2020, 1:04pm UTC](https://discourse.processing.org/t/update-vertex-fragment-from-a-texture/26190/1 "2020-12-13T13:04:48Z")

</div>

Hi, I’m looking for a way to update vertex positions within a vertex shader, passing from Processing a texture (sampler2D in GLSL) taken as an output from a fragment shader, which contains new position’s coordinates (x,y) of the current vertex.

In pseudocode you can see it as this process I guess:  
filter(generateNewPositionsTexture);  
filter(updateVertexPositionFromTexture);

I need that in order to create a particle system that keeps track of the particle positions by modifying the vertex position.

If you need a better explanation or any info I’ll try my best of course, let me know.  
Thanks in advance!
