Search code examples
c#xnatextureshlsl

how to create texture for modelmesh?


Is there a possibility to create a texture from a meshpart in xna. By getting a flat version of the mesh. So I can create a texture for it and edit that texture(via rendertarget)? I need to get the texture(which is not yet a texture) so I can put another texture on it.

I can create a texture and put it on a certain mesh. But I just can't figure out how I can create a texture with the right size.


Solution

  • I found out i could use tex2dproj() in hlsl.

    example: http://iloveshaders.blogspot.nl/2011/10/projective-texturing.html