ProfilingSo I downloaded an evaluation copy of VTune a few days ago and fired it up to start checking out my software renderer, and to decide where to look for optimization possibilities. I found VTune to be quite simple to use (which is actually contrary to most remarks I have heard about it...) …
Performance UpdateIt's hard to believe, but I was able to almost triple the speed of my rasterizer by changing from an iterative algorithm to the gradient style algorithm - similar to what the Chris Hecker articles show. I am still using homogenous coordinates for my vertex transformation, and the…
Revisiting the RasterizerOver the last few days, I did some research on how other commercial rasterizers achieve good performance. I was surprised to see pretty much the exact same feature set and optimization tricks mentioned on all of the websites. I guess this means that there is a semi-optimu…
Looking to performance...Alright then, only two responses out of about 200 viewers isn't really an overwhelming majority - but it was a 100% vote for the software renderer articles [grin]. The trouble is, as I mentioned before, that my rasterizer isn't all that fast currently. So I am going to ta…
What to do...There has been some interest expressed regarding software rendering articles. I have thought about writing a few articles regarding my flexline and some of the interesting possibilities, but those are on hold until I find out about a few proposals that I have made (I'm keeping my fing…
Rasterizer is finishedThe rasterizer is finally finished as far as I am going to take it. It is surprising to me how delicate the algorithms are for rasterizers - you really take for granted what the graphics API is doing for you until you have to do it yourself!
Anyhow, with that finished I am goi…
Anyhow, with that finished I am goi…
Subpixel Accurate At Last!After quite a lot of work, I was able to get the subpixel accuracy into the rasterizer. I ended up not using Chris Hecker's articles after all, because he didn't use homogenous coordinates for his 3D data. Instead I used a variant of Dave Eberly's perspective interpolati…
Subpixel AccuracyIn my last post, Deyja mentioned that I didn't account for subpixel accuracy in my texture coordinate perspective interpolation. After looking into it, he is completely correct - at the edges of a triangle, the pixels that get selected don't fall exactly on the triangle's edge. T…
PerformanceWell, I was starting to get a little worried about my software rendering project. In a simple test scene, I was getting about 27 fps using a single threaded version of my pipeline. This is on a 320x240 frame buffer, so 27 fps is pretty slow even to start out with.
Then I switched over t…
Then I switched over t…
This post is going to cover two areas: 1) Triangle Clipping, 2) Multi-Threading
Triangle ClippingAs shown in my last post, triangle clipping is now added in to the pipeline. It exists as its own processor between the back-face culling processor and the rasterizer. I had been dreading writing this …
Triangle ClippingAs shown in my last post, triangle clipping is now added in to the pipeline. It exists as its own processor between the back-face culling processor and the rasterizer. I had been dreading writing this …
Z-BufferI added the z-buffer 'processor' to the flexline over the last few days. It was actually pretty easy to implement, since it just reads in a fragment, makes the depth comparison, and either passes on the fragment (and update the z-buffer) or else simply discards the fragment by not passing …
Perspective Interpolation FinishedAs promised, the perspective interpolation has been added. It took a little bit of reworking my rasterizer code, but it is up and running beautifully now. Here are the results:
It is quite a difference from the linear interpolation that I posted last time, shown h…
It is quite a difference from the linear interpolation that I posted last time, shown h…
Perspective InterpolationI am trying to get my head around perspective correct interpolation. There is no issue understanding how it is supposed to be implemented, but the idea of it seems to be pretty strange. The idea is, even after you have projected your vertices into clip space that the vert…
Texture SamplingI thought I would make a quick post to show the different between my point sampling implementation and my bilinear sampling implementation. Its really more to justify the difference for myself, because the performance difference between the two is just ridiculous. I have many opti…
Texture SamplingI implemented a texture sampling memory adapter class over the last few days. It is capable of point sampling and bilinear sampling, with mip maps and potentially some form of anisotropic sampling to be used at some point in the future. They may come some time down the road, but f…
More work on the FlexlineI added attribute interpolation to the rasterizer yesterday. I am now interpolating a vertex color over a triangle instead of just a constant color. It is nice to actually see some color up on the screen instead of just two-tone images. Check out the first screenshot of …
The FlexlineProgress has been slow but steady on the flexline. The most recent update was to change the buffers between stages to be more like queues than just normal arrays. The concept is to allow the previous pipeline stage to write new elements into the queue while the next pipeline stage can…
The FlexlineUp to this point, the rasterizer has taken the output of the vertex shader (vertices and primitive info), determined which pixels are covered by those primitives, and then colored them a specified color. To make the rasterizer work with a pixel shader, I need to modify it to output a p…
The FlexlineI finally fixed up my rasterizer yesterday. There was a bug in two different places, one in the scanline conversion and one in the horizontal line drawing. Both were tough to find, but very satisfying once I saw the whole thing working. I am looking forward to polishing up the raster…
FlexlineI just recently got VS 2005 installed on my work laptop, so I actually have a compiler to use again. The flexline hasn't been updated really at all recently, but I did find a bug in the triangle rasterization code. Since this is a software rendering system and completely separate from my …
Graphics Flex-LineFor lack of a better term, I am going to name the software renderer the graphics flex line. This is intended to show that the processors can be hooked up in a variety of ways and can be very flexible. In fact, it doesn't necessarily have to be a 'line' either. It could be a gra…
I started reviewing my code from the software renderer that I started last year. There are going to be some changes to the interfaces, but the overall design is in place and functioning.
The bulk of the changes are going to be setting the thing up to be multi-threaded. Previously I had designed it…
The bulk of the changes are going to be setting the thing up to be multi-threaded. Previously I had designed it…
On Upcoming ArticlesThe first article that I am going to be working on involves parallax occlusion mapping (POM). My second article published on gamedev.net also was about POM, but since I wrote that article I have made several speed improvements and have a few ideas about how to extend the algori…
I think I am going to put HydroGen development on the back burner for a little while. I am dangerously close to getting a bad case of burnout, and the development has really come to a screeching halt lately anyways. I am still committed to finishing the game, but at least for a while I am going t…
Unfortunately I am going to be going out of town to Arizona for a few days on business - real life always has a way of saying 'I'll let you know when you have spare time'. Even so, I guess it will give me some time to get some homework done and do more conceptual work on HydroGen.
I have begun inte…
I have begun inte…
I've been pretty busy lately with my day job and school, so not a huge amount of progress has been made. However, I did manage to get a few feature added into the game to make it seem a little more like, well... a game [grin]
Camera SystemSo the camera is going to be pointing perpendicular to the 2…
Camera SystemSo the camera is going to be pointing perpendicular to the 2…
Time To Spill The Beans...I have decided to finally talk a little more about the general idea behind HydroGen. I had initially wanted to wait to discuss any details, but I think it will be pretty hard to have a developer journal to explain how I am doing things in the game without being able to sa…
Advertisement
Popular Blogs
Advertisement