Short Contents

8.6 The zfile display driver

A `zfile' contains depth information for each pixel in the image and is meant to build a shadow map. The format of a `zfile' is described in Table 8.2.

Offset Type Name Description
0 int32 magic Typically 0x2f0867ab. Reading 0xab67082f means that swapping "endianness" in the entire file is necessary.
4 short xres The x resolution in pixels.
6 short yres The y resolution in pixels.
8 float[16] Np World to Normalized Device Coordinate transformation matrix, in row major order.
72 float[16] Nl World to Camera matrix, in row major order.
136 float[xres*yres] z data Top to bottom, left to right ordering.
Table 8.2: `zfile' file format.


To build a shadow map using a zfile, use "tdlmake `-shadow'" as described in Using the Texture Optimizer - tdlmake or issue a RiMakeShadow command in a RIB file.

3Delight 10.0. Copyright 2000-2011 The 3Delight Team. All Rights Reserved.