I’m trying to add my own vertices to the image, not for a particular case, I’m just trying to understand how to work with vertex shaders.
My understanding is that meshes are passed to the vertex shader automatically, can I add a mesh to a dispalyImage or is there
a way to display an image on a mesh object ?
thank you very much for your help.
for a frame of reference here’s what I’m actually trying to do.
that’s the shader - it’s the wobble shader from the guide.
kernel.vertex = [[P\_POSITION vec2 VertexKernel( P\_POSITION vec2 position ) { P\_POSITION float amplitude = 100.; position.y += sin( 3.0 \* CoronaTotalTime + CoronaTexCoord.x ) \* amplitude \* CoronaTexCoord.y; return position; }]]
all I do is to apply it on a displayImage.
what it does is - it wobbles the bottom two corners, I want to make it wobble the middle of the bottom two corners also.
EDIT:
https://www.youtube.com/watch?v=ZMWKyMdSUfc
I found the answer, it’s new polygon instead of new image. thank you for your response