Original Post
Hello,
I encountered some problems with this technique with implementation using xna 4.0. I understand the basic idea of material IDs, my main problem is passing material list into shader.
While searching on the net for answer to my question i found two ways of doing that:
1. Use texture arrays
2. Use texture3D to store materials
As far as i know XNA does not support texture arrays, so first one is out. With second one I got one problem, I have no idea how to use setData with texture3D
(say, i got 4 textures 256x256, but i don't know how to "push" them into texture3D).
My question is how to do that? (I know how to handle it inside hlsl, I only got problems with xna side)
Also, if someone know another way I'll be grateful
Thank you in advance
(note: I don't want to use texture atlas)
I encountered some problems with this technique with implementation using xna 4.0. I understand the basic idea of material IDs, my main problem is passing material list into shader.
While searching on the net for answer to my question i found two ways of doing that:
1. Use texture arrays
2. Use texture3D to store materials
As far as i know XNA does not support texture arrays, so first one is out. With second one I got one problem, I have no idea how to use setData with texture3D
(say, i got 4 textures 256x256, but i don't know how to "push" them into texture3D).
My question is how to do that? (I know how to handle it inside hlsl, I only got problems with xna side)
Also, if someone know another way I'll be grateful
Thank you in advance
(note: I don't want to use texture atlas)