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!
Hi Irrlichters!
I'm working on shadows now and I desperately need to render my scene without any textures at all to get a depth pass.
I've already prepared a shader for that, but I can't get override material to work, here it is:
SOverrideMaterial oMat=driver->getOverrideMaterial();
oMat.Material.MaterialType=(video::E_MATERIAL_TYPE)mtlToonShader; // that's the material I want
oMat.EnableFlags=EMF_LIGHTING;//what do I need to..
oMat.EnablePasses=EMF_LIGHTING ;// set HERE?
You can't override MaterialType param. In EnableFlags You must put all material flags (E_MATERIAL_FLAG), which should be override, but in EnablePasses You must put all scene node types (E_SCENE_NODE_RENDER_PASS) which should be override.
Eg. if You have to disable lighting for solid and transparent nodes: