I'm trying to pass some textures to the shader but irrlicht console says my textures doesnt exist in the shader. My other shaders with one texture work normally.
Any ideas what causes this?
Code: Select all
float4x4 WVP : WorldViewProjection;
texture source;
texture mapping;
float2 move = float2(0, 0);
float stepSize = 0.01;
int samples = 10;
sampler2D RSS = sampler_state
{
texture = <source>;
addressU = CLAMP;
addressV = CLAMP;
minFilter = ANISOTROPIC;
magFilter = ANISOTROPIC;
};
sampler2D MAP = sampler_state
{
texture = <mapping>;
addressU = CLAMP;
addressV = CLAMP;
minFilter = ANISOTROPIC;
magFilter = ANISOTROPIC;
};
Code: Select all
irr::s32 texture = 0;
services->setPixelShaderConstant("source", &texture, 1);
irr::s32 map = 1;
services->setPixelShaderConstant("mapping", &map, 1);
HLSL Variable to set not found : 'source'. Available variables are:
'MAP' - Sampler
'RSS' - Sampler
'move' - variable(float2)
'samples' - variable(int)
'samples' - Strange, I didn't declare it twice...
'stepSize' - variable(float)