I have created a terrain using Triangle Strips and it is being rendered properly.
But when I add water ( QUAD with BLENDING enabled - ranging from one end of terrain to the other end, lies somewhere in the middle of the terrain in Y-direction ), the edges where water ( QUAD ) intersect the terrain starts shaking(i.e vibrating).
What could be the problem ?
By the way, this is what happens in the Render() function :
I don’t see any bad things at first glance. I just can say that if you want to do transparencies then this function should be best than the one you stippled:
BlendFunc(SRC_ALPHA, ONE_MINUS_SRC_ALPHA);
But that will surely not resolve your shaking problem.
>> gluPerspective(45.0f, w/h, 0.1f, 20000);
I suspect z-fighting caused by insufficient depth buffer precision.
Does the shaking looks like this ? Then try with distance values that are nearer to each other, like :
gluPerspective(45.0f, w/h, 2.0f, 10000.0f);
Originally posted by jide:
[b]I don’t see any bad things at first glance. I just can say that if you want to do transparencies then this function should be best than the one you stippled:
BlendFunc(SRC_ALPHA, ONE_MINUS_SRC_ALPHA);
But that will surely not resolve your shaking problem.[/b]
Hi JIDE !
Thanks a lot.
Water looks a lot better now…( i.e more realistic. )
Originally posted by ZbuffeR:
[b]>> gluPerspective(45.0f, w/h, 0.1f, 20000);
I suspect z-fighting caused by insufficient depth buffer precision.
Does the shaking looks like this ? Then try with distance values that are nearer to each other, like :
gluPerspective(45.0f, w/h, 2.0f, 10000.0f);