After my recent fun with render to texture I've decided to backtrack a little. I'm a firm believer that the wise man knows when to walk away from something that isn't working out, and the render to texture issues were something that I had encountered before, and were - in fact - the primary reason why I started moving to HLSL in the first place!
So rather than a full changeover to fixed functionality we're now looking at a partial changeover. Water will still use HLSL where available, and I'm hoping to have a fallback software mode which uses something else (what that is going to be I'm not certain yet).
Just to elaborate on the rationale behind changing back to fixed, as the reasons are scattered over various posts going back over a month. There are in fact two main reasons behind this:
- Compatibility with older machines. There are a few older PCs that don't have the required PS 2.0 support, and locking them out of DirectQ defeats one of the reasons why DirectQ exists. I also believe that there are compatibility issues when running on Linux under WINE; this is not a target audience, but it's still nice to restore full support.
- Code simplification. The HLSL path wasn't that bad, but I found myself in a situation where if I wanted to add features like .alpha support or even fog I would have to do major shader rewrites with extra passes and even more infrastructure around them to support it. This doesn't happen with fixed.
It's not the first time I've done this backtracking thing (release 1.2 came very close to having a HLSL path and I still have experimental code from that build) and it likely won't be the last. It's a useful exercise when doing any major code changes, as it allows you to make a dry run at the changes, learn what works (and what doesn't) and then bring your knowledge forward to a fresh clean codebase.
0 comments:
Post a Comment