Mogre Texture shadows.


18-09-2009 13:45:48

I was struggling a lot, but it seams that texture shadows are not working in mogre out of the box like they are working in Ogre.

Somewhere along my forum search I have found that you can use integrated shadows.

Can you tell me what should i do to make this basic example work with textured shadow (probably integrated).

This is one "light" , simple "plane" and "ninja" on it.

Great thanks in advence.

mgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_TEXTURE_MODULATIVE;

mgr.AmbientLight = new ColourValue(0.1f, 0.1f, 0.1f);

Light lgt=mgr.CreateLight("LIGHT1");
lgt.Position = Vector3.UNIT_Y * 200 + Vector3.NEGATIVE_UNIT_X * 50;
lgt.CastShadows = true;

Entity myNinja = mgr.CreateEntity("ninja", "ninja.mesh");
myNinja.CastShadows = true;

Plane myPlane = new Plane(Vector3.UNIT_Y, 0);

MeshManager.Singleton.CreatePlane("ground", ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME
, myPlane, 1500, 1500, 20, 20, true, 1, 5, 5, Vector3.UNIT_Z);

Entity myGround = mgr.CreateEntity("GroundEntity", "ground");

myGround.CastShadows = false;