Color triangle using barycentric coordinates
This commit is contained in:
parent
8bb1b8de21
commit
85a13ec645
3 changed files with 2 additions and 13 deletions
|
|
@ -7,5 +7,6 @@ hitAttributeNV vec3 attribs;
|
|||
|
||||
void main()
|
||||
{
|
||||
hitValue = vec3(1.0, 1.0, 1.0);
|
||||
const vec3 barycentricCoords = vec3(1.0f - attribs.x - attribs.y, attribs.x, attribs.y);
|
||||
hitValue = barycentricCoords;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue