• Advertisement

Archived

This topic is now archived and is closed to further replies.

Soft-Wired Shaders

This topic is 5406 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve created a software renderer which supports ps 2.0 shaders. Unlike the reference rasterizer, it is not an interpreter but an optimized JIT compiler using SIMD instructions. So it is dozens of times faster than refrast and beats hardware in flexibility. For one, it is no problem to go beyond the 32 texture instructions limit in ps 2.0 hardware, while still keeping things real-time. You can read the details here: [url]http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-swShader&forum=cotd&id=-1[/url].

Share this post


Link to post
Share on other sites
Advertisement
Amazing work. Love your softwire software too. One question though, how do you get it to run way better then the REF device in d3d? I would''ve assumed that MS would make their reference rasterizer at least half as fast as your software renderer.


:::: [ Triple Buffer V2.0 ] ::::

Share this post


Link to post
Share on other sites
Yeah, but the refrast, while optimized, is done for correctness, not speed. It supports every feature, and takes no shortcuts. That''s why it''s used for compatibility testing.



Gamedev for learning.
libGDN for putting it all together.
An opensource, cross platform, cross API game development library.

Share this post


Link to post
Share on other sites
Refrast is totally NOT optimized. It doesn''t use any MMX/SSE instructions and it doesn''t use branch elimination. It''s an interpreter which means it also wastes time parsing the shader. It''s just written in plain C...

swShader compiles ps 2.0 code into x86 code using lots of MMX and SSE instructions. It uses only the code path for the current render state, so all compare and branch instructions are eliminated. A caching system makes sure that you can switch render modes efficiently. So what you get is THE optimal code for a certain situation. No compromises.

Share this post


Link to post
Share on other sites

  • Advertisement