david_gallagher at January 14th, 2012 17:48 — #1
I'm in the process of moving from dx9 to 11 and in my old shaders i was able to use tex2dproj to project a texture to a mesh. Does anyone know how this is now done in shader model 5? thanks for any hints in the right direction to go.
reedbeta at January 14th, 2012 18:40 — #2
I don't believe there is a specific function for projective texture lookup now. Instead, you must do the divide by w yourself and then do a regular sample.
float2 uv = uvw.xy / uvw.w;
david_gallagher at January 14th, 2012 19:32 — #3
That worked a treat! now I understand, I really appreciate the help with this, thank you!