-->

Calculating uv texture coords for a procedurally g

2019-07-02 20:32发布

问题:

I have a shape like this:

and the coordinates of the points are available (Vertices have x and y components)

My texture is:

A simple planar UV mapping gives me:

and what I desire is:

How to calculate vertex positions to get the desired mapping? Note that this is a math problem.

Also, I can tolerate stretching, as long as the vertices fall on the grassy side.