Framebuffer with Renderbuffer
Swipe to View Overlapping Shapes
Example WebGL framebuffer with texture color attachment and renderbuffer depth attachment.
Two shapes intersect and rotate in the foreground.
With depth testing enabled, fragments in front display over fragments behind.
Edges of the shapes disappear when they
through the back edges of the cube environment.
The shapes correctly display intersection.
Without depth testing the second shape draws
over the first shape.
Render to texture with depth
and a depth buffer.
If a picture's worth a thousand words, then a 3D model's worth ten thousand words! Consider 3D interactive content for learning, media, and marketing. Seven Thunder Software develops 3D models for Web design, with optimized (fast loading) 3D rendering software, from photographs, blue prints, ideas, and real objects.