Demo - billboard zbuffer

11.PerPixelLighting - darker light, enable specular again for diffuse
- replace wrong irrlichtlogo2.png (was a test around 2005)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6088 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
engineer_apple 2020-02-22 21:28:25 +00:00
parent 8554ec93f9
commit fe7778d8d8
7 changed files with 16 additions and 13 deletions

@ -277,7 +277,7 @@ int main()
/*
And at last, we create a nice Irrlicht Engine logo in the top left corner.
*/
env->addImage(driver->getTexture(mediaPath + "irrlichtlogo2.png"),
env->addImage(driver->getTexture(mediaPath + "irrlichtlogo3.png"),
position2d<int>(10,10));

@ -978,7 +978,7 @@ int main(int argc, char* argv[])
// load the irrlicht engine logo
IGUIImage *img =
env->addImage(driver->getTexture("irrlichtlogo2.png"),
env->addImage(driver->getTexture("irrlichtlogo3.png"),
core::position2d<s32>(10, driver->getScreenSize().Height - 128));
// lock the logo's edges to the bottom left corner of the screen

@ -285,9 +285,9 @@ int main()
driver->getTexture(mediaPath + "rockwall.jpg"));
room->setMaterialTexture(1, normalMap);
// Stones don't glitter..
room->getMaterial(0).SpecularColor.set(0,0,0,0);
room->getMaterial(0).Shininess = 0.f;
// Stones don't glitter.. (but specular highlight for EMT_SOLID)
//room->getMaterial(0).SpecularColor.set(0,0,0,0);
//room->getMaterial(0).Shininess = 0.f;
room->setMaterialFlag(video::EMF_FOG_ENABLE, true);
room->setMaterialType(video::EMT_PARALLAX_MAP_SOLID);
@ -365,7 +365,7 @@ int main()
// add light 1 (more green)
scene::ILightSceneNode* light1 =
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 800.0f);
video::SColorf(0.5f, 1.0f, 0.5f, 0.0f), 400.0f);
// add fly circle animator to light 1
scene::ISceneNodeAnimator* anim =
@ -398,7 +398,7 @@ int main()
// add light 2 (red)
scene::ISceneNode* light2 =
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 800.0f);
video::SColorf(1.0f, 0.2f, 0.2f, 0.0f), 400.0f);
// add fly circle animator to light 2
anim = smgr->createFlyCircleAnimator(core::vector3df(0,150,0), 200.0f,

@ -120,7 +120,7 @@ int main()
const io::path mediaPath = getExampleMediaPath();
// add irrlicht logo
env->addImage(driver->getTexture(mediaPath + "irrlichtlogo2.png"),
env->addImage(driver->getTexture(mediaPath + "irrlichtlogo3.png"),
core::position2d<s32>(10,10));
//set other font

@ -318,7 +318,7 @@ int IRRCALLCONV main(int argc, char* argv[])
device->getCursorControl()->setVisible(false);
// load the engine logo
gui->addImage(driver->getTexture("irrlichtlogo2.png"),
gui->addImage(driver->getTexture("irrlichtlogo3.png"),
core::position2d<s32>(10, 10));
// show the driver logo

@ -497,6 +497,7 @@ void CDemo::loadSceneData()
bill = sm->addBillboardSceneNode(0, core::dimension2d<f32>(100,100),
waypoint[r]+ core::vector3df(0,20,0));
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
bill->setMaterialTexture(0, driver->getTexture(mediaPath + "portal1.bmp"));
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->addAnimator(anim);
@ -583,7 +584,7 @@ void CDemo::createLoadingScreen()
const io::path mediaPath = getExampleMediaPath();
// irrlicht logo
device->getGUIEnvironment()->addImage(device->getVideoDriver()->getTexture(mediaPath + "irrlichtlogo2.png"),
device->getGUIEnvironment()->addImage(device->getVideoDriver()->getTexture(mediaPath + "irrlichtlogo3.png"),
core::position2d<s32>(5,5));
// loading text
@ -648,8 +649,8 @@ void CDemo::shoot()
else
{
// doesnt collide with wall
core::vector3df start = camera->getPosition();
core::vector3df end = (camera->getTarget() - start);
start = camera->getPosition();
end = (camera->getTarget() - start);
end.normalize();
start += end*8.0f;
end = start + (end * camera->getFarValue());

@ -70,7 +70,7 @@ bool CMainMenu::run()
gui::IGUIListBox* box = guienv->addListBox(core::rect<int>(10,10,220,120), optTab, 1);
box->addItem(L"OpenGL 1.5");
box->addItem(L"Direct3D 9.0c");
box->addItem(L"Burning's Video 0.47");
box->addItem(L"Burning's Video 0.5");
box->addItem(L"Irrlicht Software Renderer 1.0");
switch (driverType )
{
@ -184,6 +184,7 @@ bool CMainMenu::run()
{
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
bill->setMaterialTexture(0, driver->getTexture(mediaPath + "particlered.bmp"));
}
// add fly circle animator to the light
@ -202,6 +203,7 @@ bool CMainMenu::run()
{
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
bill->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
bill->setMaterialTexture(0, driver->getTexture(mediaPath + "portal1.bmp"));
}
// add fly circle animator to the light