News for hackers. Stuff that matters.
Re:My Most Important Project Was a Bytecode Interpreter by Rexxar on Thursday September 22, 2016 @07:47AM (#12556134)
Concerning last point, do you know nice example of non-scanline-based 2D renderers ?
Re:My Most Important Project Was a Bytecode Interpreter by nadam on Thursday September 22, 2016 @09:43AM (#12556738)
A very informative tutorial on high performance edge-function based rasterization:

https://fgiesen.wordpress.com/2013/02/17/optimizing-sw-occlu...

(articles 6, 7, 8, others are not closely related)

As far as I know modern hardware has been non-scanline-based for ages btw.

Re:My Most Important Project Was a Bytecode Interpreter by Rexxar on Thursday September 22, 2016 @02:39PM (#12559071)
Thanks, looks very interesting. But it seems more 3D-oriented than 2D oriented.
Re:My Most Important Project Was a Bytecode Interpreter by Jasper_ on Thursday September 22, 2016 @11:11AM (#12557337)
2D renderers? Do you mean rendering 2D shapes? In that case, scanline is probably the most efficient thing you can do, but most renderers are not scanline. The only modern 2D scanline renderer I know of is in the Flash Player code.

For a 3D renderer, I recommend fgiesen's series as linked above, and the older series by Nicolas Capens: http://forum.devmaster.net/t/advanced-rasterization/6145

Re:My Most Important Project Was a Bytecode Interpreter by Rexxar on Thursday September 22, 2016 @02:31PM (#12559019)
Yes, 2d shapes. I'm writing vector drawing software and I use agg as backend (which use scanlines). In the long term it could be a good think to use or implement a more modern back-end.
Re:My Most Important Project Was a Bytecode Interpreter by Jasper_ on Thursday September 22, 2016 @03:22PM (#12559470)
Modern, fast 2D rasterization is a really hard problem, one which I'm currently writing a long-form article on. The classic Red Book stencil trick + Loop-Blinn from 2005 is the current state of the art, I think. I'd love to do more research there.

In terms of a software rasterizer, which can often be faster, it's just a matter of elbow grease and engineering. Use SIMD. Implement tons of special cases.

Write a simple polygon plotter to get you started -- just fill a triangle with white with simple edge functions. Then work your way up to arbitrary polygons. And then look into the theory behind antialiasing and such.