I am trying to texture the a custom plane shape I created in scenekit on iOS9. I need the texture to spread out and stretch over the entire surface. I have a vertex and fragment shader on an SCNprogram. But it seems I am doing something wrong and fiddling with this all day, I have come to the conclusion that somehow the Texture coordinates I specify are not correct.
My question is, when creating a geometry, does SceneKit create the texture coordinates automatically so when I specify CGpoint(0,0) for one corner of the texture, it automatically maps it to the bottom left corner of the geometry? Or do I have to manually specify the texture coordinates/uv for the geometry I create?
This problem is a part of a larger question posted here : Custom Shader SCNProgram iOS 9 Scenekit
Please help, I have spent all day tinkering but no success :(
EDIT:Based on Locks response below, I have changed the frag shader to help me troubleshoot it. What it gives I believe makes sense?? See pic below. There does seem to be an issue with my UVs. But why? I can't understand.