Transform texture with homography

hi there,

i try to use homography on a texture transform shader fx for the original points, and on a quad
to set the screen points. To avoid having the texture passing the borders of my new set oroginal points.

The way the texture gets transformed is hard to understand, i tried to map it here and there but cant get it working.

thanks in advance,

texture_homography.v4p (23.3 KB)

this is not possible, homography is a perspective transformation. it only works on 3d coordinates with w component, not on 2d texture coordinates.

you need to transform the whole quad, and then you can make masks or so if you need the framing.

also use the very good forums search, there have been about 5 similar questions in the past… there you will find more tipps and tricks.

that’s actually wrong, it’s not gonna work with any regular shader, since there have to be devision by w component when u multiply by tTex, however there is a shader that has that already implemented
homo ttex.v4p (7.5 KB)

yes, that shader does account for the w component. didn’t know its in the DX11 pack…

a little bit late,

but thanks a lot!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.