Fog and stencil shadows

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Fog and stencil shadows

Post by knightoflight »

searched, but found nothing, sorry if the question isnt new:
I made fog and set it to node
node->setMaterialFlag(video::EMF_FOG_ENABLE , true);
i activate shadow with
node->addShadowVolumeSceneNode();
But the shadows are not fog'ged, how can set the EMF_FOG_ENABLE to the ShadowVolumeSceneNode, please ?
rincewind
Posts: 35
Joined: Thu Mar 25, 2004 5:28 pm
Location: Germany --> Bonn

Post by rincewind »

the method addShadowVolumeSceneNode() returns a pointer to the created shadow. So, you can do this:

Code: Select all

scene::ISceneNode shadow = node->addShadowVolumeSceneNode();
shadow->setMaterialFlag(video::EMF_FOG_ENABLE,true);
greetz, rincewind
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

oops, sorry that wasnt an advanced question when i see the answer, it was still beginner (but the problem is that when asking it looked advanced...) :oops:
thanks
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

but instead of the other nodes (billboard, animatedmesh) no fog:

Code: Select all

IShadowVolumeSceneNode* shadows = node->addShadowVolumeSceneNode();	
shadows->setMaterialFlag(video::EMF_FOG_ENABLE , true);
Post Reply