   switching d3d texturecoordiantes
  is there anyway to to change the way direct3d uses texture cooridnates? cuzz im gettin all confused with thinking one way and then have to rethink it in d3d... i find the d3d definition very illogical.. since origo is at bottom left in most coordinate systems?from =>   to0.0-1.0  0.1-1.1|    |    =>  |    |0.1-1.1  0.0-1.0
Quote:Original post by Dragon_Strikeis there anyway to to change the way direct3d uses texture cooridnates? cuzz im gettin all confused with thinking one way and then have to rethink it in d3d... i find the d3d definition very illogical.. since origo is at bottom left in most coordinate systems?You can reorient texture coordinates using the texture matrix in fixed-function processing or your vertex shader in programmable processing.  I describe the vertex processing applied to texture coordinates in Chapter 11. Basic Texturing from my book.   ;  thx... but i dont rly understand it...   ;  Texture coordinates in D3D is similar to screen space - that is, the pixel (0,0) is at the top left of your screen. Same for textures.   ;Quote:Original post by Dragon_Strikethx... but i dont rly understand it...Do you understand how a matrix works to transform a point from one coordinate system to another?That's what the texture matrix does, except instead of transforming the position of a vertex like the world matrix, it transforms the texture coordinates.  Each texture stage has its own matrix that can be applied to the texture coordinates before they are used to sample a texture.   ;  that i understand.. what i dont understand is how u set this texture matrix... and if i have to call it in the shader or if it will do it automaticly   ;  In managed Direct3D, call IDirect3DDevice9::SetTransform to set the texture transformation matrix:device.SetTransform(TransformType.Texture0, matrix);Here, Texture0 specifies that the transformation is to be applied to the first (index 0) texture stage. This code won't do anything, though, unless you enable transformation of texture coordinates using:device.SetTextureStageState(0, TextureStageStates.TextureTransform, (int) TextureTransform.Count2);I've assumed you're using 2D textures. If not, change the Count2 as appropriate. The process is analogous in unmanaged DirectX.In order to invert the v-axis, you'll want the following matrix:1  0  0  00 -1  0  10  0  1  00  0  0  1Admiral   