Texture transform (difference ex9/dx9)?

heido!

playing around with catweasels rgb-luma shader. i struggled over a differncene in applying texture transformations on a quad or on an quad.x with the same size…

wonder, whether the problem lies within the x-file or do texture transformations apply differently on shaders than on dx9 geoms?

grz
woei

texturetrans.zip (4.7 kB)

Been trying that myself, seems the pixel shaders take 0,0 as being the top left corner, I tried doing the transforms in the shader but still couldn’t get it to work properly, but then maths isnt my strong point!
Will keep looking at it and let you know if I manage anything. Busy for the next 6days tho…

Cat

yes. vvvv uses texture coordinates from -0.5 to +0.5 to make the fully consistent with position coordinates. so you can interchange texture- and position coordinates easily. a default quad maps a default texture 1:1, rotation occurs around the middle point etc.

unfortunately computer graphics history came out with the fact that the world has its center at 0,0 while texture coordinates go from 0 to 1, with 0.5 in the middle. DirectX and HLSL follows that tradition and vvvv really tries to hide that. which creates a problem, as the pixel shaders within vvvv are native HLSL.
for now we recommend setting up your shaders so that you can accept the vvvv convention of accepting zero-centered coordinates (although i currently dont know which of the supplied shaders actually do).
integrating some smart conversions is on the wishlist, but many other things are as well…