Hi All, beginner here to check if his idea isn’t madness
I’ve recorded the displacement of a 3d model into a texture. The width of the texture represents the pointnumbers(or vertexnumbers) and the height the duration of the displacement animation. So every pixel in every row represents the position of that vertex (based on float rgb values, would be a vec3).
I’ve also recorded a texture regarding the primitives. Width would be the primitivenumber, height the duration of the animation. The rgb value of every pixel represents the 3 vertexnumbers (also vec3) which are used to form the primitive.
I would like to rebuild my geometry based on these two textures. I’ve got through the vertexshader stage, but now for the geometry shader:
I would like to tell the shader that the formation of every primitive needs to be looked up in the texture I’ve mentioned before. So primitive 1 would look at pixel one, extracts the rgb data, now has the 3 vertexID numbers that needs to be used to form itself, the next step would be to extract the positions of these vertices from the other texture.
My gut feeling tells me that I somehow need to put in a textelfetch() function.
Would be great of someone can push me in the right direction!
Best!