Why do planes have to be infinite?

So started this morning at 6:20AM and took Sasha to day care. Actually started work at a reasonable hour as well. Heard from Captain James, we will see about the weekend, may be a bit too windy. Cleaners arrived, I went out. Came back and they went. Had lunch, then picked up Sasha again. I’ve been informed that day care will now be charging VAT. I’ve informed day care that they don’t actually know how to calculate VAT properly so they are now in for a hell of a shock (all to do with flat rate, I used to be VAT registered, it’s one thing I do know quite a lot about).

So spent the day basically working on one last bug. It’s to do with lighting and a certain type of light having an infinite distance, basically no attenuation (which of course doesn’t happen in real life, but you tell an artist that). Now the original pixel shader solution has a finite mesh associated with it, so it cannot draw beyond a certain distance, the pixel shader version however doesn’t have that luxury, so writes all the pixels regardless providing they pass the plane test. Now this is where the fun is, for a cell to fail the plane test, all corners of a cell have to be outside one of the five planes of a pyramid. Problem is if one of those pixels happens to be the far plane, then the oblique of angles will mean that that pixel is on the wrong side of it, it then gets included as ‘passed’ and the lighting calc gets done on it. There is a solution, take the original range into account.

So some eleven hours later and I think I’ve mastered it, so time for some salad.

Leave a Reply

Your email address will not be published.