loading Textures into Shaders...

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Revan1985
Posts: 89
Joined: Tue May 08, 2007 4:11 pm
Location: Italy

loading Textures into Shaders...

Post 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?
CPU: AMD PHENOMII X6 1090T BE 3,2GHZ
RAM : OCZ 8GB 2*4GB DDR3 LOW VOLTAGE 1333
VGA: GeForce GTX680 2GB
HD : 500GB + 500GB + 2x1TB Raid Edition + 500GB External
Motherboard: ASUS CROSSHAIR FORMULA 4 890FX AM3
PSU: Corsair 750W
CPU Cooling: Katana 2
Nimrod
Posts: 8
Joined: Sun Feb 22, 2009 8:10 pm

Post 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.
Post Reply