implement perspective correct interpolation to the 2D window space clipped brush stroke sample.
This commit is contained in:
@@ -119,7 +119,7 @@ std::vector<vertex_t> poly_intersect(const std::vector<vertex_t>& poly, const st
|
||||
glm::vec2 hit_uv;
|
||||
segments_intersect(edge[0], edge[1], s[0].pos, s[1].pos, pt, hit_uv);
|
||||
vertex_t v;
|
||||
v.pos = glm::vec4(pt, 0, 1);
|
||||
v.pos = glm::lerp(s[0].pos, s[1].pos, hit_uv.y);
|
||||
v.uvs = glm::lerp(s[0].uvs, s[1].uvs, hit_uv.y);
|
||||
v.uvs2 = glm::lerp(s[0].uvs2, s[1].uvs2, hit_uv.y);
|
||||
if (side0) // outgoing
|
||||
|
||||
Reference in New Issue
Block a user