How to disable shadows

By default, the Untold Engine will render shadows to all 3D models. However, you can disable it by using the removePassPipelinePair method, as shown below:

//create an U4DGameObject that represents the soldier
U4DEngine::U4DGameObject *soldier=new U4DEngine::U4DGameObject();

//Load up the model information into the engine. Note, the "hero" name comes from the scene made in Blender 3D
if (soldier->loadModel("hero")) {

//If you want to disable shadows, then you can remove the shadow shader
soldier->renderEntity->removePassPipelinePair(U4DEngine::shadowPass);

//load the rendering information into the gpu
soldier->loadRenderingInformation();

//add the model to the scenegraph
addChild(soldier);
}

Last updated