Pages

Happy Chanukah 2010/5771

The Festival of Lights begins tonight. Enjoy!

Farmscapes CE


Help Joe restore his ranch in the brand new game by Playrix! Earn money by selling fresh veggies, juicy fruits, eggs, flowers and honey from his old farm to the townspeople, and spend it on restoring the landholding back to its grandeur and beauty. Breathe in new life into a formerly prosperous farm complete with clucking chickens, mooing cows and buzzing beehives. No need to make this lawn story short - indulge yourself in sun, color and blue summer skies!

 
 

Lilly and Sasha: Nexus of Souls


Zahhak has Sasha's body and is going to use it to claim the powers of the Immortals. Lilly has vowed to stop Zahhak at whatever cost, even if she has to kill her own sister to do it.Continue your journey from Curse of the Immortals with new puzzles, new skills, runes and trinkets, new characters and 10 new pets, two of which can join you in battle at the same time.

One step forward, one step back...

First, the good news:
"Florida Rep. Dean Cannon, the state's new House speaker, took a shot at healthcare reform ... questioning whether government should require citizens to purchase health insurance or raise taxes to give insurance to those who can't afford it"
Now the bad:
"A federal judge in Virginia on Tuesday rejected a legal challenge to the healthcare reform law"
U.S. District Judge Norman Moon based his (wrongheaded) decision on the stretched-beyond-anything-meaningful Commerce Clause, ruling that "there is a rational basis for Congress to conclude that individuals' decisions about how and when to pay for health care are activities that in the aggregate substantially affect the interstate health care market." [emphasis added]

Once again, we see misinformed individuals (notably, in this case, a Federal jurist) conflate health care with health insurance.

Sheesh.

Wednesday LinkFest

■ First up, from FoIB Bob D:

"In an open letter to America's medical students, Representatives [sic] John Barrasso (R-WY) and Tom Coburn (R-OK) warned of the consequences the health care law will bring to their future practice of medicine. In particular, they chastised the law for interfering with the personal relationship between doctors and patients."

Ya think?

■ Next, HHS Secretary Shecantbeserious has allowed the CMS to publish next year's Medicare premiums and deductibles:

■ And finally, FoIB Holly R tips us to this little life insurance doozy:

"Insurers have long used blood and urine tests to assess people's health — a costly process. Today, however, data-gathering companies have such extensive files on most U.S. consumers—online shopping details ... that some insurers are exploring whether data can reveal nearly as much about a person as a lab analysis of their bodily fluids."

On the one hand, insurers aren't allowed to use genetic testing, but if shopping's in your blood...

Bye, bye Pre-Pass lighting

I have an announcement to make.

I am dumping pre-pass lighting.

A couple of weeks ago I started to remaking the renderer from a deferred shader to a pre-pass lighting one. Directly after implementing it, I wrote this post. At first, pre-pass lighting sounded great: faster light rendering and more variation in materials. Having seen that companies such as Crytek and Insomniac Games used it, I thought it would be the next logical step to take.

However, even as implemented it, the problems began. The first one was that specular lighting has to be made through hacks or something that makes it closer to deferred lighting. The next was that implementation become more messy. I suddenly needed to redraw all objects in two separate passes and this made the material and shader code harder to maintain. Normal deferred shading has this nice design where all material info is rendered in one pass to one buffer. But in pre-pass lighting, this spread out and makes more annoying to add new stuff and to update existing.

Still, I stuck to it, because I was sure that the speed and material variety would make up for it. One of the features I was looking forward to was making more interesting decals, with normals and such. Since only the light data is written to an accumulation buffer I thought this would allow me to easily put more effects to the decals. However, I quickly realized that I had been quite foolish and not considered that pretty much every interesting part of a materials is added when lighting it. The surface normals, specular, etc are all baked into the light data. So I ended up doing tricks that I could actually work with normal deferred shading.

So what ended up with was lighting of worse quality, compared deferred shading, and with no more room for special effects. Still, this rendering is much faster right? Well, I did some checks which I collected in this post. It turns out that pre-pass is actually slower unless in very specific situations. None of the improvements I was hoping for turned out to be true.

Still, I stuck to it. I am not sure why, but I guess I did not want to face the truth after having put so much time and effort into it. Going back to the old renderer was something I did not want to consider.

Then last week, as I was starting making undergrowth for the terrain, it suddenly happened. I realized that I had to render the vegetation twice, creating more overdraw and making it a lot more cumbersome to implement. At this point I decided that I should seriously consider going back to the old deferred renderer. What I was most worried about about was that it would exclude us from consoles, but I found out that games like Burnout Paradise used a deferred shader too, and assuring me that consoles would still be possible to do.

This post by Adrian Stone, with an in-depth discussion on the subject, sealed the deal for me and I got to work with going back to deferred shading. I had actually come across Adrian's post before when implemented pre-pass lighting, but never read it carefully. I guess it would not had made me stop then since I wanted to check it out myself, but it is interesting to see how one can convince oneself that something is correct, to the point of avoid contradictory sources. This is a very important lesson to learn and one should always be prepared to reconsider and "kill your darlings".

Right now I have fully implemented the deferred shader again and even updated it a bit too. For one thing, I fixed so the decals support all the feature I had in the pre-pass lighting shader. Since we are aiming for a little higher specs (shader model 3 or 4) for our next game, I took that into account and was able to add some other fun stuff. Examples are colored specular and saving the emission in the g-buffer (allowing to cheaply to a variety of effects).

I am really happy to back to the old renderer and now that I am adding new features things are going a lot smoother. The pre-pass renderer was not all in vain though. I cleaned up the rendering code a lot and it also made me rethink how some features could be added. Last but not least, it also reminded me that I should never get too attached to an idea.

Cavalcade of Risk #119 is up!

Nina Kallen makes her CavRisk hosting debut with this terrific edition, categorized and anotated for your reading pleasure.