Category: 2D Overlay
Syntax:
b2dDrawImageQuadDepthUV:Void(image:Int, x1:Int, y1:Int, z1:Double, u1:Double, v1:Double, x2:Int, y2:Int, z2:Double, u2:Double, v2:Double, x3:Int, y3:Int, z3:Double, u3:Double, v3:Double, x4:Int, y4:Int, z4:Double, u4:Double, v4:Double)
Void
The textured face of a 3D model: a depth per corner, as
b2dDrawImageQuadDepth, and an image point per corner, as
b2dDrawImageQuadUV. This is the call a mesh loaded with
b2dLoadMesh is drawn with, one face at a time.
Returns nothing.
u and v run 0 to 1 across the image, left to right and top to bottom, and
are not clamped — values outside that range repeat the edge pixels. Depths are clamped to 0..1
and tested per pixel against the same buffer as
b2dDrawQuadDepth and b2dSetDepth,
so faces can be drawn in any order.
Pass perspective-correct depths (a + b/z, not raw view z), or a flat face creases
along its diagonal — see b2dDrawImageQuadDepth. Where there is no depth buffer (inside a render
target, or with a screen shader applied) it draws flat, in call order. Palette-cycling (indexed)
images draw nothing.
View detailed documentation online
; one face of a model: projected corners, their depths, and the face's own UVs b2dDrawImageQuadDepthUV(tex, sxA,syA,dA,uA,vA, sxB,syB,dB,uB,vB, sxC,syC,dC,uC,vC, sxD,syD,dD,uD,vD)
See examples/Runtime/29 - Image Quads/ImageQuadUV.bam.
BambooBasic © 2026 Michael Denathorn