Log In  


3D texture mapping with tline (plus some other stuff, like wireframe rendering, and solid color polygon rendering). Did this as a learning project, to study old-school pre-GPU 3D graphics.

Thanks to freds72 and johanp for inspiration & example code.

Cart #texture_map-0 | 2020-11-06 | Code ▽ | Embed ▽ | No License
12

References if you want to learn.
http://www.multi.fi/~mbc/sources/fatmap2.txt
https://chrishecker.com/miscellaneous_technical_articles#perspective_texture_mapping
https://www.cs.cmu.edu/~fp/courses/graphics/pdf-color/14-raster.pdf
https://en.wikipedia.org/wiki/digital_differential_analyzer_(graphics_algorithm)
https://en.wikipedia.org/wiki/selection_sort
https://en.wikipedia.org/wiki/sutherland%e2%80%93hodgman_algorithm
Book: "Computer Graphics: Principles and Practice 2nd ed."

12


thanks for posting - realized that edge walking requires full clipping. In my 3d engines, I do only near z clipping and let rasterization skip y-spans outside of screen.

(and we are sharing the same references 😜)


I originally handled screen clipping during rasterization too, but ended up removing it and adding full polygon clipping. I don't remember why. I think it was either faster in 1 situation or I was having trouble getting the texture mapping working correctly.

Anyway, here's an example of edge walking without doing full clipping:

Cart #texture_map_clipping-0 | 2020-11-18 | Code ▽ | Embed ▽ | No License



[Please log in to post a comment]