The Littlest CPU Rasterizer
11–18 of 18 posts
Re: The Littlest CPU Rasterizer
#12cool ! shouldn't it be: U32 ind = (xx-xStart + (yy-yStart) * 16+ ( zz-zStart ) * 16 * 16) * 2; in your code, though ?
Re: The Littlest CPU Rasterizer
#13Fun! When I saw spherical harmonics I was confused about why spherical harmonics would come into play in a voxel universe (isn't everything flat?). Digging into it a bit I found out more about spherical harmonic lighting: http://www.research.scea.com/gdc2003/spherical-harmonic-ligh...
That article's a classic; definitely worth a read for anyone interested in graphics.
Re: The Littlest CPU Rasterizer
#14i was trying to build a word cloud algorithm and then I had a question: how do you rasterize letter shapes? I looked at pyCairo but I couldn't figure out how to use it. http://cairographics.org/documentation/pycairo/3/ I asked on StackOverflow no answer http://stackoverflow.com/questions/21915335/getting-the-bitm... i found the true-type format shape files and extracted polygons from those - which i also don't know h…
Re: The Littlest CPU Rasterizer
#15i was trying to build a word cloud algorithm and then I had a question: how do you rasterize letter shapes? I looked at pyCairo but I couldn't figure out how to use it. http://cairographics.org/documentation/pycairo/3/ I asked on StackOverflow no answer http://stackoverflow.com/questions/21915335/getting-the-bitm... i found the true-type format shape files and extracted polygons from those - which i also don't know h…
For concave shapes like letters the best choice would probably be a scanline-based rasterization algorithm. Sort all polygon edges from top to bottom and walk through that list line-by-line, keeping track of all active edges for each scanline. For those you can then find all intersections and fill the ranges in-between. By using an even-odd rule you can make sure that concave polygons and polygons with holes are fill…
I know that's how stb_truetype's renderer works, incidentally. Don't know if Freetype is the same, but I'd be mildly surprised to find it wasn't.
Re: The Littlest CPU Rasterizer
#16i was trying to build a word cloud algorithm and then I had a question: how do you rasterize letter shapes? I looked at pyCairo but I couldn't figure out how to use it. http://cairographics.org/documentation/pycairo/3/ I asked on StackOverflow no answer http://stackoverflow.com/questions/21915335/getting-the-bitm... i found the true-type format shape files and extracted polygons from those - which i also don't know h…
I like stb_truetype myself. It's C so you'll have to bind it if you're using any other language, but it's a lot simpler than Freetype. (Less features too, but it'll take a .ttf and return a bitmap, which sounds like what you want.) http://nothings.org/stb/stb_truetype.h
In comparison, Freetype is absolutely monsterous; it is a few times faster according to some benchmarks I've found, but a few orders of magnitude bigger too. Sometimes you don't need the fastest, you just want something simple that works.
Re: The Littlest CPU Rasterizer
#17i was trying to build a word cloud algorithm and then I had a question: how do you rasterize letter shapes? I looked at pyCairo but I couldn't figure out how to use it. http://cairographics.org/documentation/pycairo/3/ I asked on StackOverflow no answer http://stackoverflow.com/questions/21915335/getting-the-bitm... i found the true-type format shape files and extracted polygons from those - which i also don't know h…
If you have access to a GPU (or can evaluate quadratic functions of barycentric coordinates) Loop and Blinn's 2005 algorithm is brilliant http://research.microsoft.com/en-us/um/people/cloop/loopblin...