Closed stanleyjoy closed 12 years ago
Yes. That is how it works. It is extremely simple, very hacky, and might not be up for the job in your game. Just so you know. :)
But the idea is that you list the name of the textures you want to control rendering of in the order that they need to be rendered, and the renderer will take that into Account when sorting. In short, it will render materials using the texture listed at the top of the list first. Textures that are not listed will be added to the list as they are discovered by the renderer - Thus being renderd in an unordered fashion.
Be aware that basic renderqueues (opaque, transparent) take precedent before the TextureRenderIndexes file.
You should look at the code in Material and Camera to see what is going on with these indexes to understand it fully before using it.
I have images in this format... Player Animation Walk 01 02 03 04 05 06 How do I use this in the XML??? Should I use it like this <?xml version="1.0" encoding="utf-8"?>
Don't use XML comments. It should be like this - if the XNA content names are the ones you say. You can check that it works by checking whant gets loaded when it loads the file.
<Asset Type="System.String[]">
<!-- Add the names of textures that need to be sorted to avoid z-fighting -->
<Item>Player</Item>
<Item>Animation</Item>
</Asset>
</XnaContent>```
01 02 03 ... are the images
Just add lines to the XML files as shown. It can hold as many as you need.
What I am trying to say is, Should we specify the location of the Texture in the Item tag or we can just directly dump the Image name Stan
P.S. Going to buy Tentacles for my iPhone....Was this the project you guys have been working hard?????
Ah. I understand. You should use the XNA content name, which is typically the same as the filename. I can't remember if you should include the path name. You will have to try it out.
Yes. I have been working hard on Tentacles, among other upcoming titles. I hope you like it!
I have noticed that you have a XML called TextureRenderIndexes.xml in the FFWD.Template.XMLContent. Can we use this for the Z-Depth issue and if so how?? Stan