I’m trying to write a function that will offset a row of vertices on the mesh via the vertex shader / tessellation in the material.
I’m having issues getting the row of vertices to be calculated locally rather then in absolute world space.
basically upon a twisted mesh, instead of having the vertices behave like applying a texture, they ignore the UV mapping entierly.
To solve this, I was considering using the Pixel shader instead, but before I go through that (sampling adjecent pixels and making calculations is far more expensive then using vertices) I figure I’d ask if anyone has any suggestions or tricks to sample specific adjacent vertices.
unfortunately vertex normal ws (dot) 0,0,1 isn’t returning the expected cosine.
let me back off.
Precisely, I need the cosine or angular value of each X/Y direction of each individual face on the mesh.
That should be the value of the Z axis of each vertexnormalWS - or so I thought.
My issue could also be related to something else, but before getting further into it, I think if anyone has any advice on this it would be greatly helpful.
Trying to demonstrate what I need with a picture…