I am trying to integrate XEffects to my project but having some troubles with my custom materials. I've read several pages from this post and came to the understanding that XEffects isn't supposed to mess with my materials but simply add the shadows "on top".
My materials are removed though and simply replaced with a solid white color.
There are only two XEffects/Shader related errors in the console (seen above). The "error X3025" one also shows without XEffects and the scene still renders properly. So I discarded it as irrelevant.
This is a shader example. It's for the main dude (I omitted the variable/struct declaration for brevity):
- Code: Select all
VS_OUTPUT vs_main(VS_INPUT In)
Out.Pos = mul( In.Pos, WorldViewProj );
Out.TCoords = In.TCoords;
Out.light = dot(normalize(mul( In.Normal, WorldViewProj )),normalize( float3(1,1,0)))/ 2 + 0.5;
Out.light = 1- Out.light;
float4 ps_main( float4 inDiffuse: COLOR0,
float2 inTCoords: TEXCOORD0,
float inLight: TEXCOORD1
) : COLOR0
float4 color = tex2D( Tex0, inTCoords );
float2 lookup = float2 ( inLight, LevelProgress );
float4 lookupCol = tex2D( Tex1, lookup ) * 3;
color = lookupCol * color;
if( Anaglyph == 1 )
float itensity = dot( color, float4( 0.299, 0.587, 0.184, 0 ) );
color.rgb = itensity.xxx;
XEffects is initialized like this:
- Code: Select all
XEffectHandler = new EffectHandler( Env::Device, Env::Driver->getScreenSize(), false, true, false );
XEffectHandler->setAmbientColor( video::SColor( 255, 32, 32, 32 ) );
The effect also occurs when I don't have any shadowLights or shadowNodes in my scene.
Graphics Card: ATI Radeon HD 5700
Device: DirectX 9
I already recompiled the engine and there are no further shader errors.
In case its relevant, the graphics engine and xeffects are initialized in a seperate project which is statically linked to my bootstrapper, which also loads the game.dll. Don't think this causes the mess though since everything is handled in the engine lib.
I hope someone can help, I would really like to add those shadows to my game