FWIW, I've been working on support for OGRE 2.2 in CEGUI as of late and ran into this very issue. The fix is actually quite trivial. It simply involves making 2 changes to the HLSL shaders in the Ogre renderer module's Shaders.inl file.
1. PixelShaderColoured_HLSL
Code: Select all
"uniform float alphaPercentage;\n"
"\n"
"struct VS_OUT\n"
"{\n"
" float4 position : POSITION;\n"
" float4 colour : COLOR;\n"
"};\n"
"\n"
"float4 main(VS_OUT input) : SV_Target\n"
"{\n"
" float4 colour = input.colour;\n"
" colour.a *= alphaPercentage;\n"
" return colour;\n"
"}\n"
"\n"
2. PixelShaderTextured_HLSL
In this shader, we want to change the text to read the following:
Code: Select all
"SamplerState textureSamplerState;\n"
"uniform float alphaPercentage;\n"
"struct VS_OUT\n"
"{\n"
" float4 position : POSITION;\n"
" float4 colour : COLOR;\n"
" float2 uv : TexCoord0;\n"
"};\n"
"\n"
"float4 main(float4 colour : COLOR, float2 uv : TexCoord0, "
" uniform Texture2D texture0 : TEXUNIT0) : SV_Target\n"
"{\n"
" colour = texture0.Sample(textureSamplerState, uv) * colour;\n"
" colour.a *= alphaPercentage;\n"
" return colour;\n"
"}\n"
"\n"
After making these changes, the OP's original shader compiler problems go away and CEGUI bootstraps just fine. I'm posting this here until I can get the fix into the repo in case others are intersted in patching the OGRE renderer to work with DX11 in the short-term.