__________________ ________________/ the CTX files \ | | | envmap | | depth 16 | | | | corTeX / Optimum 20 Aug. 1998 | | | |____________________________________| Basics of environment mapping... To be creative, I chose a torus for example... To do envmap, its's in fact not hard: instead of using a fixed texture for the polygons, we determine the coordinates in the texture from the normal vectors of the vertice of the facet. I directly used two coordinates of the normal vectors ( in first approximation any coordinate can be used.. look in certain conditions if there are any constraint...) Eh, so, that's all about theory :) hum, practice now... I warn you, the program I give you is a big pooh :( that I hacked in one hour from a preceding big pooh 1) Its not optimized at all (not even 1 line of asm ) 2) its not portable ( as anything else ) 3) its not maintainable (if you change any parameter, its likely to crash ) 4) There is absolutely no 3d-engine behind ( facets are drawn in stupid order ..) But eh, we are not going to do your work !! Come on guys, go and write a kick-ass demo :) Note : At least all comments and ~some~ symbol names are in English... mmmh it seems I cant make both english and good pograms at the same time ;) ctx / optimum Thu Aug 20 00:16:49 CEST 1998