In 3D you need the position of the tiangle (especially the z-depth) and the projection mode, to get you correct u-v-position.
You have it ?
UV Sub-coordinate in polygon
Re: UV Sub-coordinate in polygon
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: UV Sub-coordinate in polygon
your "coef"s are wrong (so I think).
try this:
try this:
Code: Select all
det.f = 1.0 / ( (*B\y-*C\y)*(*A\x-*C\x) - (*B\x-*C\x)*(*A\y-*C\y) )
coefA = ( (*B\y-*C\y)*(*P\x-*C\x) - (*B\x-*C\x)*(*P\y-*C\y) ) * det
coefB = ( (*C\y-*A\y)*(*P\x-*C\x) - (*C\x-*A\x)*(*P\y-*C\y) ) * det
coefC = 1.0 - coefA - coefB
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
