resove conflict

This commit is contained in:
yangxiao 2015-05-12 12:12:29 +08:00
commit 4d71175318
3 changed files with 23 additions and 2 deletions

View File

@ -263,6 +263,8 @@ Terrain::Terrain()
{
_alphaMap = nullptr;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
_customCommand.setTransparent(false);
_customCommand.set3D(true);
auto _backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED,
[this](EventCustom*)
{

View File

@ -28,7 +28,7 @@ if(u_has_alpha<=0)
texture2D(u_texture1, v_texCoord*u_detailSize[1])*blendFactor.g + texture2D(u_texture2, v_texCoord*u_detailSize[2])*blendFactor.b;\n
float grayFactor =dot(blendFactor.rgb, vec3(1, 1, 1));
color +=texture2D(u_texture3, v_texCoord*u_detailSize[3])*(1.0-grayFactor);
gl_FragColor = color*lightFactor;
gl_FragColor = vec4(color.rgb*lightFactor, 1.0);
}
}
);

View File

@ -34,6 +34,12 @@ TerrainSimple::TerrainSimple()
auto listener = EventListenerTouchAllAtOnce::create();
listener->onTouchesMoved = CC_CALLBACK_2(TerrainSimple::onTouchesMoved, this);
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
// add Particle3D for test blend
auto rootps = PUParticleSystem3D::create("Particle3D/scripts/mp_torch.pu");
rootps->setCameraMask((unsigned short)CameraFlag::USER1);
rootps->startParticleSystem();
this->addChild(rootps, 0, 0);
}
std::string TerrainSimple::title() const
@ -108,6 +114,19 @@ TerrainWalkThru::TerrainWalkThru()
_player->setScale(0.08);
_player->setPositionY(_terrain->getHeight(_player->getPositionX(),_player->getPositionZ())+PLAYER_HEIGHT);
// add Particle3D for test blend
auto rootps = PUParticleSystem3D::create("Particle3D/scripts/mp_torch.pu");
rootps->setCameraMask((unsigned short)CameraFlag::USER1);
rootps->setScale(30.0f);
rootps->startParticleSystem();
_player->addChild(rootps);
// add BillBoard for test blend
auto billboard = BillBoard::create("Images/btn-play-normal.png");
billboard->setPosition3D(Vec3(0,180,0));
billboard->setCameraMask((unsigned short)CameraFlag::USER1);
_player->addChild(billboard);
auto animation = Animation3D::create("Sprite3DTest/girl.c3b","Take 001");
if (animation)
{