Soft-Wired Shaders

Started by
3 comments, last by C0D1F1ED 20 years, 11 months ago
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: http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-swShader&forum=cotd&id=-1.
Advertisement
Comments welcome!
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 ] ::::
[size=2]aliak.net
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.
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
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.

This topic is closed to new replies.

Advertisement