Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Nicolas Capens, posted on January 13, 2005




Image Description, by Nicolas Capens



It's been quite a while since I showed anything new here so I'll tease you with this cryptic development image of my project; swShader. The reason why I have been this quiet lately is not because I'm phasing things out, on the contrary, I'm too busy turning it into a finished product!

The image is a screenshot of the WHQL DCT, which is a free Direct3D conformance test suite from Microsoft. I've only recently started using it, but I expect it will be quite useful to test swShader's capabilities. The screenshot shows the simplest test of all, which checks whether pixels are filled correctly by comparing it to the reference rasterizer. Even with this simple test I detected a bug in the swShader render core and several in my Direct3D interface implementation. The good news is that things -can- now become practically bugfree.

Ironically, I was able to run a popular game before being able to run DCT tests! Of course most of you would rather see a screenshot of the game, but I'm keeping that for later to have a bigger impact. And let's face it, passing DCT tests is a more important breakthrough. ;-) I'm also in close contact with a company willing to invest in it so I can finally make some good money with it. That's probably bad news for anyone who wished to work with it for free, but I promise I'll keep contributing to the community as much as I can!

If you haven't already, please visit my new homepage for some more information: http://sw-shader.sourceforge.net

Best regards,
Nicolas "Nick" Capens


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
shadowman131

January 13, 2005, 01:01 AM

Nice Nick :) Quite nicely colored triangles ;)

So what sort of framerates do you get now out of curiousity?

And will SoftWire still be free, at least for non-commercial projects?

PS I forgot to tell you awhile ago I believe that the Run-Time intrinsics are purely amazingly useful :)

 
Sebastian Wagner

January 13, 2005, 01:43 AM

This is definitely one of the most interesting and exciting projects I've seen. It's a nice accomplishment you were able to steadily go on with it for years. You may go and Make Money (tm) now =)

 
Nick

January 13, 2005, 02:57 AM

shadowman131 wrote: Nice Nick :) Quite nicely colored triangles ;)

Thanks! I know this screenshot isn't too exciting in itself. Well... you'd be surprised how little projects manage to get their triangle filling rules 100% correct. ;-)
So what sort of framerates do you get now out of curiousity?

That's the toughest question to answer. It depends totally on the exact render operations used, the scene complexity, quality settings, etc. But I have very high hopes that even the -latest- generation of games will run at playable framerates in modest resolutions on a recent Pentium M or Celeron/Sempron.

There's still lots of work to be done though, but being able to use the DCT will help increase Direct3D conformance in little time. Only after that I'll start focussing on maximizing performance. I've got tons of ideas left to try that could be revolutionary in itself...
And will SoftWire still be free, at least for non-commercial projects?

I'm still discussing this with the company, but it will most probably stay available in its current form. I'll try adding minor updates, but totally new features will be licensed by the company. Anyway, it has already reached a very mature level and it's feature-complete for its current purposes. Anything new would probably be a layer above it...

 
Nick

January 13, 2005, 03:00 AM

Sebastian Wagner wrote: This is definitely one of the most interesting and exciting projects I've seen. It's a nice accomplishment you were able to steadily go on with it for years. You may go and Make Money (tm) now =)

Thanks for the approval. ;-)

 
Chad Austin

January 13, 2005, 04:20 AM

Nice job Nick! Hope you can make a nice living doing the stuff you clearly enjoy. ;)

 
Sebastian Wagner

January 13, 2005, 05:39 AM

You are welcome =)

 
RAZORUNREAL

January 13, 2005, 05:46 AM

Hadn't seen this before, impressive stuff. It occurs to me a software renderer like this is what realtime raytracers should be compared to, not the latest games...

 
davepermen

January 13, 2005, 06:02 AM

indeed. but most don't get that and cry "but raytracing isn't as fast as my doom3 or farcry or hl2 or what ever"..

nicks work is amazing, i can only congratulate and wish him all the best. it will definitely be the software rastericer that should show the power of rastericers, compared to software raytracings. it's the best rastericer out there.

 
kitt3n

January 13, 2005, 08:50 AM

I think you really deserve earning some money with it :)

>I'm also in close contact with a company willing to invest in
>it so I can finally make some good money with it.
Just a wild guess: radgametools

Regards

 
xunil

January 13, 2005, 09:21 AM

You're too productive! I hate you!. Seriously though Nick you must be a coffee /caffeine fiend, where do you find the time? You must spend a lot of late nights on this.

Not much of an image but very interesting! It's not hard to guess how impressive the demos will be that you can produce when you have dx9 fully working. It will be good to have something cool to show non-programmer types.

 
hplus1104

January 13, 2005, 10:04 AM

it's the best rastericer out there


How does it compare to Pixomatic?

 
Scali

January 13, 2005, 10:30 AM

Let me know when the project moves from single-person to two or more :)

 
iplayfast

January 13, 2005, 10:40 AM

Just looked at your sf project, and I must say you've taken a lot on. It looks to me like you are concentrating on DirectX3d. Do you plan support of opengl extensions as well?

Finally, do you plan support for linux? That would be awesome.

 
davepermen

January 13, 2005, 12:22 PM

i don't know performance wise in ordinary renderings (but i'd guess pixomatic can't beat it there as well, except if they fake some stuff (lerp, or half-res fakes)), but definitely sw-shader rocks when it comes to shaders. runtime compiled near-to-optimal sse 4x code for every shader-configuration will beat out any other system, that uses just the cpu.

there isn't a faster way without hw. tell me one..

 
tokjunior

January 13, 2005, 12:33 PM

Nice, but not too fast ;P Way faster than the ref-rasterizer though.
The carphong-demo gets 30fps at 1024x768 on my XP3000+.

 
Nick

January 13, 2005, 02:05 PM

xunil wrote: You're too productive! I hate you!. Seriously though Nick you must be a coffee /caffeine fiend, where do you find the time? You must spend a lot of late nights on this.

And still I wish I could go faster. ;-) I've got exams this month so I have to drop all development... On a normal week I work on it from the time I get back from class till 2 - 4 am and then at 7.30 my girlfriend wakes me to go to class again. :-P So that helps 'creating' time.

Anyway, this time pressure has tought me how to work more efficiently. I get somewhat irritated (or irritating ;-) when I see people waste their time on something less useful. The trick is that whenever you feel like you're not getting anywhere, just write down a few goals you definitely want to reach in a couple days. Oh, and research before you code. There's nothing wrong with spending a week looking for articles, books, webpages about what you're trying to do, working out things with paper and pencil, as long as makes you more confident you'll reach your goals quicker this way. Think about the long-term consequences...

I hope that was some useful information instead of boring you with trivial tips. ;-) Anyway, this IOTD fits right into these thoughs. It took me quite a while to figure out how to get the DCT tests working, but they'll be invaluable to detect bugs and function as regression tests when I add new optimizations to the core. So in the end they'll save time. At least that's the idea. ;-)

 
Nick

January 13, 2005, 02:26 PM

hplus1104 wrote: How does it compare to Pixomatic?

First and foremost swShader has more features. Pixomatic is DirectX 7-class while swShader is already far beyond that and becoming fully DirectX 9 compatible. Performance-wise Pixomatic is definitely still the winner. On the other hand I currently perform everything at 'hardware' quality or better, and I definitely intend to pass every possible DCT test. Admittedly this means I still have quite some way to go to replace these accurate algorithms with fast alternatives without affecting quality too much.

Anyway, nothing is limiting me. We both work on the same processors so unless we use radically different approaches the performances will converge. For the last year or so I've focussed on adding all features and optimizing at the high level (SoftWire), but low-level optimization is the fun part so expect me to at least try to closely approach Pixomatic's performance. Maybe beat it...

 
Nick

January 13, 2005, 02:42 PM

davepermen wrote: ...but i'd guess pixomatic can't beat it there as well...

Don't underestimate Michael Abrash! He's a genious when it comes to using x86 instructions optimally. And in a way he's my hero since it was Quake I that inspired me to start programming...

Anyway, I believe it's best to keep swShader distinct from Pixomatic as much as possible. Let's face it, only DirectX 7-class games can really be played in real time on current CPUs, and there's no better alternative than Pixomatic here. swShader is more useful in a few niche markets where DirectX 9 is required but 60 FPS is not. Next generation CPUs might enable more possibilities though...

 
Nick

January 13, 2005, 02:49 PM

You registered only to reply to this IOTD? ;-)

iplayfast wrote: Just looked at your sf project, and I must say you've taken a lot on. It looks to me like you are concentrating on DirectX3d. Do you plan support of opengl extensions as well? Finally, do you plan support for linux? That would be awesome.

DirectX 9 is definitely the first target. And with the DCT and abundance of games to test with, it's very attainable. After that it's quite likely that OpenGL 2.0 and Linux will be addressed, although by then DirectX 10 might be more interesting. I'm keeping all options open.

 
Nick

January 13, 2005, 02:57 PM

tokjunior wrote: Nice, but not too fast ;P Way faster than the ref-rasterizer though. The carphong-demo gets 30fps at 1024x768 on my XP3000+.

Quite good for this old demo. ;-) 1024x768 is an insane resolution for software rendering. Anyway, I hope I'll surprise everybody with the performance leaps I've taken in the last few months, and the many improvements still to come.

 
Bramz

January 13, 2005, 03:26 PM

wasting time is what spare time is good for :P

But respect for someone who can stay focussed and produce wicked results like this. Keep on the good stuff!

Bramz

 
tokjunior

January 14, 2005, 01:20 AM

It's insane, and I guess it's pretty good since you're running actual shaders, so the fillrate gets kind of massacred.
How well optimized is the x86 assembly the GPU assembly gets turned into?

 
Nick

January 14, 2005, 04:38 AM

tokjunior wrote: It's insane, and I guess it's pretty good since you're running actual shaders, so the fillrate gets kind of massacred. How well optimized is the x86 assembly the GPU assembly gets turned into?

The generated code is not optimal yet. Many operations are redundant or can be optimized. Much of that has improved in the current version I'm working on, and there are still major advancements to be made.

But that demo doesn't even use 50% of CPU time on pixel shaders. So there's also a lot of headroom by optimizing the vertex pipeline, clipping and rasterization.

Because I take "premature optimization is the root of all evil" very serious most of this has to wait a few more months, but I'm very confident that by the summer some pixel shader demos will run at more than twice this performance.

 
tokjunior

January 14, 2005, 07:35 AM

Yeah, but since the demos seem to be extremely fillrate-limited, i guess optimizing the shadercode would pay of a whole lot :)

 
iplayfast

January 14, 2005, 09:16 AM

Yours was the first project that was sufficient interest to me. :)

I'm a linux fan so I was hoping your answer in regards to Linux would be a bit more positive. Oh well, I'll keep waiting for ATI to get it's act together, so my 3d card can actually work like a 3d card. :(



 
Nick

January 14, 2005, 10:27 AM

tokjunior wrote: Yeah, but since the demos seem to be extremely fillrate-limited, i guess optimizing the shadercode would pay of a whole lot :)

At insane resolutions it's always going to be fillrate limited. ;-)

 
Scali

January 14, 2005, 01:10 PM

How about supporting an interlaced mode?
I used that back in the day on my Pentium for 1024x768
It updated even scanlines on even frames and odd scanlines on odd frames.
It's very simple to implement (just double the pitch and halve the viewport, then offset the framepointer by 1 scanline for odd frames), and it doesn't look all that bad.
Alternatively you could just double the scanlines, should not be too hard with the compiler either, just emit extra stores.
Or render to a smaller 'texture' and stretch it to fullscreen on 'flip' (either with hw acceleration/filtering or just a sw routine).

 
tokjunior

January 14, 2005, 01:28 PM

Hehe well yeah, but even at 640x480 the fillrate's the problem in a software renderer :) The framerate will always scale linearly with geometry complexity and resolution. And it seems, that with 100% support for ps, the fillrate will be the tougher thing to increase.
Don't get me wrong here, it's an impressive piece of work, I just question how usefull it is for a real world scenario :)

 
Won

January 14, 2005, 01:42 PM

I'm impressed. You've come a long way from when you started SoftWire.

You know what would be interesting: if you extended SoftWire and swShader to use x86-64. Having twice the registers might give you some nice benefits. Also, multiprocessor Opterons scale in bandwidth as well as computation, and might make an interesting hardware platform. Maybe you can get AMD or something to sponsor you or something. :)

-Won

 
Nick

January 14, 2005, 06:04 PM

tokjunior wrote: Hehe well yeah, but even at 640x480 the fillrate's the problem in a software renderer :) The framerate will always scale linearly with geometry complexity and resolution. And it seems, that with 100% support for ps, the fillrate will be the tougher thing to increase. Don't get me wrong here, it's an impressive piece of work, I just question how usefull it is for a real world scenario :)

Current processors are indeed not capable of delivering the performance that would be required to perform the things a modern graphics card can do. But that's not really swShader's purpose. I'm targetting niche markets, not the one for high-end games. The conclusion simply is that you don't need DirectX 9 hardware to use DirectX 9 effects. I already see people using the DirectX 9 interface for applications that would have worked fine with DirectX 7, but because everybody always wishes to use the newest API they neglect to support older hardware. In the near future there will definitely be applications that require 3D but where they don't want to worry about hardware support - at all.

Just think about it. All these multi-gigaherz 'Celeron' systems with terribly outdated integrated graphics. There simply is no software renderer on the market that uses a popular known API. swShader is filling that void.

 
This thread contains 92 messages.
First Previous ( To view more messages, select a page: 0 1 2 3 ... out of 3) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.