[bugfix] [solved] grass and stencil shadows bug


01-04-2009 00:22:50

I have a scene with grass, and when I activate stencil shadows the framerate drops from 40fps to around 0.01fps, it practically freezes. Not sure why, the grass is not casting shadows, it does seem to receive them though. There isn't a receive_shadows material setting anymore so I can't try that, any ideas?


05-04-2009 14:56:32

Okay, you just need to stop it generating the edge lists. Go to GrassLoader.cpp and add this before the mesh->load() in the following 3 places:

line 326 GenerateGrass_QUAD()
line 505 GenerateGrass_CROSSQUAD()
line 653 GenerateGrass_SPRITE()

subMesh->setBuildEdgesEnabled(false); ///add this line
mesh->setAutoBuildEdgeLists(false); ///add this line



29-06-2009 10:51:32

improved in SVN HEAD, see GrassLoader::setBuildEdgesEnabled