Are there any good tutorials for how to implement it.
Regars
Are there any good tutorials for how to implement it.
Regars
Use OpenGL occlusion queries, just use a bigger threshold than 0.
Ie. modify the exmaple at the bottom of this page http://www.opengl.org/registry/specs/ARB/occlusion_query.txt :
glGetQueryObjectuivARB(queries[i], GL_QUERY_RESULT_ARB,
&sampleCount);
if (sampleCount >= MINIMUM_CONTRIBUTION_IN_SAMPLES) {
// render object i
}
Or if you are after a more basic approach, just divide the approximative diameter of object by its distance to camera.
ei05tbe, can you post some screenshots of your terrain? I am eager to see. If not now, do it later.