Yesterday I posted this in the Bugs report, but I'm maybe missing something, because no one else complains about that.
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=12651
I'm just trying to access two diferent textures in a pixel program, here is a copy of the post.
----------------------------
Ok here's a simpler version of my problem with irrlicht shaders example.
In main.cpp, test scene node1 initialization, change:
Code: Select all
node->setMaterialTexture(0,driver->getTexture("../../media/wall.bmp"));
Code: Select all
node->setMaterialTexture(0, driver->getTexture("../../media/water.jpg"));
node->setMaterialTexture(1, driver->getTexture("../../media/wall.bmp"));
In OnSetConstants, add:
Code: Select all
float a = 1;
services->setPixelShaderConstant("wall", &a, 1);
And finally, in the fragment program:
Code: Select all
uniform sampler2D myTexture;
uniform sampler2D wall;
...
vec4 e_col = texture2D(wall, vec2(gl_TexCoord[0]));
-----------------------
Could I be missing anything ??
PS: irrlicht 1.1 + VS2005