News:

Function Finder  Find all the functions within source code files

Main Menu

Linear Texture Mapping

Started by kevin, November 18, 2005, 11:55:19 AM

Previous topic - Next topic

kevin

This is piccy of another more complex and yet old skool  PB demo.  The demo  uses  TextureTri to fill a simple 3d cube object.   Since PB is primarily a 2d language, the example handles the rotation/projection and rendering in code.  

 While the actual pixel rendering is performed with TextureTri.  Prior to rendering, the faces need to be split  in order approximate the perspective curve better, since TextureTri is a linear mapper (doesn't consider depth).   So each face is split twice, which gives improved image quality at medium-> far distances (at far distances you don't need to split as much) , but you'd need more sub-division in order to approximate the curve better when the object is really close to the camera.  but ya get that :)

 The demo sources includes both the sub-divided mapper and the purely linear mapper. Where you can see the classic slipping/distortion effect.