Page 1 of 1

loading Textures into Shaders...

Posted: Fri Apr 17, 2009 8:40 am
by Revan1985
I'm compiling a program with hlsl shaders...
how can i load 4 textures in the shader?

i've the Textures in the shader called
xTexture0
xTexture1
xTexture2
xTexture3


how can i do?

p.s.
How can i convert a dds texture in other formats?

Posted: Fri Apr 17, 2009 6:26 pm
by Nimrod
I have only used GLSL before, but I came across this thread that might help you.
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=31940
According to one of the the post, all you need to do is set the material texture in irrlicht, and in your HLSL code, initialize with

Code: Select all

sampler2d xTexture0 : register(s0);
sampler2d xTexture1 : register(s1);
//etc
somehow.. I have a feeling that you might need to add "uniform" in front of "sampler2d" though.