Make Ogre's earring cast shadows when it is transparent

Problems building or running the engine, queries about how to use features etc.
Post Reply
Radagast
Kobold
Posts: 33
Joined: Sun Nov 24, 2013 4:23 pm

Make Ogre's earring cast shadows when it is transparent

Post by Radagast »

Hi,

I'm trying to make Ogre cast shadown even if he is transparent. For that reason I changed Ogre.material a bit: I added "transparency_casts_shadows on" in Ogre/Skin and Ogre/Earring:

Code: Select all

material Ogre/Earring

{
	transparency_casts_shadows on

	technique
	
	{

		pass

		{

			ambient 0.7 0.7 0

			diffuse 0.7 0.7 0


			texture_unit

			{

				texture spheremap.png

				colour_op_ex add src_texture src_current

				colour_op_multipass_fallback one one

				env_map spherical

			}

		}

	}

}



material Ogre/Skin

{

	receive_shadows on
	transparency_casts_shadows on

	technique

	{

		pass

		{

			ambient 0.3 0.8 0.3


			texture_unit

			{

				texture GreenSkin.jpg

				tex_address_mode mirror

			}

		}

	}

}



material Ogre/Tusks

{

	technique

	{

		pass

		{

			ambient 0.7 0.7 0.6


			texture_unit

			{

				texture tusk.jpg

				scale 0.2 0.2
			}

		}

	}

}



material Ogre/Eyes

{

	technique

	{

		pass

		{

			ambient 1 0.4 0.4

			diffuse 1 0.7 0

			emissive 0.3 0.1 0

		}

	}

}

but it is crashing my app, with this error
Image
if I don't remove "transparency_casts_shadows on" from Ogre/Earring.
Why is this happening?

I'm using Ogre 1.9.0 and texture modulative shadowtype.

Thanks,
Radagast
Post Reply