Not too much today as I was feeling tired. I did implement HLSL paths for all brush models (including the world) and alias models (i.e. MDLs) but right now they don't really do much more than the old fixed-functionality paths did. About the only thing new is that translucent brush model alpha is now done correctly. I guess when I had implemented it in the fixed path that I had seen some alpha, and just assumed that it was OK, but it's not really. I'm not too certain how much effort I'll invest in fixing this.
Both of these were originally scheduled for 1.9, but they were so easy to do, and as I didn't really feel like getting stuck into some of the other required work I decided to just keep the momentum going by doing something.
The ultimate long-term objective is that everything (at least in the 3D refresh) will have both a HLSL path and a fixed path available. This is an absolute pre-requisite for the return of fog to the engine, as - I believe I may have mentioned this before - the old hardware fog is no longer guaranteed to be available in Shader Model 3 or above hardware (yes, it works in OpenGL, but D3D - being closer to the hardware - is affected by this kind of thing more).
Depending on your hardware your might find that the HLSL paths are somewhat faster than the fixed func paths. If you've anything from within the last 5 or so years you probably will, and if you've anything from within the last 2 or 3 you definitely should. This is mostly because on newer hardware fixed func is emulated through shaders constructed on the fly, so we're bypassing that and going direct. Another reason why is that shaders are much much lighter on the state changes than fixed func, requiring no texture blend modes to be set up or texture stages to be enabled or disabled.
Anyway, I'm reasonably certain that the only fixed functionality items left in the 3D view are particles and sprites (and the skybox, but I'll probably leave that as is), so I'm seriously considering going all the way with this for 1.8.5; the next step would be to start amalgamating my shaders so that we have One Shader To Rule Them All with different Techniques and Passes being set depending on what's being drawn.
In some respects this might be seen as a step backwards to the old 1.6.x releases, but overall what I've got now is much better. For starters HLSL is no longer an absolute requirement; it will be used if it's there but a fixed functionality alternative is available too. Secondly, things are a lot better integrated than they were in the past, with only a few lines of code in the difference between the paths.
All of this means that what I've been calling 1.8.5 all this time (even in this post) may end up getting a further version number bump. Not all the way to 1.9, of course, but something like 1.8.666 sounds about right. It does have implications for how 1.9 is going to shape up though, as a good chunk of work I had scheduled for it has now been brought forward. Interesting times.
Friday, July 2, 2010
Updates for 2nd July 2010
Posted by
mhquake
at
11:52 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment