Just wrapping up some things before I break for a while. I've decided to use effect files (.fx) instead of standalone shaders, firstly for the sheer convenience, secondly because it's what authoring tools expect, and thirdly because they help to keep the code cleaner and simpler (always a bonus when dealing with Quake's wacky formats).
But damn it, they are slow. I can easily see myself losing the FPS I'd gained back from ditching render to texture as a consequence of just switching over to effect files. I've just brought the instanced brush model code up using effect files and lost 5 FPS as a consequence.
The SDK docs don't help much (at all!) by virtue of the way they just describe what each function does but hold off on any useful "this is the best way to do it" info, although I'm finding myself wondering if that would be a good thing at all, as a lot of D3D performance tips are either mutually exclusive or impossible to implement (at least without colossal supporting infrastructure) in any non-trivial real world application.
This ain't drawing teapots from .X files, Bill!
To say I'm not one bit happy about this would be an understatement. Quake is by no means a graphical heavyweight, and something is seriously wrong somewhere if a simple switch from standalone shaders to .fx files causes such a perf drop. It might be in my implementation, and if so that's cool, but there's part of me thinks a proper SDK would have prevented that.
Sunday, January 11, 2009
Effect Files and HLSL in general
Posted by
mhquake
at
7:47 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment