Sunday, June 15, 2014
Playing With Planets
I mean, how could I not play with planets after finishing the planet type code yesterday? Surely this is no surprise
At any rate, today I explored new surface patterns, color gradients, scattering tweaks, etc. in search of new and exotic planet appearances. I'll admit, it feels more like fun than work...but that's ok Really stumbled upon some beautiful-looking worlds today.
SMAA Custom Tweaking for Better Specular AA
It's been bothering me a bit lately how much specular aliasing we're seeing on things like small, distant asteroids. SMAA works almost magically well for traditional edges, but seems to have a harder time dealing with things like the single-pixel jaggies caused by physically-based shading.
Today I dug into the SMAA code to understand it a bit better, and ended up doing a minor rewrite of the last pass (SMAA is a three-pass ordeal) to perform a more aggressive blend using the detected edges. With this new blend I am able to significantly suppress the specular aliasing I will need to keep an eye on this to make sure it doesn't degrade quality in other areas (as I'm a bit surprised this wasn't used in the vanilla SMAA code), but so far things are looking quite a bit better!
Implicit Casts in UDF Function Resolution
Not a huge achievement or anything, but I mentioned the other day that I developed the technology for supporting automatic implicit casts in UDF. This is pretty much a necessity when you've got stuff like signed and unsigned ints, floats, etc. all floating around (teehee) in the same script. MyFunction(1) should pretty much just work, regardless of whether MyFunction takes a signed int, unsigned int, float, bool, etc. Perhaps surprisingly, that kind of thing doesn't just happen automatically, though. A compiler must recognize that the inner type (which is really an integer) can be automatically cast to those other types. In the case of a non-constant inner expression, it must even insert runtime code to perform that cast during execution (e.g. MyFunctionTakingAFloat(MyFunctionReturningAnInt(..)) needs extra runtime code that takes the return value of the inner function and casts it to a float before passing to the outer function).
That bit is done now! Just one more step forward
I didn't yet implement full overload resolution preferences (e.g., if two function overloads match and one requires casts while the other doesn't, the no-casting overload should be preferred without any ambiguity). That'll just take a few moments when I feel like doing it
---
June is picking up more and more speed, and I don't see any signs of that letting up. We've got a lot left to do, but we've also got some mighty powerful tools and tech to bring to bear on the LT universe
Post
Mon Jun 16, 2014 4:57 am
#1
Week of June 15, 2014
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford