I finally got the ripple effect to show up and not be all black, but I have a new problem, which I think has to do with the depth buffer. The tall bits of the wave show through everything, even the stuff they're not supposed to, and are these solid transparent splotches (don't even display the image I want) and override anything that might be under it in that layer, and the low parts of the wave are just transparent. So my diagnosis is that somehow my depth buffer isn't working, and my color system is wrong. Im using a 16 bit depth buffer, and RGBA8 pixel format, so everything should be right, but it's all off. I tried the .vertexZ and that didn't change anything. Any suggestions?
Ripple Effect Depth Buffer Issue
(11 posts) (5 voices)-
Posted 2 years ago #
-
Have you tried decreasing the amplitude of the waves? Or is that not a viable option?
Posted 2 years ago # -
Doesn't help at all. I still get parts poking through, that are completely transparent to background, and parts that aren't poking through. Does an effect sprite have to be on it's own layer?
Posted 2 years ago # -
could you post an screenshot that shows the issue ? thanks
Posted 2 years ago # -
are you having the same problem I am perhaps? Maybe this is the same thing, riq?
http://www.cocos2d-iphone.org/forum/topic/2084#post-13145
Thanks riq for helping in my other post btw, you're awesome.
Posted 2 years ago # -
You did the RGBA8. Well, I did this:
// Use this pixel format to have transparent buffers
// BUG: glClearColor() in FBO needs to be converted to RGB565
[[Director sharedDirector] setPixelFormat:kRGBA8];As per the tests included with cocos2d, and I left out the 16 bit depth buffer lines and ripple3d worked fine for me.
Posted 2 years ago # -
I don't think it's the same problem, because my texture doesn't warp, it just makes that layer completely transparent any place the wave's z value is going up, and I'll post a screen shot in a bit. I'm gonna go eat dinner now.
Posted 2 years ago # -
Have you tried removing the 16 bit buffer?
Posted 2 years ago # -
What do you mean remove it? Just take out the code for changing it to 16 bits? Or is there some way to clear it that I should be doing?
Posted 2 years ago # -
Try taking out the line for the 16 bit mention.
And make sure your RGB thing is exactly this line:
[[Director sharedDirector] setPixelFormat:kRGBA8];I'm only thinking it may help since as soon as I modify either, I get funky results using effects.
Or, can you post the code related to your Director's setup?
Posted 2 years ago # -
did anyone here get this fixed i have a similar problem... my mesh deforms and sticks through the layer above... which i dont want.... i cant have the height less or i wont see anything...
Posted 2 years ago #
Reply
You must log in to post.