The gradient will be constant across the triangle. If it's constant in dx and it's constant in dy then it's constant everywhere. If you know the gradient in the two directions then you know it everywhere (dx, dy, 0)

 

From: Manuel Massing [mailto:m.massing@warped-space.de]
Sent: Monday, February 07, 2011 2:47 AM
To: Game Development Algorithms
Subject: Re: [Algorithms] Texel area

 

Hi Diogo,

> This seems counter-intuitive... I understand your reasoning, and I can't

> find a mistake in your logic, but it seems to me that the size shouldn't be

> constant (from an intuitive standpoint)...

you are probably thinking about the usual texture mapping setup, where

a projective mapping (from screen space to texture space) is performed.

In this canonical case, the texture footprint is position dependent (you

describe the mapping of projective planes by a homography, which is

linear in homogenous coordinates, but non-linear in texture/screen coordinates due to the perspective division).

Your setup is just a linear transform of a 2D subspace (you want to transform

the UV plane into the world space triangle plane), i.e. you seek a mapping of the UV-basis vectors to their respective world-space counterparts.

cheers,

Manuel