The Direct3d11 pixel shader used by Dear ImGui is usually this:
Code: Select all
struct PS_INPUT
{
float4 pos : SV_POSITION;
float4 col : COLOR0;
float2 uv : TEXCOORD0;
};
sampler sampler0;
Texture2D texture0;
float4 main(PS_INPUT input) : SV_Target
{
float4 out_col = input.col * texture0.Sample(sampler0, input.uv);
return out_col;
}
Code: Select all
material->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstant("sampler0", 0);
However, when I do the same in Ogre 2.2, it says no such named constants exist. If I leave the variable unset, I get
as an error on the next draw call.The Pixel Shader unit expects a Sampler to be set at Slot 0, but none is bound
Does anyone know if this is a regression in Ogre 2.2, or if there's simply a new way to set this value?