本文主要是介绍Ogre Atomsphere shader - Ogre3d大气层着色器,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
最近在研究ogre的shader,看了一下官网的教程,鼓捣了一下午总算是把效果搞出来,贴一下关键代码:
createSphere("sphere",10);
createSphere("Atomsphere",11);Ogre::Entity* PlanetEntity = mSceneMgr->createEntity("planet","sphere");PlanetEntity->setMaterialName("Examples/Rockwall");Ogre::Entity* AtmosphereEntity = mSceneMgr->createEntity("planet_atm_Ent","Atomsphere");//assign it our materialAtmosphereEntity->setMaterialName ("Atmosphere");//also this will make the atmosphere to be rendered behind the planetAtmosphereEntity->setRenderQueueGroup (Ogre::RENDER_QUEUE_BACKGROUND);//here you will replace PlanetRadius and AtmosphereRadius with your valuesAtmosphereEntity->getSubEntity (0)->setCu
这篇关于Ogre Atomsphere shader - Ogre3d大气层着色器的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!