2 _______________/ the CTX files \
4 | Free infinite plane |
7 | corTeX / Optimum 11 aug. 1998 |
9 |____________________________________|
12 Display a (2) free-directionnal infinite textured plane.
14 This is exactly the same method that was used in the free-directionnal
15 tunnel; only the formula in the precalculation routine is changed.
17 In fact I worked a bit more than that :) and optimised the routines:
18 precalc array are directly in ints, and no more in floats; and it is
19 in 8:8 fixed point instead of 16:16;
20 Such big precision was useless to interpolate for 8 pixels; and reducing
21 to 8:8 avoid one shifting when computing the texture address (the integer
22 part of Y is already on the good place) (when texture is 256x256)
25 it would be cooler if the texture was shaded (darker when far);
26 this could be done by switching to a palette-based txeture,
27 having some ( like 16) pre-darkened palettes, and choosing
28 the good one for each interpolating square.
29 ... I leave this as an exercise for you :) ...
31 You will notice the ripples at some orientations of the plane;
32 they are typical of this technique.
33 Perhaps it would be interesting to use other interpolation
34 method, on larger ranges, but with Quad-interpolation
35 (you dont know what it is ? => it will be a good exercise to
36 find and to implement it :) )
38 The texture is once again ripped from the gimp patterns...
42 corTeX / Optimum, time to sleep...