Hi everyone,
I’m using CCPageTurn3D in order to run a turn effect on a page sprite.
It works very well except for one problem:
The page I’m turning has an alpha edge and once I turn it, the alpha part of the png becomes black immidiately.
I found this cocos2d post mentioning it but didn’t quite get on how to do this on cocos2d-x:
http://www.cocos2d-iphone.org/forum/topic/28271
Anyone can help with this? Either by understanding the cocos2d post or by providing another solution?
Thanks a lot!
Idan
Try to disable depth test before turning and enable it after turning.
Thanks,
I tried it, but that completely ruined the effect…
And the black parts remained.
Idan
hi guys i have been able to solve a part of the page turn problem.
I am now able to apply page turn to any CCNode object, that includes image too.
Got a solution to render the backside of the page with the color i want.
able to apply it to the size i mention, and not for the whole screen.
HowEver i am not able to get rid of the problem, that the transparent bottom and left part turns black.
Hi,
I think its near and far plane problem of 3d.
Change CCDirector::setProjection() function initilization for 3d from
kmMat4PerspectiveProjection( &matrixPerspective, 60, (GLfloat)size.width/size.height, 0.1f, zeye*2);
to somthing like
kmMat4PerspectiveProjection( &matrixPerspective, 60, (GLfloat)size.width/size.height, 0.4f, zeye*4);